Document SQLite persistence and local reset behavior

This commit is contained in:
2026-02-24 22:48:32 +01:00
parent 3c6dc5c0a9
commit f212636feb
3 changed files with 22 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
- Backend/full-stack project: `RpgRoller` (Minimal API + static `wwwroot` frontend)
- Frontend source: `RpgRoller/frontend` (TypeScript)
- Test project: `RpgRoller.Tests` (xUnit + `WebApplicationFactory` integration tests)
- Persistence: EF Core + SQLite (`RpgRoller/Data/RpgRollerDbContext.cs`)
- OpenAPI source: `openapi/RpgRoller.json`
- Generated client source: `RpgRoller/frontend/generated/api-client.ts`
- Generated client output: `RpgRoller/wwwroot/generated/api-client.js`
@@ -16,11 +17,11 @@
## 1) Stack and baseline choices
- ASP.NET Core Minimal API on .NET 10.
- EF Core + Database in current project (single-node deployment).
- EF Core with SQLite file persistence in current project (single-node deployment).
- Cookie authentication (`HttpOnly`, `SameSite=Strict`, secure in production).
- A minimal frontend framework supporting mixing 3D graphics with 2D elements, or a modern framework-less alternative (HTMl/CSS/TypeScript).
- OpenAPI generated from backend and consumed by generated client.
- xUnit integration-heavy test suite with in-memory Database and coverage gates.
- xUnit integration-heavy test suite with isolated SQLite test databases and coverage gates.
## 2) Architecture patterns to keep
@@ -78,7 +79,7 @@ This pattern is a strong baseline for low to medium scale and should be the defa
### 2.5 Data and invariants
- Strong DB models
- Strong DB models backed by SQLite
- DB-level guardrails (trigger) to complement app-level checks
- EF patterns:
- `AsNoTracking()` for read-only queries