refinement phase 1
This commit is contained in:
@@ -12,6 +12,31 @@ One block per completed backend phase. Newest at the top. Backend lane writes he
|
||||
- **Notes for frontend:** <anything load-bearing>
|
||||
-->
|
||||
|
||||
## refinement-phase-1 — Database: local-dev story, demo seed & migration hygiene — 2026-07-13
|
||||
- **Shipped (no migration, no endpoint, no contract change):** Development-gated **demo-world seeder** —
|
||||
`Persistence/Services/Seeding/DemoWorldSeeder.cs` + `DemoWorldDefinitions.cs`, scoped-registered in
|
||||
`AddPersistenceServices`, invoked from `Program.cs` via new `SeedDemoWorldAsync()` **only under
|
||||
`IsDevelopment()`**. Idempotently (guarded on phone) creates **3 nurses** (2 verified: `MarkVerified()` +
|
||||
`nurse_verifications` `approved` + credentials + `matched_national_id` primary bank + 2–3 IRR variants +
|
||||
Tehran areas incl. whole-city `district_id=NULL`; 1 unverified), **2 customers** (patients + coord
|
||||
addresses), and **1 cross-category required demo option group** (شیفت / Shift Type). Search rows are driven
|
||||
through the real `ISearchIndexMaintainer.RebuildAsync` — never hand-inserted, so `is_searchable` stays
|
||||
truthful (verified surface, unverified doesn't). Reference `HasData` seeds + the 17 migrations untouched.
|
||||
- **Local DB / migration hygiene:** verified Phase 0's compose + placeholder connstrings + boot-migrate;
|
||||
documented the explicit `dotnet ef database update` path + demo-reset flow in the RUNBOOK; confirmed no
|
||||
pending model changes. Forward-dep FKs (Phase 6) and the boot-migrate multi-instance split (Phase 7) are
|
||||
out of scope by design.
|
||||
- **Contracts:** none produced; swagger snapshot **not** regenerated (no route/shape change).
|
||||
- **Mocked:** none introduced (the seeder uses the real handlers/maintainer/converters).
|
||||
- **Gate:** build clean (0 new warnings) / tests green (**372**: +3 `DemoWorldSeederTests` proving over the
|
||||
real HTTP pipeline — verified nurse in search, unverified not, trust badge correct, idempotent). Added
|
||||
`InternalsVisibleTo("Baya.Test.Api")` on Persistence for the seeder test.
|
||||
- **Handoff:** backend/handoff/after-refinement-phase-1.md
|
||||
- **Notes for frontend:** demo accounts to log in as (phone-OTP) — nurses `09120000001` (verified) /
|
||||
`09120000002` (verified) / `09120000003` (unverified); customers `09120000010` / `09120000011`. Tehran
|
||||
`city_id=101`. `GET /search/nurses?service_category_id=1&city_id=101` now returns real verified nurses.
|
||||
**No `USE_*_MOCK` flag flipped — de-mocking is Phase 4.**
|
||||
|
||||
## refinement-phase-0 — Local end-to-end bring-up & the integration seam — 2026-07-12
|
||||
- **Shipped (integration/plumbing — no business logic):** **CORS** (`Baya.WebFramework/ServiceConfiguration/
|
||||
CorsServiceExtension.cs` → `AddCorsPolicies`, policy `BalinyaarWebClient` from `Cors:AllowedOrigins`, default
|
||||
|
||||
Reference in New Issue
Block a user