Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/demo-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ notices. See `docs/research/reinsurance-landscape.md` for the domain grounding.

## Why it is built well (talking points)

- **Customizable**: Settings let you switch theme (light / dark / system), recolour the accent,
rename the product, set confidence thresholds, pick a default export template, and manage data
— all persisted and applied across the app.
- **Modular**: parsing, OCR, classification, extraction, and reconciliation are separate,
swappable pieces behind interfaces — add a parser or an LLM extractor without touching the UI.
- **Extensible**: never hard-rejects; new document types and export templates slot in.
Expand Down
14 changes: 14 additions & 0 deletions src/Reva.Core/Settings/AppSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Reva.Core.Settings;

// The app-wide, user-customizable settings. One row, persisted; loaded into RuntimeSettings at
// startup and on every save so the whole UI reflects it.
public sealed record AppSettings(
AppTheme Theme,
string AccentColor, // "#rrggbb" to recolor the accent, or empty for the built-in default
string ProductName,
double ConfidenceLowMax, // score below this renders as "Low"
double ConfidenceMediumMax, // score below this renders as "Medium"; at or above is "High"
Guid? DefaultTemplateId)
{
public static AppSettings Default => new(AppTheme.Light, string.Empty, "Reve Intelligence", 0.6, 0.85, null);
}
8 changes: 8 additions & 0 deletions src/Reva.Core/Settings/AppTheme.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Reva.Core.Settings;

public enum AppTheme
{
Light,
Dark,
System
}
14 changes: 14 additions & 0 deletions src/Reva.Core/Settings/RuntimeSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Reva.Core.Settings;

// The single in-memory source of the current app settings, so static UI helpers (branding,
// confidence tiers) and the layout can read them without plumbing a service everywhere.
// Set once at startup and refreshed whenever settings are saved. Reads are a lock-free
// reference read; the value is an immutable record.
public static class RuntimeSettings
{
private static volatile AppSettings _current = AppSettings.Default;

public static AppSettings Current => _current;

public static void Set(AppSettings settings) => _current = settings;
}
15 changes: 15 additions & 0 deletions src/Reva.Infrastructure/Persistence/AppSettingsRecord.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Reva.Infrastructure.Persistence;

// A single-row table (Id is always 1) holding the app-wide settings.
public sealed class AppSettingsRecord
{
public const int SingletonId = 1;

public int Id { get; set; } = SingletonId;
public string Theme { get; set; } = "Light";
public string AccentColor { get; set; } = string.Empty;
public string ProductName { get; set; } = "Reve Intelligence";
public double ConfidenceLowMax { get; set; } = 0.6;
public double ConfidenceMediumMax { get; set; } = 0.85;
public Guid? DefaultTemplateId { get; set; }
}
Loading