diff --git a/.claude/skills/backend-feature/SKILL.md b/.claude/skills/backend-feature/SKILL.md index 72b77f6..6d09ea4 100644 --- a/.claude/skills/backend-feature/SKILL.md +++ b/.claude/skills/backend-feature/SKILL.md @@ -15,13 +15,13 @@ step live in `docs/rules/server/` and this skill defers to them; it doesn't rest | For | Read | |-----|------| -| The dispatcher, folder shape, `OperationResult`, the controller skeleton, authorization | [docs/rules/server/cqrs.md](../../../docs/rules/server/cqrs.md) | -| Projects, layers, the seam catalogue, startup wiring | [docs/rules/server/structure.md](../../../docs/rules/server/structure.md) | -| EF Core, migrations, soft-delete, audit, config-as-rows, state machines, snapshots, uniqueness | [docs/rules/server/persistence.md](../../../docs/rules/server/persistence.md) | -| Anything on the money path — ledger, refunds, BNPL, payouts, invoices | [docs/rules/server/money.md](../../../docs/rules/server/money.md) | -| Auth, JWE, sessions, field encryption, tenancy | [docs/rules/server/identity.md](../../../docs/rules/server/identity.md) | -| C# style, naming, async, testing | [docs/rules/server/conventions.md](../../../docs/rules/server/conventions.md) | -| The gate, and what "done" means | [docs/rules/shared/git-and-gates.md](../../../docs/rules/shared/git-and-gates.md) | +| The dispatcher, folder shape, `OperationResult`, the controller skeleton, authorization | [docs/rules/server/cqrs.md](../../../archive/docs/rules/server/cqrs.md) | +| Projects, layers, the seam catalogue, startup wiring | [docs/rules/server/structure.md](../../../archive/docs/rules/server/structure.md) | +| EF Core, migrations, soft-delete, audit, config-as-rows, state machines, snapshots, uniqueness | [docs/rules/server/persistence.md](../../../archive/docs/rules/server/persistence.md) | +| Anything on the money path — ledger, refunds, BNPL, payouts, invoices | [docs/rules/server/money.md](../../../archive/docs/rules/server/money.md) | +| Auth, JWE, sessions, field encryption, tenancy | [docs/rules/server/identity.md](../../../archive/docs/rules/server/identity.md) | +| C# style, naming, async, testing | [docs/rules/server/conventions.md](../../../archive/docs/rules/server/conventions.md) | +| The gate, and what "done" means | [docs/rules/shared/git-and-gates.md](../../../archive/docs/rules/shared/git-and-gates.md) | **Stack:** ASP.NET Core (.NET 10), Clean Architecture, CQRS on `martinothamar/Mediator` (a source generator — **not MediatR**; there is no `IMediator` anywhere in this codebase), EF Core, FluentValidation, Mapster. @@ -34,22 +34,22 @@ step live in `docs/rules/server/` and this skill defers to them; it doesn't rest `Catalog`, `Verification`, `Search`, `Booking` (singular, pre-payment) / `Bookings` (plural, post-payment), `Payments`, `Refunds`, `Invoices`, `Bnpl`, `Payouts`, `Reviews`, `PatientCareRecords`, `Messaging`, `PartnerCenters`, `Configuration`, `Audit`, `Analytics`, `Holidays`, `Notifications`, `SupportAlerts`. Full - list and the schema-per-area mapping: [structure.md](../../../docs/rules/server/structure.md) §2. + list and the schema-per-area mapping: [structure.md](../../../archive/docs/rules/server/structure.md) §2. - **Command or query, or both?** A command mutates; a query reads. Most features are a matched pair (create + get, or update + list). - **Find a sibling to mirror.** Grep the area's existing folder — `Features//{Commands,Queries}/` — for a feature shaped like the one you're adding. Copying a live pattern beats inventing a new one. - **Does it touch money?** (ledger, refunds, invoices, BNPL, payouts) → read - [money.md](../../../docs/rules/server/money.md) **first**. The invariants there (integer IRR, balanced + [money.md](../../../archive/docs/rules/server/money.md) **first**. The invariants there (integer IRR, balanced ledger postings, webhook idempotency, snapshot-at-compute-time) are not suggestions. -- **Does it add or change a table?** → read [persistence.md](../../../docs/rules/server/persistence.md) §5–7 +- **Does it add or change a table?** → read [persistence.md](../../../archive/docs/rules/server/persistence.md) §5–7 before modeling it (soft-delete filters, forward-only status machines, snapshot fields, uniqueness patterns all have a house pattern — don't reinvent one). - **Does it need a new external dependency** (a vendor, a rail)? It becomes an interface in `Application/Contracts/`, mock in `CrossCutting/Seams/`, real in `CrossCutting/Seams/Real/`, selected by a `Seams::Provider` config key that **falls closed to the mock**. See - [structure.md](../../../docs/rules/server/structure.md) §3. + [structure.md](../../../archive/docs/rules/server/structure.md) §3. --- @@ -77,7 +77,7 @@ Baya.Application/Features// memory. Command: use `Include` only when you need navigation properties loaded to mutate the aggregate, access the DB through `IUnitOfWork`, and `CommitAsync` once at the end. -Full rules and the validator/OperationResult examples: [cqrs.md](../../../docs/rules/server/cqrs.md) §1–3. +Full rules and the validator/OperationResult examples: [cqrs.md](../../../archive/docs/rules/server/cqrs.md) §1–3. --- @@ -100,7 +100,7 @@ dotnet ef database update --project src/Infrastructure/Baya.Infrastructure.Persi ``` Full patterns, with the exact uniqueness/snapshot/state-machine tables: -[persistence.md](../../../docs/rules/server/persistence.md). +[persistence.md](../../../archive/docs/rules/server/persistence.md). --- @@ -127,7 +127,7 @@ public sealed class MyFeatureController(ISender sender) : BaseController `SnakeCaseParameterTransformer` will produce, rename the method instead. - Pick the narrowest authorization that fits: none (truly public) → `[Authorize]` (any authenticated user) → `[Authorize(ConstantPolicies.DynamicPermission)]` (role/claim-gated admin action). Table and rate-limiting - notes: [cqrs.md](../../../docs/rules/server/cqrs.md) §4. + notes: [cqrs.md](../../../archive/docs/rules/server/cqrs.md) §4. --- @@ -140,20 +140,20 @@ public sealed class MyFeatureController(ISender sender) : BaseController 3. The recurring-job scheduler is dormant under `Testing`, so a background tick can't make an integration test flaky — you don't need to account for it. -Examples and the full testing convention: [conventions.md](../../../docs/rules/server/conventions.md) §8. +Examples and the full testing convention: [conventions.md](../../../archive/docs/rules/server/conventions.md) §8. --- ## 6. Docs this feature triggers — in the same change -- **[`docs/integration/domains/.md`](../../../docs/integration/domains/index.md)** — add the new +- **[`docs/integration/domains/.md`](../../../archive/docs/integration/domains/index.md)** — add the new endpoint with its verdict (`wired`/`unwired`/`phantom`), matching the client `services/` domain it belongs to. - **The OpenAPI snapshot** — regenerate `docs/integration/openapi/swagger.v1.json` per - [openapi/README.md](../../../docs/integration/openapi/README.md) and update its provenance table (date, + [openapi/README.md](../../../archive/docs/integration/openapi/README.md) and update its provenance table (date, commit, path/operation counts) in the same change. A snapshot with stale provenance is what that convention exists to prevent. -- **[`docs/status/backlog.md`](../../../docs/status/backlog.md)** — tick the row if this closes a filed +- **[`docs/status/backlog.md`](../../../archive/docs/status/backlog.md)** — tick the row if this closes a filed item. Never delete a row; a ticked row is the record that it shipped. - **A reference file in `docs/rules/server/`** — only if the feature introduces a genuinely new reusable pattern, seam, or base class. Don't add prose for a feature that just follows the existing pattern. @@ -164,4 +164,4 @@ Examples and the full testing convention: [conventions.md](../../../docs/rules/s Run the server gate — `dotnet build Baya.sln` (**zero new warnings**) and `dotnet test Baya.sln` — and read your diff as if reviewing the PR. Full "what done means" checklist: -[git-and-gates.md](../../../docs/rules/shared/git-and-gates.md) §2. +[git-and-gates.md](../../../archive/docs/rules/shared/git-and-gates.md) §2. diff --git a/.claude/skills/flow-testing/SKILL.md b/.claude/skills/flow-testing/SKILL.md index deb4556..1ebb573 100644 --- a/.claude/skills/flow-testing/SKILL.md +++ b/.claude/skills/flow-testing/SKILL.md @@ -10,14 +10,14 @@ description: >- Exercising a flow proves something only if you know which half of the stack actually answered. This is the procedure; the facts it points at (ports, accounts, known failure modes) live in -[docs/flows/testing-setup.md](../../../docs/flows/testing-setup.md) and are kept current there — don't copy +[docs/flows/testing-setup.md](../../../archive/docs/flows/testing-setup.md) and are kept current there — don't copy them here, they will drift. --- ## 1. Boot it -The five-minute path, verbatim from [testing-setup.md](../../../docs/flows/testing-setup.md#the-five-minute-path): +The five-minute path, verbatim from [testing-setup.md](../../../archive/docs/flows/testing-setup.md#the-five-minute-path): ```bash # API — mock SMS or request_otp 500s @@ -41,7 +41,7 @@ carries a `Last verified` stamp for exactly this reason. A flow "working" through a mocked domain proves the UI, not the server. Before testing: -1. Open [docs/integration/domains/index.md](../../../docs/integration/domains/index.md) — the census table +1. Open [docs/integration/domains/index.md](../../../archive/docs/integration/domains/index.md) — the census table names which of the 22 client `services/` domains are real vs **mock** (currently 15 real, 7 mock: `admin`, `bnpl`, `partnerCenter`, `patientRecords`, `payouts`, `refunds`, `verification`). 2. A mocked domain is a `USE__MOCK` flag in `client/src/services//constants.ts` — check it @@ -55,7 +55,7 @@ A flow "working" through a mocked domain proves the UI, not the server. Before t ## 3. Pick the right seeded account Demo accounts, their roles, and what each one demonstrates are tabulated in -[testing-setup.md](../../../docs/flows/testing-setup.md#demo-accounts) — read it there rather than assuming +[testing-setup.md](../../../archive/docs/flows/testing-setup.md#demo-accounts) — read it there rather than assuming a phone number. One standing gap to route around: **the seeded admin accounts (`…020` `super_admin`, `…021` `finance`) get 403 on every real admin endpoint** (a `DynamicPermission` / role-literal mismatch). The admin backoffice is only testable against the client's mock; don't spend time trying to walk it against @@ -65,7 +65,7 @@ the real API without first checking whether that gap has been closed. ## 4. Walk the flow -[docs/flows/index.md](../../../docs/flows/index.md) is the atlas — one file per user-meaningful journey, +[docs/flows/index.md](../../../archive/docs/flows/index.md) is the atlas — one file per user-meaningful journey, each answering exactly three questions: what it does, what's mocked *for that journey specifically*, and how to test it. Open the one file that matches what you're testing rather than guessing the steps; it's the one place gap numbers and REQ references for that journey are tracked. @@ -79,7 +79,7 @@ one place gap numbers and REQ references for that journey are tracked. on a request promptly, or create a fresh one rather than trying to reuse an old test artifact. - **The OTP endpoints are rate-limited together.** `request_otp` and `verify_otp` share one bucket, 5 calls per 60 s per IP — a login is 2 calls, so that's **two logins per minute, total**. Space scripted logins - ≥ 40 s apart (see [testing-setup.md](../../../docs/flows/testing-setup.md#scripting-logins) for a working + ≥ 40 s apart (see [testing-setup.md](../../../archive/docs/flows/testing-setup.md#scripting-logins) for a working script) or you'll 429 and misread it as a bug. --- @@ -102,6 +102,6 @@ because the world was seeded days ago: Name the account you used, the domain's mock/real status, and the exact response (status code, error message) rather than "it worked" — the troubleshooting table in -[testing-setup.md](../../../docs/flows/testing-setup.md#troubleshooting) exists because several failure +[testing-setup.md](../../../archive/docs/flows/testing-setup.md#troubleshooting) exists because several failure modes here look identical to an unrelated bug (a rate limit looks like a crash; `/healthz/ready` failing on Windows looks like the app is down). Check it before filing something as a new defect. diff --git a/.claude/skills/frontend-designer/SKILL.md b/.claude/skills/frontend-designer/SKILL.md index f142761..d1907dd 100644 --- a/.claude/skills/frontend-designer/SKILL.md +++ b/.claude/skills/frontend-designer/SKILL.md @@ -16,7 +16,7 @@ color schemes on the first try. **Precedence.** This skill is the **design** contract — brand, tone, and the visual decisions. The **engineering** contract is [client/CLAUDE.md](../../../client/CLAUDE.md) -(hard rules) plus [docs/rules/client/](../../../docs/rules/client/) (one reference file +(hard rules) plus [docs/rules/client/](../../../archive/docs/rules/client/) (one reference file per area). Where the two overlap — tokens, typography, the component library, shells, icons — **`docs/rules/client/` is authoritative and this skill defers to it.** Read the relevant one before touching layout, provider, or data code; don't restate it here, and @@ -24,10 +24,10 @@ never violate it. | For | Read | |-----|------| -| Tokens, palette, dark mode, RTL, fonts, motion | [docs/rules/client/theme.md](../../../docs/rules/client/theme.md) | -| The `App*` library, shells, navigation, icons | [docs/rules/client/components.md](../../../docs/rules/client/components.md) | -| Copy and Persian orthography | [docs/rules/client/i18n.md](../../../docs/rules/client/i18n.md) | -| Forms | [docs/rules/client/forms.md](../../../docs/rules/client/forms.md) | +| Tokens, palette, dark mode, RTL, fonts, motion | [docs/rules/client/theme.md](../../../archive/docs/rules/client/theme.md) | +| The `App*` library, shells, navigation, icons | [docs/rules/client/components.md](../../../archive/docs/rules/client/components.md) | +| Copy and Persian orthography | [docs/rules/client/i18n.md](../../../archive/docs/rules/client/i18n.md) | +| Forms | [docs/rules/client/forms.md](../../../archive/docs/rules/client/forms.md) | **Stack:** Next.js 16 (App Router, Turbopack) · React 19 · MUI v9 (`@mui/material`) · Emotion (RTL via `stylis-plugin-rtl`) · next-intl v4 · notistack. Everything below @@ -128,7 +128,7 @@ these; they're define-only in CSS): - **Map** — `--bal-pin-shadow`, the address-picker pin. Full catalogue, with what each group backs: -[docs/rules/client/theme.md](../../../docs/rules/client/theme.md) §2. +[docs/rules/client/theme.md](../../../archive/docs/rules/client/theme.md) §2. --- @@ -188,7 +188,7 @@ Beyond the `App*` wrappers there is a **state kit** — `EmptyState`, `ErrorStat `InitialsAvatar`, `FormDialogShell` — with **one pattern per state**. Never hand-roll a dashed-border "nothing here" block or a per-screen pager; and **an error state is never an empty state.** Catalogue in -[docs/rules/client/components.md](../../../docs/rules/client/components.md). +[docs/rules/client/components.md](../../../archive/docs/rules/client/components.md). For layout/spacing use MUI primitives directly: `Box`, `Stack`, `Container`, `Grid`, `Paper`, `Card`. Use the `spacing`/`sx` system (theme spacing unit = 8px) — never inline @@ -197,18 +197,18 @@ pixel margins for rhythm. **New shared component?** Put it in `src/components//.tsx` with an `index.tsx` barrel, follow the `App*` prop-spreading + JSDoc style of `AppButton.tsx`, and add a co-located `.test.tsx` (mandatory for anything imported in >1 place — see -[docs/rules/client/testing.md](../../../docs/rules/client/testing.md); wrap with +[docs/rules/client/testing.md](../../../archive/docs/rules/client/testing.md); wrap with ``, never mock MUI). If it goes at the top of the `@/components/common` barrel, prefer **caller-owned copy** (required `title`/`body`/`retryLabel` string props) over calling `useTranslations` inside it — `next-intl` is ESM-only and poisons every test that transitively imports the barrel. `ErrorBoundary`/`ErrorState` are the model; -[components.md](../../../docs/rules/client/components.md) has the why. +[components.md](../../../archive/docs/rules/client/components.md) has the why. **Any form with more than one field is a react-hook-form form**, bound through the `@/components/common/form` wrappers (`RhfTextField`, `RhfChipSelect`, `RhfJalaliDateField`, `RhfControlGroup`) and grouped into `FormSection`s. A single-field control is state, not a form. Full pattern: -[docs/rules/client/forms.md](../../../docs/rules/client/forms.md). +[docs/rules/client/forms.md](../../../archive/docs/rules/client/forms.md). --- @@ -341,14 +341,14 @@ Every screen/component you produce must satisfy **all** of these: switches automatically. Verify on both schemes — never assume a light background. 4. **Tokens, not hexes.** No raw color literals in `sx`/`styled`/components (§2). 5. **Constants, not magic values.** Cookie names, routes, repeated dimensions, event - names → named constants ([components.md](../../../docs/rules/client/components.md) §5). + names → named constants ([components.md](../../../archive/docs/rules/client/components.md) §5). 6. **Use the wrappers** (§4) and the **icon registry** (§6) before bare MUI. 7. **Shared component ⇒ co-located test** (§4). 8. **MUI v9 API only.** No v5/v6-era props (e.g. `Stack` `useFlexGap`, `storageWindow`). Avoid deprecated APIs that throw. 9. **Persian copy follows the style guide** — «بالین‌یار» with a ZWNJ, تأیید with a hamza, جستجو in one form, formal شما. `npm run lint:copy` fails the gate on a banned variant. - Glossary and the full rules: [i18n.md](../../../docs/rules/client/i18n.md) §4. + Glossary and the full rules: [i18n.md](../../../archive/docs/rules/client/i18n.md) §4. 10. **A screen never fabricates a figure.** A summary reads only off a query that already answers it; a count still in flight is omitted, never faked or defaulted. @@ -366,10 +366,10 @@ Every screen/component you produce must satisfy **all** of these: 5. **Verify the four axes:** `/fa` (RTL) and `/en` (LTR) × light and dark. The default route is `/fa` — start there. 6. **Tests** for any new shared component; **never** add a layout above `[locale]` - (breaks locale/dir — see [structure.md](../../../docs/rules/client/structure.md)). + (breaks locale/dir — see [structure.md](../../../archive/docs/rules/client/structure.md)). 7. Data/fetch/auth/cookies/toasts → follow - [services.md](../../../docs/rules/client/services.md) and - [auth.md](../../../docs/rules/client/auth.md) (`serverFetch`/`clientFetch`, + [services.md](../../../archive/docs/rules/client/services.md) and + [auth.md](../../../archive/docs/rules/client/auth.md) (`serverFetch`/`clientFetch`, `@/lib/cookies/*`, `dispatchToast`/`useSnackbar`). Don't reinvent these. --- diff --git a/AGENTS.md b/AGENTS.md index e940e0f..f2a5c86 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,9 +6,11 @@ The canonical guidance for AI coding agents in this repository lives in **[CLAUD - Frontend → [client/CLAUDE.md](client/CLAUDE.md) - Backend → [server/CLAUDE.md](server/CLAUDE.md) -Those hold the **hard rules**. The reasoning behind them, and everything you need on demand for a -specific area, is in **[docs/rules/](docs/rules/index.md)** — start at its index, which maps -"working on X" to the one file to open. Business rules live in **[product/](product/index.md)**. +Those hold the **hard rules**. For current-state product truth — what to test, what's blocking launch, +what's missing — start at **[mvp/README.md](mvp/README.md)**. The engineering reasoning behind the hard +rules, and the full business-requirement docs, were archived on 2026-08-02 into +**[archive/docs/rules/](archive/docs/rules/index.md)** and **[archive/product/](archive/product/index.md)** +respectively — reference material, not actively maintained. `CLAUDE.md` is the single source of truth at every level of this repo; these `AGENTS.md` files are just pointers so the convention is discoverable under either name. diff --git a/CLAUDE.md b/CLAUDE.md index 9d57e96..44134e8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,26 +18,18 @@ Balinyaar is a **trust-first home-nursing marketplace in Iran**. Independent nur employees) list configurable services; families search, book, pay, and review. The platform holds funds in an escrow-style ledger and pays nurses out weekly after a confirmed check-out. -Product and domain knowledge — business rules, the database model, payments/BNPL, escrow, the verification -pipeline — is **not in the code**. It lives in [`product/`](product/index.md), a structured docs tree with one -topic per file. +**Start at [`mvp/README.md`](mvp/README.md) for the current state of the product**, in three short, +non-technical files: how to manually test any user journey, what's broken and blocking a real launch, and +what's missing that isn't clearly scheduled. That folder is the live, load-bearing answer to "what's next." -| Folder | What it covers | -| --- | --- | -| [product/overview/](product/overview/platform-summary.md) | What Balinyaar is, the four cross-cutting ground truths, the Persian glossary. **Read first.** | -| [product/business/](product/business/index.md) | The 14 functional/business requirement areas, one file each | -| [product/data-model/](product/data-model/index.md) | The ~54-table SQL Server schema across 13 domains, + [diagrams](product/data-model/diagrams.md) | -| [product/payments/](product/payments/index.md) | BNPL, the escrow ledger, settlement, VAT, integrations (with sources) | -| [product/research/](product/research/index.md) | Market/legal/verification research & go-to-market (EN) | -| [product/notes/](product/notes/open-questions.md) | Living notes: open questions, future ideas | -| [product/fa/](product/fa/index.html) | Farsi versions (research report + verification flow) | +Deeper product/business knowledge — the full business-requirement write-ups, the ~54-table database model, +payments/BNPL research, market/legal research — was consolidated into [`archive/product/`](archive/product/index.md) +during the 2026-08-02 documentation cleanup. It is **reference material, not required reading**: correct as +of that date, but not actively maintained going forward. Read it when `mvp/` doesn't answer your question in +enough depth — e.g. designing a new table, or needing the full reasoning behind a business rule. -**Read the relevant `product/` doc before designing any schema, API, or feature.** Don't infer business rules -from code — the code is young and the docs are the source of truth. - -> **Docs format:** the `.md` files are canonical; matching `.html` files are a generated, cross-linked browsing -> view (`cd product && node build-docs.mjs`). Edit the Markdown and regenerate — never hand-edit the `.html`. -> If you add or rename a `.md`, update the `NAV` manifest in `product/build-docs.mjs`. +**Never infer business rules from code alone** — the code is young. If `mvp/` and `archive/product/` both go +silent on a money, auth, tenancy, or clinical-data rule, say so rather than guessing. --- @@ -50,9 +42,8 @@ package, or solution — each project is built, linted, and run on its own. | --- | --- | --- | --- | | [`client/`](client/) | Web frontend | Next.js 16 (App Router) · React 19 · TypeScript · MUI v9 · next-intl | [client/CLAUDE.md](client/CLAUDE.md) | | [`server/`](server/) | Backend API | ASP.NET Core (.NET 10) · Clean Architecture · CQRS · EF Core | [server/CLAUDE.md](server/CLAUDE.md) | -| [`product/`](product/index.md) | **Business truth** — what to build and why | Markdown (+ generated HTML) | the table above | -| [`docs/`](docs/README.md) | **Engineering truth** — rules, the client↔server contract, flows, status, roadmap | Markdown | [docs/README.md](docs/README.md) | -| [`archive/`](archive/README.md) | The executed build-chain (was `dev/`) and the cleanup plan that produced `docs/`. **History, not instruction** — nothing to build from it | Markdown | [archive/README.md](archive/README.md) | +| [`mvp/`](mvp/README.md) | **Current truth** — plain-language test flows, launch blockers, missing MVP features | Markdown | [mvp/README.md](mvp/README.md) | +| [`archive/`](archive/README.md) | Everything else: business docs, engineering rules/contracts/flow-atlas, and the executed build history. **Reference/history, not instruction** — nothing to build from it, and nothing here is kept current | Markdown | [archive/README.md](archive/README.md) | | [`telegram-otp-bot/`](telegram-otp-bot/) | OTP relay (standalone, the pre-launch demo rail) | Node 18+, zero deps | [telegram-otp-bot/README.md](telegram-otp-bot/README.md) | | [`deploy/`](deploy/) | Reverse-proxy config | Caddyfile | [DEPLOY.md](DEPLOY.md) | @@ -67,8 +58,10 @@ The two projects communicate over **HTTP/JSON** (optionally gRPC). The client re network, serving `balinyaar.ir` (client) and `api.balinyaar.ir` (server). The database is **not** containerised; it is a remote SQL Server. Full runbook: [DEPLOY.md](DEPLOY.md). -`archive/` holds `dev/`'s history now that the clarify chain has run. **Anything in it is a record, not -an instruction** — it is written in the imperative from having once been a prompt. +`archive/` holds the executed build history, the former `docs/` (engineering rules, API contracts, the +per-flow test atlas, status/backlog) and the former `product/` (business requirements, data model, research) +— consolidated there on 2026-08-02 so the live tree stays focused on MVP work. **Anything in it is a record, +not an instruction.** --- @@ -80,14 +73,15 @@ are touching. | Tier | Where | What | | --- | --- | --- | | **Hard rules** | this file · [client/CLAUDE.md](client/CLAUDE.md) · [server/CLAUDE.md](server/CLAUDE.md) | Constraints whose violation breaks the build, the gate, or a business invariant | -| **Reference** | [`docs/rules/`](docs/rules/index.md) | The *how* and the *why*, read on demand — 3 shared files, 8 client, 6 server, plus the documentation convention | +| **Reference** (archived) | [`archive/docs/rules/`](archive/docs/rules/index.md) | The *how* and the *why*, as of 2026-08-02 — 3 shared files, 8 client, 6 server, plus the documentation convention. Not actively maintained; read it on demand, don't expect it to track later changes | | **Procedure** | `.claude/skills/` | Playbooks: **frontend-designer** (the design contract for `client/` UI), **backend-feature** (adding a server feature), **flow-testing** (walking a flow end to end) | -Start at [docs/rules/index.md](docs/rules/index.md) — it maps "working on X" to the one file to open. +Start at [archive/docs/rules/index.md](archive/docs/rules/index.md) — it maps "working on X" to the one file +to open. -**Precedence when two sources disagree:** `product/` (business truth) → the relevant `CLAUDE.md` (engineering -truth) → `docs/rules/` (the reasoning behind it) → the task in front of you. **Never silently guess on money, -auth, tenancy, or clinical-data rules** — do the safe thing, and say so. +**Precedence when two sources disagree:** `archive/product/` (business truth) → the relevant `CLAUDE.md` +(engineering truth) → `archive/docs/rules/` (the reasoning behind it) → the task in front of you. **Never +silently guess on money, auth, tenancy, or clinical-data rules** — do the safe thing, and say so. --- @@ -100,8 +94,8 @@ auth, tenancy, or clinical-data rules** — do the safe thing, and say so. - client: `cd client && npm run check` (type + lint + copy), plus `npm run test:ci` if you touched a tested component. - server: `cd server && dotnet build Baya.sln` (**zero new warnings**) and `dotnet test Baya.sln`. - - What "done" means in full: [docs/rules/shared/git-and-gates.md](docs/rules/shared/git-and-gates.md). -4. **Read the product docs before changing behavior.** Business rules are decisions, not guesses. + - What "done" means in full: [archive/docs/rules/shared/git-and-gates.md](archive/docs/rules/shared/git-and-gates.md). +4. **Read [`mvp/`](mvp/README.md) (and `archive/product/` for depth) before changing behavior.** Business rules are decisions, not guesses. 5. **Don't reintroduce template/starter scaffolding.** Both projects were derived from open-source starters; their branding, demo/showcase pages, and `_TITLE_`/`_DESCRIPTION_` placeholders were intentionally removed. Don't add them back. @@ -121,7 +115,7 @@ auth, tenancy, or clinical-data rules** — do the safe thing, and say so. renames a project, layer, route group, provider, or major folder, or changes a cross-project / cross-layer boundary — update the matching section in the same change. The full anti-drift convention (what to update when X changes, the `> Last verified:` stamp, length budgets) is - [docs/rules/documentation.md](docs/rules/documentation.md). **Stale instructions are worse than none.** + [archive/docs/rules/documentation.md](archive/docs/rules/documentation.md). **Stale instructions are worse than none.** 8. **Write clean, self-documenting code.** - **No dead code.** Remove unused variables, imports/usings, parameters, and private members — don't leave them behind and don't suppress the warning. The client enforces this with ESLint @@ -130,9 +124,10 @@ auth, tenancy, or clinical-data rules** — do the safe thing, and say so. - **Comment the *why*, not the *what*.** Don't write verbose comments that restate what the code already says. Add a comment only where a non-obvious decision, constraint, business rule, or trade-off isn't evident from the code itself. Prefer a clearer name over a comment. - - Details and worked examples: [docs/rules/shared/code-quality.md](docs/rules/shared/code-quality.md). + - Details and worked examples: [archive/docs/rules/shared/code-quality.md](archive/docs/rules/shared/code-quality.md). 9. **A mock is only sanctioned behind a DI-registered seam**, selected by configuration, defaulting to the - mock, and recorded in `docs/status/`. Never an `if (mock)` branch scattered through the code. + mock, and recorded in [`mvp/blockers.md`](mvp/blockers.md) (or `archive/docs/status/` for the full historical + ledger). Never an `if (mock)` branch scattered through the code. --- @@ -144,7 +139,7 @@ auth, tenancy, or clinical-data rules** — do the safe thing, and say so. The product/brand name is **Balinyaar** — «بالین‌یار» in Persian copy, with a ZWNJ, always. The server's `Baya*` prefix is a legacy code namespace: **do not rename it without explicit instruction.** Full -conventions: [docs/rules/shared/naming.md](docs/rules/shared/naming.md). +conventions: [archive/docs/rules/shared/naming.md](archive/docs/rules/shared/naming.md). --- diff --git a/DEPLOY.md b/DEPLOY.md index 28a7733..c38f56d 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -4,10 +4,11 @@ A first, shareable deployment of the whole stack under **balinyaar.ir**, in Dock Caddy reverse proxy that terminates TLS. > **This file is the deploy *procedure*.** The runtime dependency graph — every edge, what breaks when it is -> down, and where it is configured — is [docs/integration/topology.md](docs/integration/topology.md), and +> down, and where it is configured — is [archive/docs/integration/topology.md](archive/docs/integration/topology.md) +> (archived reference, not actively maintained), and > every configuration key on both sides is -> [docs/integration/config-matrix.md](docs/integration/config-matrix.md). Read those to answer "what talks -> to what" or "where is this value set"; read this one to actually ship. +> [archive/docs/integration/config-matrix.md](archive/docs/integration/config-matrix.md). Read those to answer +> "what talks to what" or "where is this value set"; read this one to actually ship. | Host | Serves | Container | | --- | --- | --- | @@ -37,8 +38,8 @@ machine is now inert and can be deleted. Every value lives in a file in the repo The placeholder string `SET_VIA_USER_SECRETS_OR_ENV` in the base `appsettings.json` names that removed store; the *name* is a historical artifact, kept only because it is the sentinel `StartupSecretsGuard` rejects. **The mechanism is appsettings files and environment variables** — see -[docs/integration/config-matrix.md](docs/integration/config-matrix.md), which lists every key, its default, -and who reads it. +[archive/docs/integration/config-matrix.md](archive/docs/integration/config-matrix.md), which lists every key, +its default, and who reads it. The API runs as **`ASPNETCORE_ENVIRONMENT=Development`**, so `appsettings.Development.json` is the file that actually loads. There is **no `appsettings.Production.json` in the repo at all**, and adding one would diff --git a/archive/README.md b/archive/README.md index 1f10869..437d666 100644 --- a/archive/README.md +++ b/archive/README.md @@ -1,13 +1,22 @@ # Archive -> **This folder is a historical record of how Balinyaar was built. It is not instruction.** -> Nothing here describes current behaviour, current rules, or current plans. Do not follow a -> procedure from this folder. Current truth lives in [`docs/`](../docs/README.md) and -> [`product/`](../product/index.md). +> **This folder is a historical and reference record. It is not instruction.** +> Nothing here describes current priorities or the current plan. Do not follow a procedure from this +> folder. The current, load-bearing answers to "what do I test" / "what's broken" / "what's missing +> for MVP" live in **[`mvp/`](../mvp/README.md)** — read that first. -Everything here was written in the imperative, as a prompt for an agent to execute. The work described -was executed weeks ago; the code has moved on since. Reading a file in this tree as if it were a -live instruction is the exact failure mode this archive exists to prevent. +As of 2026-08-02, this folder absorbed **all** of the project's accumulated documentation — not just the +executed build-chain history, but also the full `docs/` (engineering rules, integration contracts, flow +atlas, status/backlog) and `product/` (business requirements, data model, payments research) trees that +used to live at the repo root. That reorganization was a deliberate cleanup: those trees had grown large +enough to slow down MVP-focused work, and their two truly current-state questions — "how do I test this" +and "what's blocking/missing for MVP" — were distilled forward into `mvp/`. Everything else here is kept +as raw material for a future, more thorough compaction pass; nothing in `mvp/` links back into this folder. + +Everything in the pre-existing subfolders below was additionally written in the imperative, as a prompt for +an agent to execute. The work described was executed weeks to months ago; the code has moved on since. +Reading a file in this tree as if it were a live instruction is the exact failure mode this archive exists +to prevent. --- @@ -15,12 +24,14 @@ live instruction is the exact failure mode this archive exists to prevent. | Folder | Was | Date range | Superseded by | | --- | --- | --- | --- | -| `build-chain/phases/` | `dev/phases/` — 32 executed build prompts (backend 0–15, frontend 0–15) plus `_shared/` conventions | 2026-06-28 (single day, all executed) | [`docs/rules/`](../docs/rules/index.md) (conventions), [`docs/flows/`](../docs/flows/index.md) (§7 "How to test" sections), [`docs/status/decisions.md`](../docs/status/decisions.md) (§5 "Critical rules") | -| `build-chain/working-context/` | `dev/shared-working-context/` — per-phase STATUS files, 50 handoff/report files, the frontend request ledger, the mocks registry | 2026-06-28 → 2026-07-20 | [`docs/status/decisions.md`](../docs/status/decisions.md), [`docs/status/implemented.md`](../docs/status/implemented.md), [`docs/status/backlog.md`](../docs/status/backlog.md) (67 REQs → `BL-###`) | -| `build-chain/contracts/` | `dev/contracts/` — the original hand-written API contract layer + the frozen 2026-07-13 OpenAPI snapshot | 2026-06-28 → 2026-07-13 | [`docs/integration/`](../docs/integration/index.md) (refreshed against 2026-07-29 code, domain-by-domain) | -| `post-phase/` | `dev/post-phase/` — hardening (18 items), refinement (10 phases), server follow-up plans, and the 15-phase UI overhaul (plans + design audits) | 2026-07-10 → 2026-07-28 | [`docs/status/backlog.md`](../docs/status/backlog.md) (hardening + server items, re-verified against code, not trusted from checkboxes), [`docs/status/decisions.md`](../docs/status/decisions.md) (refinement decisions), [`docs/flows/testing-setup.md`](../docs/flows/testing-setup.md) (RUNBOOK.md, manual-testing-plan.md), the `frontend-designer` skill (UI design reality) | -| `manual-testing/` | `dev/manual-testing/` — two iterations of human testing notes + screenshots (the only visual record of the pre-overhaul UI) | 2026-07-27 | [`docs/status/backlog.md`](../docs/status/backlog.md) (unfinished items); screenshots are kept as-is, unlinked from any live doc | -| `clarify-chain/` | `docs/_plan/` — the plan that produced this cleanup: inventory, contradiction log, and the eight phase files (including this move) | 2026-07-29 → 2026-08-02 | [`docs/README.md`](../docs/README.md) records when it ran; its content is itself now history | +| `build-chain/phases/` | `dev/phases/` — 32 executed build prompts (backend 0–15, frontend 0–15) plus `_shared/` conventions | 2026-06-28 (single day, all executed) | `docs/rules/` (conventions), `docs/flows/` (§7 "How to test" sections), `docs/status/decisions.md` (§5 "Critical rules") — all now archived alongside this folder, see below | +| `build-chain/working-context/` | `dev/shared-working-context/` — per-phase STATUS files, 50 handoff/report files, the frontend request ledger, the mocks registry | 2026-06-28 → 2026-07-20 | `docs/status/decisions.md`, `docs/status/implemented.md`, `docs/status/backlog.md` (67 REQs → `BL-###`) | +| `build-chain/contracts/` | `dev/contracts/` — the original hand-written API contract layer + the frozen 2026-07-13 OpenAPI snapshot | 2026-06-28 → 2026-07-13 | `docs/integration/` (refreshed against 2026-07-29 code, domain-by-domain) | +| `post-phase/` | `dev/post-phase/` — hardening (18 items), refinement (10 phases), server follow-up plans, and the 15-phase UI overhaul (plans + design audits) | 2026-07-10 → 2026-07-28 | `docs/status/backlog.md` (hardening + server items, re-verified against code, not trusted from checkboxes), `docs/status/decisions.md` (refinement decisions), `docs/flows/testing-setup.md` (RUNBOOK.md, manual-testing-plan.md), the `frontend-designer` skill (UI design reality) | +| `manual-testing/` | `dev/manual-testing/` — two iterations of human testing notes + screenshots (the only visual record of the pre-overhaul UI) | 2026-07-27 | `docs/status/backlog.md` (unfinished items); screenshots are kept as-is, unlinked from any live doc | +| `clarify-chain/` | `docs/_plan/` — the plan that produced the first documentation clean-up pass (the one that built `docs/` and `docs/status/backlog.md` out of the rows above) | 2026-07-29 → 2026-08-02 | superseded in turn by the 2026-08-02 consolidation into `mvp/` described at the top of this file | +| `docs/` | The engineering-truth tree produced by `clarify-chain/` — rules, integration contracts, the 23-flow test atlas, status/backlog/roadmap | 2026-07-29 → 2026-08-02 | `mvp/test-flows.md` (flow atlas, distilled) and `mvp/blockers.md` (backlog/roadmap, distilled) | +| `product/` | Business truth — the 14 business-requirement areas, the data model, payments research, market/legal research | pre-existing, never previously archived | `mvp/blockers.md` and `mvp/forgotten-features.md` pull the launch-critical and scope-decision facts forward; the rest (schema detail, market research) has no live equivalent — read it here if you need it | `dev/README.md`'s own context (why this history exists at all — the derivation from an open-source starter, the phase-chain-then-post-phase-then-UI-overhaul shape) is folded into this file rather than @@ -34,11 +45,18 @@ here because they sit in files a reader might otherwise trust: - `post-phase/manual-testing-plan.md` and some of `post-phase/refinement/RUNBOOK.md` still instruct `dotnet user-secrets` — removed from the codebase in `5885280`. Config lives in `appsettings.*.json` - and `.env.*` files; see [`docs/README.md`](../docs/README.md#configuration). + and `.env.*` files; see `docs/README.md#configuration` in this same archive. - `post-phase/hardening/issues.md` shows 18 of 18 items unticked as of 2026-07-17, but four later - work chains ran without updating it. The real state is in - [`docs/status/backlog.md`](../docs/status/backlog.md), re-verified against code. + work chains ran without updating it. The real state, as of the 2026-08-02 consolidation, is + distilled in [`../mvp/blockers.md`](../mvp/blockers.md). -## `product/` is untouched +## `docs/` and `product/` — how they got here -Nothing under `product/` moved. It was, and remains, business truth, not build history. +Both were live, current-truth trees at the repo root until 2026-08-02. Neither was wrong or out of date — +they were simply large enough (83 and 48 files respectively, plus this folder's pre-existing ~220) that +finding "what do I test" or "what's blocking MVP" meant reading through a great deal of settled history and +reference material first. [`../mvp/`](../mvp/README.md) now carries those two live questions forward in +three short files; everything else that made `docs/` and `product/` valuable — the full business-requirement +write-ups, the ~54-table data model, the per-domain API contracts, the payments/legal research, the +per-flow technical trace with file:line evidence — is preserved here, unedited, for whoever does the next, +more thorough compaction pass. diff --git a/docs/README.md b/archive/docs/README.md similarity index 100% rename from docs/README.md rename to archive/docs/README.md diff --git a/docs/flows/account-and-settings.md b/archive/docs/flows/account-and-settings.md similarity index 100% rename from docs/flows/account-and-settings.md rename to archive/docs/flows/account-and-settings.md diff --git a/docs/flows/addresses-and-map.md b/archive/docs/flows/addresses-and-map.md similarity index 100% rename from docs/flows/addresses-and-map.md rename to archive/docs/flows/addresses-and-map.md diff --git a/docs/flows/admin-backoffice.md b/archive/docs/flows/admin-backoffice.md similarity index 100% rename from docs/flows/admin-backoffice.md rename to archive/docs/flows/admin-backoffice.md diff --git a/docs/flows/auth-login-otp.md b/archive/docs/flows/auth-login-otp.md similarity index 100% rename from docs/flows/auth-login-otp.md rename to archive/docs/flows/auth-login-otp.md diff --git a/docs/flows/bnpl-installments.md b/archive/docs/flows/bnpl-installments.md similarity index 100% rename from docs/flows/bnpl-installments.md rename to archive/docs/flows/bnpl-installments.md diff --git a/docs/flows/booking-lifecycle-evv.md b/archive/docs/flows/booking-lifecycle-evv.md similarity index 100% rename from docs/flows/booking-lifecycle-evv.md rename to archive/docs/flows/booking-lifecycle-evv.md diff --git a/docs/flows/booking-request.md b/archive/docs/flows/booking-request.md similarity index 100% rename from docs/flows/booking-request.md rename to archive/docs/flows/booking-request.md diff --git a/docs/flows/cancellation-and-refunds.md b/archive/docs/flows/cancellation-and-refunds.md similarity index 100% rename from docs/flows/cancellation-and-refunds.md rename to archive/docs/flows/cancellation-and-refunds.md diff --git a/docs/flows/care-circle-patients.md b/archive/docs/flows/care-circle-patients.md similarity index 100% rename from docs/flows/care-circle-patients.md rename to archive/docs/flows/care-circle-patients.md diff --git a/docs/flows/checkout-and-payment.md b/archive/docs/flows/checkout-and-payment.md similarity index 100% rename from docs/flows/checkout-and-payment.md rename to archive/docs/flows/checkout-and-payment.md diff --git a/docs/flows/index.md b/archive/docs/flows/index.md similarity index 100% rename from docs/flows/index.md rename to archive/docs/flows/index.md diff --git a/docs/flows/messaging-tickets.md b/archive/docs/flows/messaging-tickets.md similarity index 100% rename from docs/flows/messaging-tickets.md rename to archive/docs/flows/messaging-tickets.md diff --git a/docs/flows/notifications.md b/archive/docs/flows/notifications.md similarity index 100% rename from docs/flows/notifications.md rename to archive/docs/flows/notifications.md diff --git a/docs/flows/nurse-catalog-and-pricing.md b/archive/docs/flows/nurse-catalog-and-pricing.md similarity index 100% rename from docs/flows/nurse-catalog-and-pricing.md rename to archive/docs/flows/nurse-catalog-and-pricing.md diff --git a/docs/flows/nurse-earnings-and-payouts.md b/archive/docs/flows/nurse-earnings-and-payouts.md similarity index 100% rename from docs/flows/nurse-earnings-and-payouts.md rename to archive/docs/flows/nurse-earnings-and-payouts.md diff --git a/docs/flows/nurse-service-areas.md b/archive/docs/flows/nurse-service-areas.md similarity index 100% rename from docs/flows/nurse-service-areas.md rename to archive/docs/flows/nurse-service-areas.md diff --git a/docs/flows/nurse-verification.md b/archive/docs/flows/nurse-verification.md similarity index 100% rename from docs/flows/nurse-verification.md rename to archive/docs/flows/nurse-verification.md diff --git a/docs/flows/onboarding-customer.md b/archive/docs/flows/onboarding-customer.md similarity index 100% rename from docs/flows/onboarding-customer.md rename to archive/docs/flows/onboarding-customer.md diff --git a/docs/flows/onboarding-nurse.md b/archive/docs/flows/onboarding-nurse.md similarity index 100% rename from docs/flows/onboarding-nurse.md rename to archive/docs/flows/onboarding-nurse.md diff --git a/docs/flows/partner-center.md b/archive/docs/flows/partner-center.md similarity index 100% rename from docs/flows/partner-center.md rename to archive/docs/flows/partner-center.md diff --git a/docs/flows/patient-care-records.md b/archive/docs/flows/patient-care-records.md similarity index 100% rename from docs/flows/patient-care-records.md rename to archive/docs/flows/patient-care-records.md diff --git a/docs/flows/public-front-door.md b/archive/docs/flows/public-front-door.md similarity index 100% rename from docs/flows/public-front-door.md rename to archive/docs/flows/public-front-door.md diff --git a/docs/flows/reviews.md b/archive/docs/flows/reviews.md similarity index 100% rename from docs/flows/reviews.md rename to archive/docs/flows/reviews.md diff --git a/docs/flows/search-and-discovery.md b/archive/docs/flows/search-and-discovery.md similarity index 100% rename from docs/flows/search-and-discovery.md rename to archive/docs/flows/search-and-discovery.md diff --git a/docs/flows/testing-setup.md b/archive/docs/flows/testing-setup.md similarity index 100% rename from docs/flows/testing-setup.md rename to archive/docs/flows/testing-setup.md diff --git a/docs/integration/api-contract.md b/archive/docs/integration/api-contract.md similarity index 100% rename from docs/integration/api-contract.md rename to archive/docs/integration/api-contract.md diff --git a/docs/integration/config-matrix.md b/archive/docs/integration/config-matrix.md similarity index 100% rename from docs/integration/config-matrix.md rename to archive/docs/integration/config-matrix.md diff --git a/docs/integration/domains/addresses.md b/archive/docs/integration/domains/addresses.md similarity index 100% rename from docs/integration/domains/addresses.md rename to archive/docs/integration/domains/addresses.md diff --git a/docs/integration/domains/admin.md b/archive/docs/integration/domains/admin.md similarity index 100% rename from docs/integration/domains/admin.md rename to archive/docs/integration/domains/admin.md diff --git a/docs/integration/domains/auth.md b/archive/docs/integration/domains/auth.md similarity index 100% rename from docs/integration/domains/auth.md rename to archive/docs/integration/domains/auth.md diff --git a/docs/integration/domains/bnpl.md b/archive/docs/integration/domains/bnpl.md similarity index 100% rename from docs/integration/domains/bnpl.md rename to archive/docs/integration/domains/bnpl.md diff --git a/docs/integration/domains/booking-requests.md b/archive/docs/integration/domains/booking-requests.md similarity index 100% rename from docs/integration/domains/booking-requests.md rename to archive/docs/integration/domains/booking-requests.md diff --git a/docs/integration/domains/bookings.md b/archive/docs/integration/domains/bookings.md similarity index 100% rename from docs/integration/domains/bookings.md rename to archive/docs/integration/domains/bookings.md diff --git a/docs/integration/domains/catalog.md b/archive/docs/integration/domains/catalog.md similarity index 100% rename from docs/integration/domains/catalog.md rename to archive/docs/integration/domains/catalog.md diff --git a/docs/integration/domains/geography.md b/archive/docs/integration/domains/geography.md similarity index 100% rename from docs/integration/domains/geography.md rename to archive/docs/integration/domains/geography.md diff --git a/docs/integration/domains/index.md b/archive/docs/integration/domains/index.md similarity index 100% rename from docs/integration/domains/index.md rename to archive/docs/integration/domains/index.md diff --git a/docs/integration/domains/notifications.md b/archive/docs/integration/domains/notifications.md similarity index 100% rename from docs/integration/domains/notifications.md rename to archive/docs/integration/domains/notifications.md diff --git a/docs/integration/domains/nurse.md b/archive/docs/integration/domains/nurse.md similarity index 100% rename from docs/integration/domains/nurse.md rename to archive/docs/integration/domains/nurse.md diff --git a/docs/integration/domains/partner-center.md b/archive/docs/integration/domains/partner-center.md similarity index 100% rename from docs/integration/domains/partner-center.md rename to archive/docs/integration/domains/partner-center.md diff --git a/docs/integration/domains/patient-records.md b/archive/docs/integration/domains/patient-records.md similarity index 100% rename from docs/integration/domains/patient-records.md rename to archive/docs/integration/domains/patient-records.md diff --git a/docs/integration/domains/patients.md b/archive/docs/integration/domains/patients.md similarity index 100% rename from docs/integration/domains/patients.md rename to archive/docs/integration/domains/patients.md diff --git a/docs/integration/domains/payment.md b/archive/docs/integration/domains/payment.md similarity index 100% rename from docs/integration/domains/payment.md rename to archive/docs/integration/domains/payment.md diff --git a/docs/integration/domains/payouts.md b/archive/docs/integration/domains/payouts.md similarity index 100% rename from docs/integration/domains/payouts.md rename to archive/docs/integration/domains/payouts.md diff --git a/docs/integration/domains/profiles.md b/archive/docs/integration/domains/profiles.md similarity index 100% rename from docs/integration/domains/profiles.md rename to archive/docs/integration/domains/profiles.md diff --git a/docs/integration/domains/refunds.md b/archive/docs/integration/domains/refunds.md similarity index 100% rename from docs/integration/domains/refunds.md rename to archive/docs/integration/domains/refunds.md diff --git a/docs/integration/domains/reviews.md b/archive/docs/integration/domains/reviews.md similarity index 100% rename from docs/integration/domains/reviews.md rename to archive/docs/integration/domains/reviews.md diff --git a/docs/integration/domains/search.md b/archive/docs/integration/domains/search.md similarity index 100% rename from docs/integration/domains/search.md rename to archive/docs/integration/domains/search.md diff --git a/docs/integration/domains/service-areas.md b/archive/docs/integration/domains/service-areas.md similarity index 100% rename from docs/integration/domains/service-areas.md rename to archive/docs/integration/domains/service-areas.md diff --git a/docs/integration/domains/tickets.md b/archive/docs/integration/domains/tickets.md similarity index 100% rename from docs/integration/domains/tickets.md rename to archive/docs/integration/domains/tickets.md diff --git a/docs/integration/domains/verification.md b/archive/docs/integration/domains/verification.md similarity index 100% rename from docs/integration/domains/verification.md rename to archive/docs/integration/domains/verification.md diff --git a/docs/integration/index.md b/archive/docs/integration/index.md similarity index 100% rename from docs/integration/index.md rename to archive/docs/integration/index.md diff --git a/docs/integration/openapi/README.md b/archive/docs/integration/openapi/README.md similarity index 100% rename from docs/integration/openapi/README.md rename to archive/docs/integration/openapi/README.md diff --git a/docs/integration/openapi/swagger.v1.json b/archive/docs/integration/openapi/swagger.v1.json similarity index 100% rename from docs/integration/openapi/swagger.v1.json rename to archive/docs/integration/openapi/swagger.v1.json diff --git a/docs/integration/topology.md b/archive/docs/integration/topology.md similarity index 100% rename from docs/integration/topology.md rename to archive/docs/integration/topology.md diff --git a/docs/roadmap/deferred.md b/archive/docs/roadmap/deferred.md similarity index 100% rename from docs/roadmap/deferred.md rename to archive/docs/roadmap/deferred.md diff --git a/docs/roadmap/index.md b/archive/docs/roadmap/index.md similarity index 100% rename from docs/roadmap/index.md rename to archive/docs/roadmap/index.md diff --git a/docs/roadmap/next-up.md b/archive/docs/roadmap/next-up.md similarity index 100% rename from docs/roadmap/next-up.md rename to archive/docs/roadmap/next-up.md diff --git a/docs/roadmap/pre-launch.md b/archive/docs/roadmap/pre-launch.md similarity index 100% rename from docs/roadmap/pre-launch.md rename to archive/docs/roadmap/pre-launch.md diff --git a/docs/roadmap/tech-debt.md b/archive/docs/roadmap/tech-debt.md similarity index 100% rename from docs/roadmap/tech-debt.md rename to archive/docs/roadmap/tech-debt.md diff --git a/docs/rules/client/auth.md b/archive/docs/rules/client/auth.md similarity index 100% rename from docs/rules/client/auth.md rename to archive/docs/rules/client/auth.md diff --git a/docs/rules/client/components.md b/archive/docs/rules/client/components.md similarity index 100% rename from docs/rules/client/components.md rename to archive/docs/rules/client/components.md diff --git a/docs/rules/client/forms.md b/archive/docs/rules/client/forms.md similarity index 100% rename from docs/rules/client/forms.md rename to archive/docs/rules/client/forms.md diff --git a/docs/rules/client/i18n.md b/archive/docs/rules/client/i18n.md similarity index 100% rename from docs/rules/client/i18n.md rename to archive/docs/rules/client/i18n.md diff --git a/docs/rules/client/services.md b/archive/docs/rules/client/services.md similarity index 100% rename from docs/rules/client/services.md rename to archive/docs/rules/client/services.md diff --git a/docs/rules/client/structure.md b/archive/docs/rules/client/structure.md similarity index 100% rename from docs/rules/client/structure.md rename to archive/docs/rules/client/structure.md diff --git a/docs/rules/client/testing.md b/archive/docs/rules/client/testing.md similarity index 100% rename from docs/rules/client/testing.md rename to archive/docs/rules/client/testing.md diff --git a/docs/rules/client/theme.md b/archive/docs/rules/client/theme.md similarity index 100% rename from docs/rules/client/theme.md rename to archive/docs/rules/client/theme.md diff --git a/docs/rules/documentation.md b/archive/docs/rules/documentation.md similarity index 100% rename from docs/rules/documentation.md rename to archive/docs/rules/documentation.md diff --git a/docs/rules/index.md b/archive/docs/rules/index.md similarity index 100% rename from docs/rules/index.md rename to archive/docs/rules/index.md diff --git a/docs/rules/server/conventions.md b/archive/docs/rules/server/conventions.md similarity index 100% rename from docs/rules/server/conventions.md rename to archive/docs/rules/server/conventions.md diff --git a/docs/rules/server/cqrs.md b/archive/docs/rules/server/cqrs.md similarity index 100% rename from docs/rules/server/cqrs.md rename to archive/docs/rules/server/cqrs.md diff --git a/docs/rules/server/identity.md b/archive/docs/rules/server/identity.md similarity index 100% rename from docs/rules/server/identity.md rename to archive/docs/rules/server/identity.md diff --git a/docs/rules/server/money.md b/archive/docs/rules/server/money.md similarity index 100% rename from docs/rules/server/money.md rename to archive/docs/rules/server/money.md diff --git a/docs/rules/server/persistence.md b/archive/docs/rules/server/persistence.md similarity index 100% rename from docs/rules/server/persistence.md rename to archive/docs/rules/server/persistence.md diff --git a/docs/rules/server/structure.md b/archive/docs/rules/server/structure.md similarity index 100% rename from docs/rules/server/structure.md rename to archive/docs/rules/server/structure.md diff --git a/docs/rules/shared/code-quality.md b/archive/docs/rules/shared/code-quality.md similarity index 100% rename from docs/rules/shared/code-quality.md rename to archive/docs/rules/shared/code-quality.md diff --git a/docs/rules/shared/git-and-gates.md b/archive/docs/rules/shared/git-and-gates.md similarity index 100% rename from docs/rules/shared/git-and-gates.md rename to archive/docs/rules/shared/git-and-gates.md diff --git a/docs/rules/shared/naming.md b/archive/docs/rules/shared/naming.md similarity index 100% rename from docs/rules/shared/naming.md rename to archive/docs/rules/shared/naming.md diff --git a/docs/status/backlog-closed.md b/archive/docs/status/backlog-closed.md similarity index 100% rename from docs/status/backlog-closed.md rename to archive/docs/status/backlog-closed.md diff --git a/docs/status/backlog.md b/archive/docs/status/backlog.md similarity index 100% rename from docs/status/backlog.md rename to archive/docs/status/backlog.md diff --git a/docs/status/decisions.md b/archive/docs/status/decisions.md similarity index 100% rename from docs/status/decisions.md rename to archive/docs/status/decisions.md diff --git a/docs/status/implemented.md b/archive/docs/status/implemented.md similarity index 100% rename from docs/status/implemented.md rename to archive/docs/status/implemented.md diff --git a/docs/status/index.md b/archive/docs/status/index.md similarity index 100% rename from docs/status/index.md rename to archive/docs/status/index.md diff --git a/product/README.html b/archive/product/README.html similarity index 100% rename from product/README.html rename to archive/product/README.html diff --git a/product/README.md b/archive/product/README.md similarity index 100% rename from product/README.md rename to archive/product/README.md diff --git a/product/assets/doc.css b/archive/product/assets/doc.css similarity index 100% rename from product/assets/doc.css rename to archive/product/assets/doc.css diff --git a/product/build-docs.mjs b/archive/product/build-docs.mjs similarity index 100% rename from product/build-docs.mjs rename to archive/product/build-docs.mjs diff --git a/product/business/01-actors-and-onboarding.html b/archive/product/business/01-actors-and-onboarding.html similarity index 100% rename from product/business/01-actors-and-onboarding.html rename to archive/product/business/01-actors-and-onboarding.html diff --git a/product/business/01-actors-and-onboarding.md b/archive/product/business/01-actors-and-onboarding.md similarity index 100% rename from product/business/01-actors-and-onboarding.md rename to archive/product/business/01-actors-and-onboarding.md diff --git a/product/business/02-nurse-verification.html b/archive/product/business/02-nurse-verification.html similarity index 100% rename from product/business/02-nurse-verification.html rename to archive/product/business/02-nurse-verification.html diff --git a/product/business/02-nurse-verification.md b/archive/product/business/02-nurse-verification.md similarity index 100% rename from product/business/02-nurse-verification.md rename to archive/product/business/02-nurse-verification.md diff --git a/product/business/03-service-catalog-and-pricing.html b/archive/product/business/03-service-catalog-and-pricing.html similarity index 100% rename from product/business/03-service-catalog-and-pricing.html rename to archive/product/business/03-service-catalog-and-pricing.html diff --git a/product/business/03-service-catalog-and-pricing.md b/archive/product/business/03-service-catalog-and-pricing.md similarity index 100% rename from product/business/03-service-catalog-and-pricing.md rename to archive/product/business/03-service-catalog-and-pricing.md diff --git a/product/business/04-search-and-matching.html b/archive/product/business/04-search-and-matching.html similarity index 100% rename from product/business/04-search-and-matching.html rename to archive/product/business/04-search-and-matching.html diff --git a/product/business/04-search-and-matching.md b/archive/product/business/04-search-and-matching.md similarity index 100% rename from product/business/04-search-and-matching.md rename to archive/product/business/04-search-and-matching.md diff --git a/product/business/05-booking-and-scheduling.html b/archive/product/business/05-booking-and-scheduling.html similarity index 100% rename from product/business/05-booking-and-scheduling.html rename to archive/product/business/05-booking-and-scheduling.html diff --git a/product/business/05-booking-and-scheduling.md b/archive/product/business/05-booking-and-scheduling.md similarity index 100% rename from product/business/05-booking-and-scheduling.md rename to archive/product/business/05-booking-and-scheduling.md diff --git a/product/business/06-evv-and-service-delivery.html b/archive/product/business/06-evv-and-service-delivery.html similarity index 100% rename from product/business/06-evv-and-service-delivery.html rename to archive/product/business/06-evv-and-service-delivery.html diff --git a/product/business/06-evv-and-service-delivery.md b/archive/product/business/06-evv-and-service-delivery.md similarity index 100% rename from product/business/06-evv-and-service-delivery.md rename to archive/product/business/06-evv-and-service-delivery.md diff --git a/product/business/07-cancellation-and-refunds.html b/archive/product/business/07-cancellation-and-refunds.html similarity index 100% rename from product/business/07-cancellation-and-refunds.html rename to archive/product/business/07-cancellation-and-refunds.html diff --git a/product/business/07-cancellation-and-refunds.md b/archive/product/business/07-cancellation-and-refunds.md similarity index 100% rename from product/business/07-cancellation-and-refunds.md rename to archive/product/business/07-cancellation-and-refunds.md diff --git a/product/business/08-payments-and-escrow.html b/archive/product/business/08-payments-and-escrow.html similarity index 100% rename from product/business/08-payments-and-escrow.html rename to archive/product/business/08-payments-and-escrow.html diff --git a/product/business/08-payments-and-escrow.md b/archive/product/business/08-payments-and-escrow.md similarity index 100% rename from product/business/08-payments-and-escrow.md rename to archive/product/business/08-payments-and-escrow.md diff --git a/product/business/09-installments-bnpl.html b/archive/product/business/09-installments-bnpl.html similarity index 100% rename from product/business/09-installments-bnpl.html rename to archive/product/business/09-installments-bnpl.html diff --git a/product/business/09-installments-bnpl.md b/archive/product/business/09-installments-bnpl.md similarity index 100% rename from product/business/09-installments-bnpl.md rename to archive/product/business/09-installments-bnpl.md diff --git a/product/business/10-payouts.html b/archive/product/business/10-payouts.html similarity index 100% rename from product/business/10-payouts.html rename to archive/product/business/10-payouts.html diff --git a/product/business/10-payouts.md b/archive/product/business/10-payouts.md similarity index 100% rename from product/business/10-payouts.md rename to archive/product/business/10-payouts.md diff --git a/product/business/11-reviews-trust-and-safety.html b/archive/product/business/11-reviews-trust-and-safety.html similarity index 100% rename from product/business/11-reviews-trust-and-safety.html rename to archive/product/business/11-reviews-trust-and-safety.html diff --git a/product/business/11-reviews-trust-and-safety.md b/archive/product/business/11-reviews-trust-and-safety.md similarity index 100% rename from product/business/11-reviews-trust-and-safety.md rename to archive/product/business/11-reviews-trust-and-safety.md diff --git a/product/business/12-messaging-and-emergencies.html b/archive/product/business/12-messaging-and-emergencies.html similarity index 100% rename from product/business/12-messaging-and-emergencies.html rename to archive/product/business/12-messaging-and-emergencies.html diff --git a/product/business/12-messaging-and-emergencies.md b/archive/product/business/12-messaging-and-emergencies.md similarity index 100% rename from product/business/12-messaging-and-emergencies.md rename to archive/product/business/12-messaging-and-emergencies.md diff --git a/product/business/13-tax-invoicing-and-legal.html b/archive/product/business/13-tax-invoicing-and-legal.html similarity index 100% rename from product/business/13-tax-invoicing-and-legal.html rename to archive/product/business/13-tax-invoicing-and-legal.html diff --git a/product/business/13-tax-invoicing-and-legal.md b/archive/product/business/13-tax-invoicing-and-legal.md similarity index 100% rename from product/business/13-tax-invoicing-and-legal.md rename to archive/product/business/13-tax-invoicing-and-legal.md diff --git a/product/business/14-notifications-and-admin.html b/archive/product/business/14-notifications-and-admin.html similarity index 100% rename from product/business/14-notifications-and-admin.html rename to archive/product/business/14-notifications-and-admin.html diff --git a/product/business/14-notifications-and-admin.md b/archive/product/business/14-notifications-and-admin.md similarity index 100% rename from product/business/14-notifications-and-admin.md rename to archive/product/business/14-notifications-and-admin.md diff --git a/product/business/index.html b/archive/product/business/index.html similarity index 100% rename from product/business/index.html rename to archive/product/business/index.html diff --git a/product/business/index.md b/archive/product/business/index.md similarity index 100% rename from product/business/index.md rename to archive/product/business/index.md diff --git a/product/data-model/01-identity-and-access.html b/archive/product/data-model/01-identity-and-access.html similarity index 100% rename from product/data-model/01-identity-and-access.html rename to archive/product/data-model/01-identity-and-access.html diff --git a/product/data-model/01-identity-and-access.md b/archive/product/data-model/01-identity-and-access.md similarity index 100% rename from product/data-model/01-identity-and-access.md rename to archive/product/data-model/01-identity-and-access.md diff --git a/product/data-model/02-geography.html b/archive/product/data-model/02-geography.html similarity index 100% rename from product/data-model/02-geography.html rename to archive/product/data-model/02-geography.html diff --git a/product/data-model/02-geography.md b/archive/product/data-model/02-geography.md similarity index 100% rename from product/data-model/02-geography.md rename to archive/product/data-model/02-geography.md diff --git a/product/data-model/03-services-and-pricing.html b/archive/product/data-model/03-services-and-pricing.html similarity index 100% rename from product/data-model/03-services-and-pricing.html rename to archive/product/data-model/03-services-and-pricing.html diff --git a/product/data-model/03-services-and-pricing.md b/archive/product/data-model/03-services-and-pricing.md similarity index 100% rename from product/data-model/03-services-and-pricing.md rename to archive/product/data-model/03-services-and-pricing.md diff --git a/product/data-model/04-verification-and-credentials.html b/archive/product/data-model/04-verification-and-credentials.html similarity index 100% rename from product/data-model/04-verification-and-credentials.html rename to archive/product/data-model/04-verification-and-credentials.html diff --git a/product/data-model/04-verification-and-credentials.md b/archive/product/data-model/04-verification-and-credentials.md similarity index 100% rename from product/data-model/04-verification-and-credentials.md rename to archive/product/data-model/04-verification-and-credentials.md diff --git a/product/data-model/05-booking-and-scheduling.html b/archive/product/data-model/05-booking-and-scheduling.html similarity index 100% rename from product/data-model/05-booking-and-scheduling.html rename to archive/product/data-model/05-booking-and-scheduling.html diff --git a/product/data-model/05-booking-and-scheduling.md b/archive/product/data-model/05-booking-and-scheduling.md similarity index 100% rename from product/data-model/05-booking-and-scheduling.md rename to archive/product/data-model/05-booking-and-scheduling.md diff --git a/product/data-model/06-payments-ledger-and-refunds.html b/archive/product/data-model/06-payments-ledger-and-refunds.html similarity index 100% rename from product/data-model/06-payments-ledger-and-refunds.html rename to archive/product/data-model/06-payments-ledger-and-refunds.html diff --git a/product/data-model/06-payments-ledger-and-refunds.md b/archive/product/data-model/06-payments-ledger-and-refunds.md similarity index 100% rename from product/data-model/06-payments-ledger-and-refunds.md rename to archive/product/data-model/06-payments-ledger-and-refunds.md diff --git a/product/data-model/07-payouts.html b/archive/product/data-model/07-payouts.html similarity index 100% rename from product/data-model/07-payouts.html rename to archive/product/data-model/07-payouts.html diff --git a/product/data-model/07-payouts.md b/archive/product/data-model/07-payouts.md similarity index 100% rename from product/data-model/07-payouts.md rename to archive/product/data-model/07-payouts.md diff --git a/product/data-model/08-bnpl.html b/archive/product/data-model/08-bnpl.html similarity index 100% rename from product/data-model/08-bnpl.html rename to archive/product/data-model/08-bnpl.html diff --git a/product/data-model/08-bnpl.md b/archive/product/data-model/08-bnpl.md similarity index 100% rename from product/data-model/08-bnpl.md rename to archive/product/data-model/08-bnpl.md diff --git a/product/data-model/09-messaging.html b/archive/product/data-model/09-messaging.html similarity index 100% rename from product/data-model/09-messaging.html rename to archive/product/data-model/09-messaging.html diff --git a/product/data-model/09-messaging.md b/archive/product/data-model/09-messaging.md similarity index 100% rename from product/data-model/09-messaging.md rename to archive/product/data-model/09-messaging.md diff --git a/product/data-model/10-reviews-and-records.html b/archive/product/data-model/10-reviews-and-records.html similarity index 100% rename from product/data-model/10-reviews-and-records.html rename to archive/product/data-model/10-reviews-and-records.html diff --git a/product/data-model/10-reviews-and-records.md b/archive/product/data-model/10-reviews-and-records.md similarity index 100% rename from product/data-model/10-reviews-and-records.md rename to archive/product/data-model/10-reviews-and-records.md diff --git a/product/data-model/11-notifications.html b/archive/product/data-model/11-notifications.html similarity index 100% rename from product/data-model/11-notifications.html rename to archive/product/data-model/11-notifications.html diff --git a/product/data-model/11-notifications.md b/archive/product/data-model/11-notifications.md similarity index 100% rename from product/data-model/11-notifications.md rename to archive/product/data-model/11-notifications.md diff --git a/product/data-model/12-audit-config-and-reference.html b/archive/product/data-model/12-audit-config-and-reference.html similarity index 100% rename from product/data-model/12-audit-config-and-reference.html rename to archive/product/data-model/12-audit-config-and-reference.html diff --git a/product/data-model/12-audit-config-and-reference.md b/archive/product/data-model/12-audit-config-and-reference.md similarity index 100% rename from product/data-model/12-audit-config-and-reference.md rename to archive/product/data-model/12-audit-config-and-reference.md diff --git a/product/data-model/13-partner-centers-and-future.html b/archive/product/data-model/13-partner-centers-and-future.html similarity index 100% rename from product/data-model/13-partner-centers-and-future.html rename to archive/product/data-model/13-partner-centers-and-future.html diff --git a/product/data-model/13-partner-centers-and-future.md b/archive/product/data-model/13-partner-centers-and-future.md similarity index 100% rename from product/data-model/13-partner-centers-and-future.md rename to archive/product/data-model/13-partner-centers-and-future.md diff --git a/product/data-model/diagrams.html b/archive/product/data-model/diagrams.html similarity index 100% rename from product/data-model/diagrams.html rename to archive/product/data-model/diagrams.html diff --git a/product/data-model/diagrams.md b/archive/product/data-model/diagrams.md similarity index 100% rename from product/data-model/diagrams.md rename to archive/product/data-model/diagrams.md diff --git a/product/data-model/index.html b/archive/product/data-model/index.html similarity index 100% rename from product/data-model/index.html rename to archive/product/data-model/index.html diff --git a/product/data-model/index.md b/archive/product/data-model/index.md similarity index 100% rename from product/data-model/index.md rename to archive/product/data-model/index.md diff --git a/product/fa/index.html b/archive/product/fa/index.html similarity index 100% rename from product/fa/index.html rename to archive/product/fa/index.html diff --git a/product/fa/nurse-verification-flow.fa.html b/archive/product/fa/nurse-verification-flow.fa.html similarity index 100% rename from product/fa/nurse-verification-flow.fa.html rename to archive/product/fa/nurse-verification-flow.fa.html diff --git a/product/fa/platform-report.fa.html b/archive/product/fa/platform-report.fa.html similarity index 100% rename from product/fa/platform-report.fa.html rename to archive/product/fa/platform-report.fa.html diff --git a/product/index.html b/archive/product/index.html similarity index 100% rename from product/index.html rename to archive/product/index.html diff --git a/product/index.md b/archive/product/index.md similarity index 100% rename from product/index.md rename to archive/product/index.md diff --git a/product/notes/future-ideas.html b/archive/product/notes/future-ideas.html similarity index 100% rename from product/notes/future-ideas.html rename to archive/product/notes/future-ideas.html diff --git a/product/notes/future-ideas.md b/archive/product/notes/future-ideas.md similarity index 100% rename from product/notes/future-ideas.md rename to archive/product/notes/future-ideas.md diff --git a/product/notes/open-questions.html b/archive/product/notes/open-questions.html similarity index 100% rename from product/notes/open-questions.html rename to archive/product/notes/open-questions.html diff --git a/product/notes/open-questions.md b/archive/product/notes/open-questions.md similarity index 100% rename from product/notes/open-questions.md rename to archive/product/notes/open-questions.md diff --git a/product/overview/platform-summary.html b/archive/product/overview/platform-summary.html similarity index 100% rename from product/overview/platform-summary.html rename to archive/product/overview/platform-summary.html diff --git a/product/overview/platform-summary.md b/archive/product/overview/platform-summary.md similarity index 100% rename from product/overview/platform-summary.md rename to archive/product/overview/platform-summary.md diff --git a/product/payments/bnpl-landscape.html b/archive/product/payments/bnpl-landscape.html similarity index 100% rename from product/payments/bnpl-landscape.html rename to archive/product/payments/bnpl-landscape.html diff --git a/product/payments/bnpl-landscape.md b/archive/product/payments/bnpl-landscape.md similarity index 100% rename from product/payments/bnpl-landscape.md rename to archive/product/payments/bnpl-landscape.md diff --git a/product/payments/cancellation-and-payout.html b/archive/product/payments/cancellation-and-payout.html similarity index 100% rename from product/payments/cancellation-and-payout.html rename to archive/product/payments/cancellation-and-payout.html diff --git a/product/payments/cancellation-and-payout.md b/archive/product/payments/cancellation-and-payout.md similarity index 100% rename from product/payments/cancellation-and-payout.md rename to archive/product/payments/cancellation-and-payout.md diff --git a/product/payments/escrow-ledger.html b/archive/product/payments/escrow-ledger.html similarity index 100% rename from product/payments/escrow-ledger.html rename to archive/product/payments/escrow-ledger.html diff --git a/product/payments/escrow-ledger.md b/archive/product/payments/escrow-ledger.md similarity index 100% rename from product/payments/escrow-ledger.md rename to archive/product/payments/escrow-ledger.md diff --git a/product/payments/index.html b/archive/product/payments/index.html similarity index 100% rename from product/payments/index.html rename to archive/product/payments/index.html diff --git a/product/payments/index.md b/archive/product/payments/index.md similarity index 100% rename from product/payments/index.md rename to archive/product/payments/index.md diff --git a/product/payments/integration-notes.html b/archive/product/payments/integration-notes.html similarity index 100% rename from product/payments/integration-notes.html rename to archive/product/payments/integration-notes.html diff --git a/product/payments/integration-notes.md b/archive/product/payments/integration-notes.md similarity index 100% rename from product/payments/integration-notes.md rename to archive/product/payments/integration-notes.md diff --git a/product/payments/iranian-payment-reality.html b/archive/product/payments/iranian-payment-reality.html similarity index 100% rename from product/payments/iranian-payment-reality.html rename to archive/product/payments/iranian-payment-reality.html diff --git a/product/payments/iranian-payment-reality.md b/archive/product/payments/iranian-payment-reality.md similarity index 100% rename from product/payments/iranian-payment-reality.md rename to archive/product/payments/iranian-payment-reality.md diff --git a/product/payments/sources.html b/archive/product/payments/sources.html similarity index 100% rename from product/payments/sources.html rename to archive/product/payments/sources.html diff --git a/product/payments/sources.md b/archive/product/payments/sources.md similarity index 100% rename from product/payments/sources.md rename to archive/product/payments/sources.md diff --git a/product/research/go-to-market.html b/archive/product/research/go-to-market.html similarity index 100% rename from product/research/go-to-market.html rename to archive/product/research/go-to-market.html diff --git a/product/research/go-to-market.md b/archive/product/research/go-to-market.md similarity index 100% rename from product/research/go-to-market.md rename to archive/product/research/go-to-market.md diff --git a/product/research/index.html b/archive/product/research/index.html similarity index 100% rename from product/research/index.html rename to archive/product/research/index.html diff --git a/product/research/index.md b/archive/product/research/index.md similarity index 100% rename from product/research/index.md rename to archive/product/research/index.md diff --git a/product/research/legal-landscape.html b/archive/product/research/legal-landscape.html similarity index 100% rename from product/research/legal-landscape.html rename to archive/product/research/legal-landscape.html diff --git a/product/research/legal-landscape.md b/archive/product/research/legal-landscape.md similarity index 100% rename from product/research/legal-landscape.md rename to archive/product/research/legal-landscape.md diff --git a/product/research/market-and-competitors.html b/archive/product/research/market-and-competitors.html similarity index 100% rename from product/research/market-and-competitors.html rename to archive/product/research/market-and-competitors.html diff --git a/product/research/market-and-competitors.md b/archive/product/research/market-and-competitors.md similarity index 100% rename from product/research/market-and-competitors.md rename to archive/product/research/market-and-competitors.md diff --git a/product/research/problems-and-risks.html b/archive/product/research/problems-and-risks.html similarity index 100% rename from product/research/problems-and-risks.html rename to archive/product/research/problems-and-risks.html diff --git a/product/research/problems-and-risks.md b/archive/product/research/problems-and-risks.md similarity index 100% rename from product/research/problems-and-risks.md rename to archive/product/research/problems-and-risks.md diff --git a/product/research/verification.html b/archive/product/research/verification.html similarity index 100% rename from product/research/verification.html rename to archive/product/research/verification.html diff --git a/product/research/verification.md b/archive/product/research/verification.md similarity index 100% rename from product/research/verification.md rename to archive/product/research/verification.md diff --git a/product/wireframes/index.html b/archive/product/wireframes/index.html similarity index 100% rename from product/wireframes/index.html rename to archive/product/wireframes/index.html diff --git a/client/AGENTS.md b/client/AGENTS.md index ceea709..da818d7 100644 --- a/client/AGENTS.md +++ b/client/AGENTS.md @@ -3,10 +3,11 @@ The canonical agent guide for the frontend is **[CLAUDE.md](CLAUDE.md)** (same folder): stack, commands, the quality gates, the project structure, and the hard rules every change must follow. -- Reference rules, read on demand per area → [../docs/rules/client/](../docs/rules/client/) +- Current product truth (what to test, what's blocking, what's missing) → [../mvp/](../mvp/README.md) +- Reference rules, archived, read on demand per area → [../archive/docs/rules/client/](../archive/docs/rules/client/) (structure · theme · components · forms · i18n · services · auth · testing) - Repo-wide context → [../CLAUDE.md](../CLAUDE.md) -- Business rules (what to build) → [../product/](../product/index.md) +- Business rules in depth (archived) → [../archive/product/](../archive/product/index.md) - Human setup/run instructions → [README.md](README.md) - UI/design work → the **frontend-designer** skill diff --git a/client/CLAUDE.md b/client/CLAUDE.md index a88e2bc..7473554 100644 --- a/client/CLAUDE.md +++ b/client/CLAUDE.md @@ -7,10 +7,11 @@ app. Four actors share one mobile shell: family, nurse, admin, partner centre. > Last verified: 2026-07-30 against commit `d3ec723`. - Repo-wide context and the backend → root [CLAUDE.md](../CLAUDE.md) -- Business rules (what to build) → [`product/`](../product/index.md). **Read the relevant doc before - designing a feature** — don't infer a business rule from code. +- Current product truth (what to test, what's blocking, what's missing) → [`mvp/`](../mvp/README.md) +- Business rules in depth (archived reference, not actively maintained) → [`archive/product/`](../archive/product/index.md). + **Read the relevant doc before designing a feature** — don't infer a business rule from code. - Visual/design work → the **frontend-designer** skill. It is the *design* contract and defers to this file - and [`docs/rules/client/`](../docs/rules/client/) for engineering rules. + and [`archive/docs/rules/client/`](../archive/docs/rules/client/) for engineering rules. --- @@ -111,7 +112,7 @@ Both must be green, and `en.json`/`fa.json` must be in sync, before work is done ## Project structure The canonical map of the frontend's architecture. Expanded, with the reasoning, in -[`docs/rules/client/structure.md`](../docs/rules/client/structure.md). +[`docs/rules/client/structure.md`](../archive/docs/rules/client/structure.md). ``` client/ @@ -163,15 +164,15 @@ Open **one** of these for the area you are touching. | Working on… | Read | | --- | --- | -| Routes, layouts, the RSC boundary, page metadata | [docs/rules/client/structure.md](../docs/rules/client/structure.md) | -| Colors, tokens, dark mode, RTL, fonts, motion | [docs/rules/client/theme.md](../docs/rules/client/theme.md) | -| The `App*` library, shells, navigation, icons, constants | [docs/rules/client/components.md](../docs/rules/client/components.md) | -| Any form | [docs/rules/client/forms.md](../docs/rules/client/forms.md) | -| Copy, translations, Persian orthography | [docs/rules/client/i18n.md](../docs/rules/client/i18n.md) | -| Fetching, TanStack Query, `services/{domain}`, money display, cookies | [docs/rules/client/services.md](../docs/rules/client/services.md) | -| Sessions, refresh, `RoleGuard`, middleware, security posture | [docs/rules/client/auth.md](../docs/rules/client/auth.md) | -| Tests, ESLint, the type gate | [docs/rules/client/testing.md](../docs/rules/client/testing.md) | -| The wire contract — envelope, status codes, enums, pagination | [docs/integration/](../docs/integration/index.md) | -| What is built, what is mocked, what is next | [docs/status/](../docs/status/index.md) | +| Routes, layouts, the RSC boundary, page metadata | [docs/rules/client/structure.md](../archive/docs/rules/client/structure.md) | +| Colors, tokens, dark mode, RTL, fonts, motion | [docs/rules/client/theme.md](../archive/docs/rules/client/theme.md) | +| The `App*` library, shells, navigation, icons, constants | [docs/rules/client/components.md](../archive/docs/rules/client/components.md) | +| Any form | [docs/rules/client/forms.md](../archive/docs/rules/client/forms.md) | +| Copy, translations, Persian orthography | [docs/rules/client/i18n.md](../archive/docs/rules/client/i18n.md) | +| Fetching, TanStack Query, `services/{domain}`, money display, cookies | [docs/rules/client/services.md](../archive/docs/rules/client/services.md) | +| Sessions, refresh, `RoleGuard`, middleware, security posture | [docs/rules/client/auth.md](../archive/docs/rules/client/auth.md) | +| Tests, ESLint, the type gate | [docs/rules/client/testing.md](../archive/docs/rules/client/testing.md) | +| The wire contract — envelope, status codes, enums, pagination | [docs/integration/](../archive/docs/integration/index.md) | +| What is built, what is mocked, what is next | [docs/status/](../archive/docs/status/index.md) | | Brand, look and feel, turning a design into a screen | the **frontend-designer** skill | -| Cross-project rules — naming, gates, code quality | [docs/rules/shared/](../docs/rules/shared/) | +| Cross-project rules — naming, gates, code quality | [docs/rules/shared/](../archive/docs/rules/shared/) | diff --git a/deploy/Caddyfile b/deploy/Caddyfile deleted file mode 100644 index 30a63bb..0000000 --- a/deploy/Caddyfile +++ /dev/null @@ -1,21 +0,0 @@ -# Balinyaar — the block to add to your EXISTING Caddyfile (the Caddy container that owns caddy_net). -# -# This is not loaded by anything in this repo; it is a copy of what DEPLOY.md tells you to paste, kept -# here so the reverse-proxy contract lives next to the compose file that depends on it. -# -# Both upstreams are plain HTTP on the container network — Caddy is the only TLS terminator, and it -# obtains/renews the certificates for both hostnames automatically. - -balinyaar.ir, www.balinyaar.ir { - encode zstd gzip - reverse_proxy balinyaar-web:3000 -} - -api.balinyaar.ir { - encode zstd gzip - - # The API partitions its rate limiter on the client IP resolved from X-Forwarded-For, and trusts the - # docker bridge ranges listed under ForwardedHeaders:KnownNetworks. Caddy sets X-Forwarded-For and - # X-Forwarded-Proto by default, so no extra header directives are needed here. - reverse_proxy balinyaar-api:8080 -} diff --git a/mvp/README.md b/mvp/README.md new file mode 100644 index 0000000..48b89c5 --- /dev/null +++ b/mvp/README.md @@ -0,0 +1,13 @@ +# mvp/ — the only three documents you need right now + +Everything else that used to live in `product/`, `docs/`, and the old `archive/` has been consolidated under +[`archive/`](../archive/README.md) as historical/reference material. It is not required reading to answer +"what's next" — these three files are: + +| File | Answers | +| --- | --- | +| [test-flows.md](test-flows.md) | "How do I manually test that X works?" — plain-language, click-by-click walkthroughs of every user journey, no engineering knowledge required. | +| [blockers.md](blockers.md) | "What has to be fixed before this is a real product?" — what's broken today, and what must happen before real money/real users touch it. | +| [forgotten-features.md](forgotten-features.md) | "What's missing that we haven't clearly scheduled?" — planning gaps that don't show up as an app bug, plus a short list of things already deliberately cut so they don't get re-litigated by accident. | + +> Last verified: 2026-08-02. diff --git a/mvp/blockers.md b/mvp/blockers.md new file mode 100644 index 0000000..6b66a25 --- /dev/null +++ b/mvp/blockers.md @@ -0,0 +1,121 @@ +# Blockers — what has to be fixed before this is a real product + +Two different kinds of "blocker" here, and both matter: + +- **A. The product itself is broken** — a real user would hit a wall or be shown wrong information, with or + without real money involved. +- **B. The launch gate** — things that must be true before a real stranger with real money is allowed to touch + this, even on a day when part A is fully fixed. + +Effort is a rough size, not a schedule: **S** = small/contained, **M** = a real but bounded piece of work, +**L** = a project of its own. + +--- + +## A. The product is broken or unusable + +### Admin can't do anything +- **No admin account can perform a single real admin action.** Every super-admin/finance account gets + "access denied" on every real admin screen — approving a nurse, moderating a review, processing a refund, + running a payout batch, managing tickets, all of it. The permission system only recognizes one hardcoded + role name that nothing ever actually assigns. *(Effort: M)* +- **On top of that, no demo account holds even that hardcoded role**, so fixing the permission bug alone + still leaves nothing to test it with out of the box. *(Effort: S, bundled with the item above)* + + *Why this matters more than it looks: a large share of the other items below — nurse verification, + reviews, refunds, payouts, ticket handling — are gated behind this one fix. Fixing admin access is the + single highest-leverage thing on this list.* + +### Payments +- **A card payment can never actually complete.** The test/demo payment page redirects to a page that + doesn't exist. Nothing about the money logic itself is wrong — it's the very last step, handing off to a + real payment provider, that isn't connected. *(Effort: M)* +- **The 30-minute payment countdown can lie.** Booking deadlines are stored without a timezone, so the timer + a customer sees can silently show hours more time than they actually have, and expire while they still + think they're fine. *(Effort: S)* +- **Installment (buy-now-pay-later) payments don't work at all.** No installment plan is ever actually set up + behind the scenes, so every attempt fails immediately. *(Effort: S–M, two related issues)* +- **Refunds are demo-only today.** The refund screens read fake, disconnected sample data; turning that off + today would show a refund of the wrong amount (off by a factor of 100) for any real cancellation. + *(Effort: M)* + +### Trust — nurse verification +- **A nurse's verification badge does not reflect reality.** The verified/unverified status shown to + customers and to the nurse herself comes from a fake demo layer, not the real, already-working + verification data underneath. A genuinely verified nurse can show as unverified everywhere in the app, and + vice versa — silently hiding the real "you're not searchable yet" warning a nurse needs to see. + *(Effort: L)* + +### Patient records & visit notes +- **Everything a nurse writes about a visit, and everything a family sees about a patient's care plan, is + fake demo data.** Nothing typed in today is actually saved, and the real backend behind this expects + slightly different data than the screens send — so simply "turning the mock off" would break on day one. + *(Effort: M)* + +### Nurse pay +- **A nurse's earnings/payout screens show fake numbers**, hiding four features that already work for real + underneath. There's also no button anywhere to actually run the "send the money" step — the one + irreversible action in the whole payout process has no interface at all — and the "paid" status shown to a + nurse can be wrong (it's set as soon as a payout is linked, not when it's confirmed to have gone through). + *(Effort: M)* + +### Partner / business-center accounts +- **The whole "partner business center" section is fake, with zero real account matching.** Any signed-in + user who opens it resolves to the same one fake center regardless of who they are, and several of its core + pages (its own booking list, its own settlement report) don't exist on the server at all yet. This matters + more than it sounds — see [forgotten-features.md](forgotten-features.md) for why the business plan leans on + this feature specifically. *(Effort: L)* + +### Search +- **Search results aren't de-duplicated nurses — they're raw pricing-option rows.** One nurse with 3 services + in 3 areas shows up as "9 nurses." The trust information on a result card is also fake, and a nurse who + isn't verified yet can still be opened directly and shown as "verified" if you know her profile link. + *(Effort: M)* + +### Data safety +- **Editing a saved home address can silently wipe out the recipient's name and phone number** on every save, + because the edit form never collects those fields but the save action clears them anyway. *(Effort: S)* + +### Booking lifecycle +- **A booking whose remaining visits get automatically marked "missed" can get stuck forever** and never + reach a state where the nurse can actually be paid for the visits she did complete. The "today's visits" + list nurses see is also unfiltered — it shows a nurse's entire history, not just today. *(Effort: M)* + +### Reviews +- **A real review can never actually go live.** It gets submitted and saved correctly, but the approval step + that would publish it sits behind the broken admin-access problem above, so nothing ever gets un-stuck. + *(Effort: S once admin access is fixed)* + +### Catalog / pricing +- **Outside of the developer's own local setup, there are zero service categories or pricing options + configured at all**, and there is no admin page to add them — only direct database editing. Deployed as-is, + every "choose a service" screen collapses to a nearly useless two-step form. *(Effort: M)* + +--- + +## B. Before a real stranger's real money touches this + +These hold regardless of whether every item in section A gets fixed first. + +1. **Rotate every credential currently committed to the codebase** — the database password, both encryption + keys, and the API keys for SMS/maps/banking-lookup/bot services. This is a deliberate, known trade made to + ship a demo fast; it must be undone before onboarding real users. One of these — the key that encrypts + personal data like phone numbers and addresses — can't just be swapped; changing it requires re-encrypting + everything already stored under the old one first, so treat that specifically as its own small project, + not a quick config edit. +2. **Turn off developer/debug mode on the live site.** Right now, the deployed site runs in a mode meant for + local development. The single biggest consequence: **anyone who knows a person's phone number can read + their login code directly from a public link** and sign in as them. This has to be closed before real + strangers can reach the site. +3. **Get real legal review of the Terms of Service and Privacy Policy.** They currently ship as placeholder + text behind a visible "draft" banner. +4. **Finish the real e-invoicing (مودیان) hookup.** The invoice data and tax math are already correct; the + actual government-facing integration that registers each invoice isn't wired up yet, and the business plan + calls this required, not optional, scope. +5. **Obtain "e-namad" certification.** This is a business/paperwork step, not a code change — but a monetized + Iranian website legally cannot get a real payment gateway without it, so nothing in item 6 below or in the + card-payment blocker above can go fully live until this exists. +6. **Build a real bank-transfer system for paying nurses.** Every other "fake" system in the app (SMS, maps, + card payments, identity checks) already has a real version written and just needs real credentials to + switch on. Paying nurses is the one exception — there is no real version yet at all. Even after everything + else on this page is fixed, **nurses still can't actually be paid** until this is built from scratch. diff --git a/mvp/forgotten-features.md b/mvp/forgotten-features.md new file mode 100644 index 0000000..a93366e --- /dev/null +++ b/mvp/forgotten-features.md @@ -0,0 +1,88 @@ +# Forgotten features — gaps that should probably be in the MVP plan + +This is not the full backlog. It's a short, opinionated list of things that are easy to lose track of because +they don't show up as a bug in the app (there's nothing to click and see broken) — they're missing consoles, +missing channels, or missing business steps that the product's own plan implies are needed, but that aren't +clearly assigned to anyone right now. + +--- + +## Worth reconsidering for MVP + +**Nurses have no real way to get paid.** This is also in [blockers.md](blockers.md), but it's worth +separating out as a planning gap, not just a bug: every other "fake" integration in this app (SMS, maps, card +payments, identity checks) already has a real version written and waiting for credentials. Paying nurses does +not — there is no real bank-transfer integration at all, for any provider. A home-nursing marketplace whose +nurses can't be paid isn't really an MVP yet, so this deserves to be sized and scheduled as new work, not +discovered late. + +**Nobody can actually approve a nurse, even after admin login gets fixed.** The nurse-verification approve/ +reject buttons in the admin console point at server actions that don't exist yet. Fixing the admin-permission +bug (the #1 item in blockers.md) will not make this work — it's a second, separate piece of missing work, +easy to assume is "included" in the RBAC fix when it isn't. + +**Nobody can review a refund before it happens.** Today, an admin action that creates a refund also executes +it in the same step — there is no preview/approve/reject step, the way there is for other sensitive actions. +For a marketplace holding customer money in escrow, having no human-review gate before money moves back out +is worth a second look before launch, not just "eventually." + +**There's no way to confirm whether a nurse payout actually succeeded or failed.** The system can generate a +payout batch, but there's no console action to record "the bank transfer bounced" and reconcile it. Combined +with the point above about there being no real bank-transfer system yet, payouts as a whole need a fresh look +before this ships. + +**Partner business centers — the business plan's stated fast, legal path to market — are 100% fake today**, +with no real tenancy, no real onboarding, and several of the pages a partner would need (their own booking +list, their own settlement report) not built server-side at all. This is flagged as a blocker, but it's worth +naming explicitly as a *feature* gap too: if the go-to-market plan depends on partnering with already-licensed +nursing centers, someone needs to own building the actual partner-facing product, not just unblocking the +admin side of it. + +**Only in-app notifications exist — no SMS or push.** That's a fine trade in general, except two flows are +genuinely time-boxed: a nurse has roughly a day to respond to a booking request, and a customer has 30 minutes +to pay once accepted. If nobody has the app open when that window opens, they simply miss it, silently. Worth +a deliberate call on whether at least these two moments need a text message, rather than leaving it as "no +SMS/push, full stop." + +**There's no way to search for a nurse by name.** Only category, city, gender, and price filters exist. Minor +on its own, but combined with the fact that search results aren't de-duplicated yet (see blockers.md), a +returning customer who wants to rebook "the nurse she had last time" currently has no reliable way to find her +again by name. + +**The legal/compliance items already called out in blockers.md** — real Terms & Privacy copy, the +مودیان e-invoicing hookup, and e-namad certification — are as much "features not yet built" as they are +blockers. Listed here again only so they don't get read as pure security/ops cleanup and quietly deprioritized +relative to product features. + +--- + +## Deliberately cut — already decided, listed only so they don't get re-litigated + +Everything below was already, explicitly ruled out of MVP scope by an earlier product or engineering decision. +None of it is "forgotten" — it's recorded here as a single short list so a planning conversation doesn't +accidentally re-open one of these by mistake. + +- **"Nurses near me" (GPS-radius map search)** — coverage stays named-district-only, by design, permanently. +- **Recurring / subscription bookings** — one-off bookings only for now. +- **Company / organization accounts** (a business paying for multiple employees' care) — not modeled yet. +- **Holiday/surge pricing, and a distinct "daily companionship" pricing tier** — out of scope per the pricing + business rules. +- **Two-way, double-blind reviews** — reviews are one-way (customer → nurse) only, by design. +- **Automated fraud scoring** — manual suspension plus support alerts cover this for now. +- **Automated license/credential lookup with the medical licensing authority** — manual verification is the + intended MVP path; no public lookup API is confirmed to even exist yet. +- **In-app calling/dialer for emergencies** — the emergency contact is a plain phone-dial link on purpose, not + a built-in calling feature. +- **Offline/installable app mode** — marked optional from the start. +- **Scaling infrastructure** (a shared cache, a dedicated search engine, an analytics warehouse) — today's + single-server setup is correct at MVP scale; each has a specific, measurable trigger for when to revisit it, + not a date. +- **An automated holiday calendar feed** — a yearly manual top-up is an acceptable trade for now. +- **Collecting a customer's national ID** — deliberately never gated on this, by design. +- **On-demand/instant nurse payout, or a different payout schedule per nurse** — one fixed weekly cycle for + everyone is the MVP design. +- **Automated recovery of clawed-back money beyond simple netting against the next payout** — the simple + version covers MVP. +- **A true desktop-width layout** — the phone-width layout is the whole app's deliberate design for now. +- **Partner centers signing themselves up online** — centers are onboarded manually for now, separate from the + partner-center product gap called out above. diff --git a/mvp/test-flows.md b/mvp/test-flows.md new file mode 100644 index 0000000..21b6ae6 --- /dev/null +++ b/mvp/test-flows.md @@ -0,0 +1,486 @@ +# Test flows — walk the app like a real user + +No engineering knowledge needed. Every flow below is a short list of clicks and taps you can do yourself on +the live demo site, plus what you should expect to see, and any known problems along the way. + +## Before you start + +**Site:** open **https://balinyaar.ir** in your browser (the API behind it is `api.balinyaar.ir` — you won't +need to touch that directly except for one step below). + +**How to log in — every flow below starts here:** +1. Go to the login page and enter one of the demo phone numbers below. +2. Tap "send code." You will **not** receive a real text message — this is a test environment. +3. To read the code, open this link in a new browser tab, replacing the number with the one you used: + `https://api.balinyaar.ir/api/v1/dev/last_otp/09120000010` — a page appears with a `"code"` field. Copy + that 6-digit number. +4. Type the code into the app. + +**Two things that will trip you up if you don't know them:** +- **Only one person can be signed in to a given demo account at a time.** If a colleague logs into + `09120000010` on their laptop while you're using it on yours, you'll be silently signed out. +- **The demo data ages on its own.** A pending booking request, for example, auto-expires after a while. If a + flow below says "find a pending request" and there isn't one, just create a fresh one yourself — the steps + for that are in "Requesting a Booking" below. + +### Demo accounts + +| Phone | Who | Notes | +| --- | --- | --- | +| `09120000001` | Nurse — زهرا عزیزی (f) | Verified, has priced services, covers most of Tehran | +| `09120000002` | Nurse — علی کریمی (m) | Verified, sponsored by a partner business center | +| `09120000003` | Nurse — مریم احمدی (f) | **Not verified yet** — should never appear in customer search | +| `09120000010` | Customer — سارا محمدی (f) | 2 people in her care circle, 1 saved address, owns most seeded bookings | +| `09120000011` | Customer — رضا حسینی (m) | 1 infant patient, owns the installment-plan bookings | +| `09120000020` | Admin (full) — نگار مدیری (f) | Can log in, but admin actions don't work yet — see [blockers.md](blockers.md) | +| `09120000021` | Admin (finance) — کامران مالی (m) | Same admin caveat as above | +| `09120000030` | Customer who owns a partner business center — بهنام رستگار (m) | Logs in as a normal customer, then opens the partner section by typing its address directly — nothing in the app links to it | + +--- + +## Signing in and the public landing page + +### Logging in with a phone number +**Who tests this:** everyone (new visitors, customers, nurses, admins) +**Status today:** ⚠️ Works, but has known issues + +1. While logged out, try opening a nurse-only page (like "Today's Visits"). You should be sent to the login screen instead. +2. On the login screen, enter phone number `09120000010` and request a code. Expect a 6-box code screen with a countdown timer. +3. Read the code as described above and type it in. Expect it to auto-submit and take you to the family home screen (not the nurse page you originally tried). +4. Repeat with `09120000001` (زهرا عزیزی, nurse). This time you should land on the nurse's "Today's Visits" screen instead. +5. Try entering a wrong code five times in a row. Expect a lockout message; requesting a new code should still work. +6. Log in as `09120000020` (نگار مدیری, admin). Login itself succeeds, but admin features don't work (known blocker). + +**What you should see:** each account type lands on its correct home screen after login, and a page you tried to reach before logging in is remembered and opened afterward. + +**Known issues:** +- Admin accounts can log in but can't actually do anything yet (known blocker — see [blockers.md](blockers.md)) +- After too many wrong codes, the "try again later" message is wrongly shown as "wrong code" +- Logging out on one device signs that account out everywhere, with no option to choose just one device + +### The guest landing page (before logging in) +**Who tests this:** anyone not logged in yet (a guest visitor) +**Status today:** ⚠️ Works, but has known issues + +1. Open the app in a private/incognito browser window so you're logged out. +2. Visit the home page. Expect a marketing landing page: what Balinyaar is, service category tiles, a "how it works" explainer, trust information, and a sign-up button for nurses. +3. Open the Terms and Privacy pages from the footer. Expect placeholder legal text with a draft banner — not final legal copy yet. +4. While still logged out, try opening a private page like "My Bookings." Expect to be sent to the login screen, and after logging in, expect to land back on the page you originally tried. + +**What you should see:** the landing page loads properly, legal pages show draft text, and any private page tried while logged out sends you to log in first, then returns you there afterward. + +**Known issues:** +- There's no way yet to search or browse nurses without logging in first — that part isn't built +- A nurse's profile photo never actually loads for anyone, including guests +- A nurse who hasn't been verified yet can still be viewed directly if you know/guess her profile link, even though she should never be publicly visible + +--- + +## Setting up an account + +### New customer setup (choosing "family," adding your first person, filling in your profile) +**Who tests this:** customer (new user) +**Status today:** ⚠️ Works, but has known issues + +1. Log in as `09120000010` (سارا محمدی, customer) — see "How to log in" above. +2. Open the home page. This account is already fully set up, so expect to land directly on the normal home screen (not a setup wizard), with her 2 people already listed. +3. Open Account settings. Expect her name, masked phone number, and emergency contact already filled in. +4. Note: every demo account is already onboarded, so the true first-time experience needs a brand-new phone number not in the list above. A first-time login instead walks you through picking "I need care" vs. "I am a nurse," then who you're arranging care for, then later nudges you from the home page to fill in your own contact and emergency details. + +**What you should see:** an already-set-up account goes straight to its home page; a brand-new account is walked through picking a role, adding its first person, and is reminded afterward (via a home-page card) to finish its own contact details. + +**Known issues:** +- Saving any one part of Account settings re-saves the whole form, so an old, unrefreshed screen can silently overwrite your name with an outdated value +- There's no way to set your own gender anywhere in the app +- The page that lets you add the nurse role to your account has no warning before permanently changing your account — best not to open it just to look + +### New nurse setup (profile, bank account, and going live) +**Who tests this:** nurse +**Status today:** ⚠️ Works, but has known issues + +1. Log in as `09120000001` (زهرا عزیزی, verified nurse) — see "How to log in" above. +2. Open the nurse dashboard. Expect a setup checklist — but it will wrongly show verification as incomplete even though this nurse is actually fully verified (known blocker). +3. Open the nurse's profile page, edit the bio text, and save. Expect a success message, still there after refreshing. +4. Open the bank account page. Expect one card showing a verified account. +5. Try adding that same bank account number again. Expect a vague "couldn't register" error rather than a clear "already registered" message. +6. Open the public profile preview. Expect the profile photo to show a placeholder icon instead of a real photo. + +**What you should see:** profile edits and bank details save correctly for real, but the setup checklist and any "profile not active" warning are unreliable and don't reflect this nurse's true, already-verified state. + +**Known issues:** +- A nurse's verification status shown on screen doesn't reflect their real state — it always looks incomplete (known blocker — see [blockers.md](blockers.md)) +- Profile photos never actually display anywhere, always a placeholder icon +- Adding a duplicate bank account shows a vague error instead of saying it's already registered +- All seeded nurse accounts already have a profile and bank account, so the very first-time setup screens can't be tested with the demo accounts + +### Saved addresses & the map pin +**Who tests this:** customer +**Status today:** ⚠️ Works, but has known issues + +1. Log in as `09120000010` (سارا محمدی, customer) — see "How to log in" above. +2. Open Account settings → "Manage addresses" (or go straight to the addresses page). Expect one saved address ("Home"), marked as primary, showing a registered pin. +3. Add a new address: pick a province and city, tap the map area to drop a pin, fill in the street line, and save. Expect it to appear in the list tagged "pin saved." +4. Set the new address as primary. Expect the primary badge to move to it (never two at once). +5. Delete the test address when done. +6. Try picking a province other than Tehran when adding an address — the map area may open centered on the wrong, empty spot instead of near that city (known issue). + +**What you should see:** adding, editing, setting-primary, and deleting addresses all work and save for real. The map for choosing a location is currently just a simple tap-to-place grid, not a real interactive street map yet. + +**Known issues:** +- Editing a saved address can silently erase the recipient's name and phone number (known blocker — see [blockers.md](blockers.md)) — don't edit the pre-existing "Home" address for this reason; test with a newly added one instead +- Outside Tehran, the map area often opens in the wrong location, far from the real city +- The real interactive map (with street search and real tiles) isn't turned on in this test environment yet + +### Care circle & patient records +**Who tests this:** customer (nurses write visit notes on their side of the same records) +**Status today:** ⚠️ Works, but has known issues + +1. Log in as `09120000010` (سارا محمدی, customer) — see "How to log in" above. +2. Open the "care circle" page. Expect two people listed: فاطمه محمدی and حسن محمدی. +3. Add a new person. Expect it to appear in the list immediately with a success message. +4. Archive one of the people (not delete). Expect it to disappear from the list with a confirmation message — it isn't gone forever, and any of their existing bookings keep working. +5. Tap a person to open their detailed record (medications, routine, visit history, tasks tabs). + +**What you should see:** the list of people you arrange care for is fully real — adding, editing, and archiving all save properly. Opening a person's detailed record shows placeholder demo information, not real saved data. + +**Known issues:** +- Patient medical records and nurse visit notes are entirely fake demo data right now (known blocker — see [blockers.md](blockers.md)) +- Editing a person's details and saving can accidentally reset their birth date to January 1st of their birth year + +--- + +## A nurse's professional profile + +### Nurse service coverage areas +**Who tests this:** nurse +**Status today:** ⚠️ Works, but has known issues + +1. Log in as the verified nurse `09120000001` (زهرا عزیزی). +2. From her main professional hub, open "Coverage areas" — check the count shown matches the list on the next screen. +3. Try adding an area she already covers (same city, "whole city") — expect an inline warning, and nothing gets added. +4. Add a brand-new district inside a city she already covers as "whole city" — expect it to save and appear as a new tag. +5. Remove one of the areas and confirm the deletion in the popup. + +**What you should see:** the list of covered cities/districts updates instantly after adding or removing one, and a warning message blocks true duplicates. + +**Known issues:** +- A nurse can end up covering both "whole city" and one specific district of that same city at the same time — when that happens, she shows up twice in search results for that district (known blocker — see [blockers.md](blockers.md)) +- If this screen fails to load properly, it wrongly displays "no coverage areas yet," which could make a nurse think she's invisible in search when she isn't +- There's no way to edit an area — only remove and re-add, and she briefly disappears from search in between + +### Nurse verification (ID & credential checks) +**Who tests this:** nurse; admin (the admin part is broken) +**Status today:** ❌ Mostly fake/broken — not really testable yet + +1. Log in as `09120000003` (مریم احمدی), the nurse who is deliberately not yet verified. +2. Open her verification screen — a step-by-step checklist appears, plus an on-screen "simulate admin review" panel with approve/reject buttons. +3. Fill in the identity and credential steps, then tap the fake "approve" button. Expect the screen to turn green ("approved") — but reload the page and it resets, because none of this reached the real system. +4. Log in as admin `09120000020` and open the admin verification queue — it shows nurses waiting for review, but this is also sample data, and the real approve/reject actions don't work. + +**What you should see:** the on-screen experience looks like a complete, working verification journey, but nothing you do here changes any nurse's actual verification status. + +**Known issues:** +- The whole nurse-facing screen currently shows made-up demo data instead of the real system, so a nurse cannot actually be verified through the app today +- A nurse's verification badge shown to users doesn't reflect her real, actual state (known blocker — see [blockers.md](blockers.md)) +- Admin accounts can't do anything yet, including approving nurses (known blocker — see [blockers.md](blockers.md)) + +### Setting up services & prices +**Who tests this:** nurse (results also show up when customers browse) +**Status today:** ⚠️ Works, but has known issues + +1. Log in as the verified nurse `09120000001` (زهرا عزیزی). +2. From her hub, open her services/offerings list — note how many services she currently offers. +3. Tap to add a new service and pick a category (e.g. "Elderly care"). +4. Answer the required question for that category (e.g. shift type), set a price and unit, and submit. +5. Try adding the exact same category, choices, and price again — expect an inline warning that she already offers this, instead of a duplicate. +6. Deactivate one service — expect it to stay in her own list marked inactive, but disappear from her public profile preview. + +**What you should see:** the price list updates immediately after each change, duplicates are blocked with a clear message, and deactivated services vanish from what customers can see. + +**Known issues:** +- Only a developer can add brand-new service categories or pricing choices — there's no admin page for it yet (known blocker — see [blockers.md](blockers.md)) +- If a nurse changes a price while a customer is mid-way through requesting a booking for that service, the customer could end up being charged the new price instead of the one shown to them +- Some Persian text can display with slightly different spacing than what was typed (cosmetic only) + +--- + +## Finding and booking a nurse + +### Searching for a nurse +**Who tests this:** customer +**Status today:** ⚠️ Works, but has known issues + +1. Log in as customer `09120000010` (سارا محمدی). +2. Open the search page, choose a care category (e.g. "Elderly care") and a city. +3. Tap to view results and note how many nurses are shown. +4. Tap the "verified" checkmark on a result card to see her trust details. +5. Open a nurse's profile card to browse her priced services and reviews. +6. As a check, search a category only the unverified nurse (`09120000003`) offers — expect zero results, since she must never appear. + +**What you should see:** a list of nurses matching the filters, each with a verified badge and an openable profile; the unverified nurse should never appear anywhere in results. + +**Known issues:** +- The same nurse can appear multiple times in one results list (once per price option/area combination), so a count like "9 nurses" can really mean 1 nurse repeated 9 times (known blocker — see [blockers.md](blockers.md)) +- The "verified" badge popup shows the same generic made-up credentials for every nurse, and can even say "verified" for a nurse who isn't (known blocker — see [blockers.md](blockers.md)) +- Nurse profile photos don't load and show initials instead (cosmetic only) +- There's no way to search by a nurse's name — only by category/city/gender/price filters + +### Requesting a booking +**Who tests this:** customer and nurse +**Status today:** ⚠️ Works, but has known issues + +1. The pre-loaded demo requests have all expired, so create a fresh one first: log in as customer `09120000010`, search for and open nurse زهرا عزیزی (`09120000001`), and tap "request booking". +2. Fill in a patient, a priced service, an address, a future date/time window, and a gender preference, then submit. Expect a screen showing "awaiting nurse response" with a roughly 24-hour countdown. +3. In a separate login, log in as the nurse (`09120000001`) and open her requests inbox. Find the new pending request — note she only sees a rough neighborhood, not the full address. +4. Accept the request. Expect the status to change to "accepted — awaiting payment" with a new 30-minute countdown, and the customer's screen to update automatically within about 15 seconds. +5. Try accepting the same request again — expect a friendly "no longer available" message, not a crash. +6. Optionally, submit a second request and have the nurse reject it with a short reason — expect the customer's screen to show the rejection and the reason. + +**What you should see:** a full round trip — request created, nurse notified, accepted or rejected, and the customer's screen reflecting it live — without errors. + +**Known issues:** +- The countdown timers on this flow can show the wrong time and expire early due to a timezone bug (known blocker — see [blockers.md](blockers.md)) +- A nurse with many past requests may not see all of them listed in her "already responded" tab +- The customer's booking list doesn't auto-refresh, so a countdown there can look stale until manually reloaded + +### Checkout & payment +**Who tests this:** customer +**Status today:** ⚠️ Works, but has known issues + +1. Nothing is waiting to be paid in the seeded data, so first create and get a booking request accepted (see "Requesting a Booking" above) to open a live 30-minute payment window. +2. As customer `09120000010`, open that booking's checkout/payment page. Expect a price breakdown, a live countdown, and an enabled "Pay" button. +3. Known limitation: tapping "Pay" leads to a card-payment page that doesn't exist in this test environment and dead-ends there — treat this as a known gap, not something to keep troubleshooting. +4. Instead, to see a completed example, open an already-paid booking's checkout page or its invoice page — expect an "already paid" message and a printable invoice with a price breakdown and a tax-status label. +5. Open the wallet/money page's "Payments" tab — expect it to appear empty (not an error), since payment history isn't connected yet. + +**What you should see:** everything up to pressing "Pay" behaves correctly and shows sensible numbers, but no card payment can actually be completed in this environment. + +**Known issues:** +- Card payment never actually completes in this test environment (known blocker — see [blockers.md](blockers.md)) +- The wallet's "Payments" history tab is always empty +- Installment (buy-now-pay-later) payments don't work at all yet (known blocker — see [blockers.md](blockers.md)) +- The checkout summary and the invoice can show slightly different tax amounts for the same booking + +### Booking payments in installments (buy-now-pay-later) +**Who tests this:** customers checking out a booking +**Status today:** ❌ Mostly fake/broken — not really testable yet + +Everything on these screens is fake demo data, not a real installment plan. + +1. Log in as رضا حسینی (`09120000011`) — he's the demo account tied to installment bookings. +2. Start checkout on a booking and look for a "pay in installments" option — in today's demo world, no booking is actually in a state that lets this option go anywhere. +3. Instead, open the Wallet page and tap the "Installments" (اقساط) tab to see what such a plan would look like. + +**What you should see:** a fake, made-up installment plan with sample amounts and a fake provider name — none of it is a real payment, and it resets if you reload the page. + +**Known issues:** +- Installment (buy-now-pay-later) payments don't work at all yet (known blocker — see [blockers.md](blockers.md)) +- There is no working path from checkout into the installment screens today — the wallet tab is the only way to see them +- All numbers shown (schedule, fees, provider) are invented, not calculated from a real order + +--- + +## The visit itself + +### Visit day: check-in, check-out, and care instructions +**Who tests this:** nurse (does the visit) and customer (watches from their side) +**Status today:** ⚠️ Works, but has known issues + +1. If testing on a computer away from Tehran, ask an engineer to switch the app's location check to "in range" first — otherwise every check-in you do will look like a location mismatch. +2. Log in as the nurse, `09120000001` (زهرا عزیزی), and open "Today's Visits." +3. Note: the demo data has aged out, so this screen currently shows the nurse's whole visit history mixed together, not just today's — a known issue, not a crash. +4. Open one of her bookings. Expect to see the patient's care instructions (allergies, medications, emergency contact) and a list of visit sessions. +5. To actually walk a real check-in/check-out, you need a booking with a session scheduled for today — the seeded data doesn't have one, so create a fresh booking request and get it paid first (see "Requesting a Booking" and "Checkout & Payment" above). +6. Check in to a session. Expect it to record your location and timestamp; a location mismatch (if it happens) quietly notifies the family — it never blocks or cancels the visit. +7. Check out. Expect the visit to be marked complete and the nurse's payment for that visit to start its countdown to being payable. +8. Log in as the customer (`09120000010`) and open the same booking. Expect to see the full address and a status timeline, but no check-in/check-out controls (those are nurse-only). + +**What you should see:** the nurse can see care instructions only after the booking is confirmed, can check in/out, and the customer can watch the same booking's status update — without seeing the clinical notes or check-in controls. + +**Known issues:** +- The "Today's Visits" list isn't actually filtered to today — it shows a nurse's entire history (known issue) +- A booking whose visits all got auto-marked "missed" can get stuck and never become payable for the nurse (known blocker — see [blockers.md](blockers.md)) +- The nurse currently can't see the customer's address on a confirmed booking, even though the app itself uses that address behind the scenes +- There's no way yet for a customer to submit care instructions themselves — they only exist because the demo data was pre-loaded + +### Patient care plan and nurse visit notes +**Who tests this:** customers (manage a patient's care plan); nurses (add visit notes) +**Status today:** ❌ Mostly fake/broken — not really testable yet + +Everything shown is fake demo data that resets on reload; the real feature exists behind the scenes but isn't connected yet. + +1. Log in as سارا محمدی (`09120000010`). +2. Open her care circle, pick a patient, and open their care record — four tabs appear (medications, daily routine, history, tasks), all filled with sample content. +3. Try editing something — note that reloading the page throws your change away; nothing is really saved. +4. Log in as زهرا عزیزی (`09120000001`, nurse) and open one of today's visits, scrolling past the check-in/check-out section — you'll find a checklist and a note box, again all fake. + +**What you should see:** both the family's care-plan screen and the nurse's visit-notes screen look fully working and populated, but every field is fabricated sample content, not real saved data. + +**Known issues:** +- Patient medical records and nurse visit notes are entirely fake demo data right now (known blocker — see [blockers.md](blockers.md)) +- If this were switched to real data today, nearly every patient's care plan would show up completely empty, since none have actually been filled in + +--- + +## After the visit + +### Cancelling a booking and getting a refund +**Who tests this:** customers cancelling a booking; admins processing refunds (currently broken) +**Status today:** ❌ Mostly fake/broken — not really testable yet + +The screens you'll see show fake numbers, not what you would actually get back. + +1. Log in as سارا محمدی (`09120000010`). +2. Open one of her bookings and tap "Cancel booking" (لغو رزرو). +3. Read the explanation of how much would be refunded versus kept as a fee, then continue — these numbers are demo/fake, not calculated from the real booking. +4. After confirming, you land on a refund-tracking screen — also fake, not a real refund in progress. +5. As an admin (`09120000021`), open a booking-linked support ticket and look for its refund panel — same story, fake data, and the buttons don't actually work. + +**What you should see:** a two-step cancellation flow with a policy explanation, then a refund status tracker, both populated with placeholder numbers unrelated to the real booking. + +**Known issues:** +- Refunds are demo/fake data only, not connected to real bookings (known blocker — see [blockers.md](blockers.md)) +- Admin accounts can't actually process refunds yet (known blocker — see [blockers.md](blockers.md)) +- Think twice before pressing the final "confirm cancellation" button on a demo account's only remaining bookings — it permanently cancels them for everyone testing with that account + +### Rating and reviewing a nurse after a visit +**Who tests this:** customers (write a review); admins (approve reviews — currently broken); anyone (reads published reviews) +**Status today:** ⚠️ Works, but has known issues + +1. Log in as سارا محمدی (`09120000010`). +2. Go to Bookings — only one completed booking shows a "write a review" (ثبت نظر) button; the others already have a review or aren't eligible. +3. Tap it, give a 1–5 star rating, optionally add a note and pick some tags, then submit — a notice warns it must be approved before anyone else can see it. +4. The screen then shows your review as "pending review" (در انتظار بررسی) — this part is genuinely real and saved. +5. Check a nurse's profile "Reviews" tab — only already-approved reviews show up; yours won't appear, because it's stuck waiting on approval. + +**What you should see:** submitting a review actually works for real, but it never becomes publicly visible in this demo because the approval step is broken. + +**Known issues:** +- Reviews can never actually get published yet — stuck waiting on admin approval, which is broken (known blocker — see [blockers.md](blockers.md)) +- A nurse has no screen yet to see reviews written about them + +### Nurse earnings and payouts +**Who tests this:** nurses (checking what they're owed); admin/finance (running payout batches — currently broken) +**Status today:** ❌ Mostly fake/broken — not really testable yet + +Everything on these screens is fake, even though real payout numbers do exist behind the scenes. + +1. Log in as زهرا عزیزی (`09120000001`, nurse). +2. Open her "Finance" page — the one big balance number shown is a fake demo figure. +3. Open "Earnings" and click through its tabs — sample bookings appear; tapping "view booking" on any of them leads nowhere, since those bookings don't really exist. +4. Open "Payout history" and tap into a payout's detail screen — again fake reconciliation numbers. +5. Log in as the finance admin account (`09120000021`) and open the payouts console — the batch list looks normal, but actually running or processing a batch doesn't work. + +**What you should see:** every earnings/payout screen looks fully populated and correct, but none of the numbers come from the real server — they're fixed demo values that never change. + +**Known issues:** +- Nurse payout/earnings numbers are unreliable and there's no real way to send money yet (known blocker — see [blockers.md](blockers.md)) +- Admin accounts can't actually run or process a payout batch yet (known blocker — see [blockers.md](blockers.md)) + +--- + +## Everything else + +### Messaging & support tickets +**Who tests this:** customer, nurse, and admin/support staff +**Status today:** ⚠️ Works, but has known issues + +1. Log in as the customer, `09120000010` (سارا محمدی). +2. Open the support/messages page (linked from the account page). Expect a list of message threads — one open support conversation, a couple of refund-related threads, and several auto-created "booking coordination" threads (one per paid booking). +3. Open the support conversation. Expect just the customer/staff messages — any internal staff-only notes never appear here. +4. Type a reply and send it. Expect it to appear immediately, then confirm as sent. +5. Log in as the nurse, `09120000001` (زهرا عزیزی), and open her support/messages page — same kind of list, nurse's own threads. +6. Log in as an admin (`09120000020`) and try the admin support-queue page. Expect it to fail with an access-denied error (known blocker). + +**What you should see:** customers and nurses can view and reply to their own threads normally; the admin/staff side of messaging is currently unreachable. + +**Known issues:** +- Admin ticket queue and admin view of a conversation are broken (access denied) (known blocker — see [blockers.md](blockers.md)) +- The little unread-messages counter in the header never lights up +- The inbox list doesn't show a preview of the latest message +- Auto-created booking conversations start completely empty, with nothing explaining what they're for +- Attaching files to a message isn't available yet + +### Notifications +**Who tests this:** customer and nurse (admin has no notification bell) +**Status today:** ⚠️ Works, but has known issues + +1. Log in as the customer, `09120000010` (سارا محمدی). +2. Look at the bell icon in the header. Expect a number badge showing unread notifications. +3. Tap the bell to open the notifications page. Expect items grouped by day (today/yesterday/this week). +4. Tap a "booking confirmed" notification. Expect it to jump you to that booking, and the badge count to drop by one. +5. Tap a notification about a booking request being accepted, rejected, or a missed visit. Expect nothing to happen except it gets marked as read — tapping doesn't take you anywhere (known issue). +6. Skip the "mark all as read" button unless you don't mind resetting the shared test data — it can't be undone. +7. Log in as the nurse, `09120000001` (زهرا عزیزی), and open her notifications page. Expect mostly "new booking request" notifications, none of which are tappable. +8. As an admin, there's no bell and no real notifications page — only a placeholder if you type the address directly. + +**What you should see:** the bell and unread count work, and a handful of notification types link to the right place; most others just sit there once tapped. + +**Known issues:** +- Most notification types (11 of 14) don't link anywhere when tapped — including a nurse's "you got paid" notification +- Nurses are never notified about payouts at all +- All notification text shows in English rather than Persian +- "Load more" reloads the whole list instead of adding new items +- Admins have no notifications screen worth using + +### Admin backoffice +**Who tests this:** admin accounts (super_admin and finance) +**Status today:** ❌ Mostly fake/broken — not really testable yet + +Right now every admin account gets an "access denied" error on essentially every real admin action on the +server — this is one of the biggest known blockers. The admin screens in the app look fully populated and +functional, but that's because almost all of them are showing made-up sample data built into the app, not +real information. If that fake layer weren't there, clicking any real action would fail with access denied. + +1. Log in as an admin, either `09120000020` (نگار مدیری, super_admin) or `09120000021` (کامران مالی, finance). +2. Browse the admin sections: nurse verification, review moderation, payouts, refunds, support tickets/alerts, platform settings, holidays, audit log, and partner centers. +3. Expect most sections to show full, editable-looking data, and "saving" a change to appear to work — but this is all fake, local sample data, not connected to the real system. +4. Two sections (the ticket queue and review moderation) actually try to reach the server, and both show a visible error instead of data. + +**What you should see:** a good-looking dashboard that mostly isn't real. Only two screens honestly show that something is broken; the rest hide it. + +**Known issues:** +- Admin accounts can't do anything for real yet (known blocker — see [blockers.md](blockers.md)) +- The "user directory" and "roles" admin screens have no real data behind them at all + +### Partner center +**Who tests this:** the partner-center owner (a customer account that also owns a nursing business center) +**Status today:** ❌ Mostly fake/broken — not really testable yet + +This section is 100% fake demo data — there's no real business-center account behind it yet. + +1. Log in as the customer, `09120000030` (بهنام رستگار). +2. Expect to land on the normal customer home screen — nothing in the app links you to a partner section. +3. Type the partner section's address into the browser manually to open it. +4. Browse the partner home, sponsored nurses, bookings, and settlement/earnings pages. Expect a business name, license numbers, a nurse roster, bookings, and invoices — all made-up sample data, not the real seeded business center. +5. There is no way to actually manage the real center (add/verify/suspend nurses, etc.) — those admin actions also fail with access denied. + +**What you should see:** a polished-looking partner portal where every name and number is fake and disconnected from the real database. + +**Known issues:** +- The partner business center is entirely fake demo data (known blocker — see [blockers.md](blockers.md)) +- Nothing in the app links to this section; you must type the address yourself +- There's no separate partner login — it's just a customer account that happens to own a center + +### Account & settings +**Who tests this:** every signed-in user — customer, nurse, admin, partner +**Status today:** ⚠️ Works, but has known issues + +1. Log in as the customer, `09120000010` (سارا محمدی). +2. Open the account page. Expect your name, a masked phone number, an emergency-contact card, and rows for personal info, addresses, language, appearance, notifications, support, and sign-out. +3. Toggle the appearance setting (light/dark, «نمایش»). Expect the whole app to repaint instantly and the choice to survive a page reload. +4. Change the language. Expect the app to switch language right away. +5. Edit your personal info (e.g. last name) and save. Expect a "saved" confirmation and the name to update on screen. +6. Tap sign out («خروج از حساب») and confirm. Expect to land on the login screen, with that account fully signed out everywhere, not just this device. +7. Log in as the nurse, `09120000001` (زهرا عزیزی), and open her account/settings menu. Expect similar settings, but sign-out here happens on a single tap with no confirmation — be careful. +8. As an admin, the account page shows a broken, untranslated label for the admin's role, and every admin section link on it leads to an access-denied error (known blocker). +9. The partner account page is only reachable by typing its address manually and shows a fake business name (known blocker). + +**What you should see:** appearance, language switching, editing personal info, and sign-out all genuinely work for a customer and nurse; admin and partner settings inherit the blockers from those areas. + +**Known issues:** +- If a customer hasn't saved an emergency contact yet, saving their name or language silently fails with no visible error +- The language dropdown inside personal info doesn't actually do anything (only the separate language-switch button works) +- Nurse profile pictures never load +- Sign-out has no confirmation step for nurse, admin, or partner accounts — one accidental tap fully signs you out +- Customers can't upload their own profile picture yet diff --git a/server/AGENTS.md b/server/AGENTS.md index 0ec33e6..0e4130f 100644 --- a/server/AGENTS.md +++ b/server/AGENTS.md @@ -3,11 +3,12 @@ The canonical agent guide for the backend is **[CLAUDE.md](CLAUDE.md)** (same folder): stack, commands, the quality gates, the project map, and the hard rules every change must follow. -- Reference rules, read on demand per area → [../docs/rules/server/](../docs/rules/server/) +- Current product truth (what to test, what's blocking, what's missing) → [../mvp/](../mvp/README.md) +- Reference rules, archived, read on demand per area → [../archive/docs/rules/server/](../archive/docs/rules/server/) (structure · cqrs · persistence · **money** · identity · conventions). `conventions.md` is the successor to the old `CONVENTIONS.md`, which was distilled into it. - Repo-wide context → [../CLAUDE.md](../CLAUDE.md) -- Business rules (schema, payments, escrow, verification) → [../product/](../product/index.md) +- Business rules (schema, payments, escrow, verification), archived → [../archive/product/](../archive/product/index.md) - Human setup/run instructions → [README.md](README.md) `CLAUDE.md` is the single source of truth; this file is just a pointer so the convention is diff --git a/server/CLAUDE.md b/server/CLAUDE.md index fb5f35b..6c16fa2 100644 --- a/server/CLAUDE.md +++ b/server/CLAUDE.md @@ -7,8 +7,9 @@ every piece of encrypted PII and clinical data on the platform. > Last verified: 2026-07-30 against commit `d3ec723`. - Repo-wide context and the frontend → root [CLAUDE.md](../CLAUDE.md) -- Business rules (schema, payments, escrow, verification) → [`product/`](../product/index.md). **Read the - relevant doc before designing an entity, feature, or endpoint** — don't infer a business rule from code. +- Current product truth (what to test, what's blocking, what's missing) → [`mvp/`](../mvp/README.md) +- Business rules in depth (archived reference, not actively maintained) → [`archive/product/`](../archive/product/index.md). + **Read the relevant doc before designing an entity, feature, or endpoint** — don't infer a business rule from code. --- @@ -113,7 +114,7 @@ Two pre-existing warnings are expected and must **not** be "fixed" unless a task 27. **Register infrastructure through a `ServiceConfiguration/` extension method** called from `Program.cs`. No inline registration; `Program.cs` stays an orchestrator. 28. **A mock lives behind a DI-registered seam, selected by config, defaulting to the mock.** Never an - `if (mock)` in a handler. Record every mock in `docs/status/`. + `if (mock)` in a handler. Record every mock in [`mvp/blockers.md`](../mvp/blockers.md). 29. **No dead code** (the gate is zero new warnings) and **comment the *why*, never the *what*.** 30. **When you change the architecture, update the Project map below in the same change.** @@ -123,7 +124,7 @@ Two pre-existing warnings are expected and must **not** be "fixed" unless a task The canonical list of projects, layers, and cross-layer dependencies — **14 `.csproj` projects, 55 V1 controllers.** Expanded, with the seam catalogue and startup wiring, in -[`docs/rules/server/structure.md`](../docs/rules/server/structure.md). +[`docs/rules/server/structure.md`](../archive/docs/rules/server/structure.md). ``` src/ @@ -173,12 +174,12 @@ Open **one** of these for the area you are touching. | Working on… | Read | | --- | --- | -| Projects, layers, startup wiring, the seam catalogue, observability | [docs/rules/server/structure.md](../docs/rules/server/structure.md) | -| Adding a feature — command, query, handler, validator, controller | [docs/rules/server/cqrs.md](../docs/rules/server/cqrs.md) | -| EF Core, audit, state machines, uniqueness, snapshots, search, jobs, seeders | [docs/rules/server/persistence.md](../docs/rules/server/persistence.md) | -| **Anything on the money path** — ledger, refunds, BNPL, payouts, invoices | [docs/rules/server/money.md](../docs/rules/server/money.md) | -| Auth, JWE, sessions, field encryption, tenancy, disclosure, logging | [docs/rules/server/identity.md](../docs/rules/server/identity.md) | -| C# style, naming, async, error handling, tests, DI | [docs/rules/server/conventions.md](../docs/rules/server/conventions.md) | -| The wire contract — envelope, status codes, enums, pagination | [docs/integration/](../docs/integration/index.md) | -| What is built, what is mocked, what is next | [docs/status/](../docs/status/index.md) | -| Cross-project rules — naming, gates, code quality, config | [docs/rules/shared/](../docs/rules/shared/) | +| Projects, layers, startup wiring, the seam catalogue, observability | [docs/rules/server/structure.md](../archive/docs/rules/server/structure.md) | +| Adding a feature — command, query, handler, validator, controller | [docs/rules/server/cqrs.md](../archive/docs/rules/server/cqrs.md) | +| EF Core, audit, state machines, uniqueness, snapshots, search, jobs, seeders | [docs/rules/server/persistence.md](../archive/docs/rules/server/persistence.md) | +| **Anything on the money path** — ledger, refunds, BNPL, payouts, invoices | [docs/rules/server/money.md](../archive/docs/rules/server/money.md) | +| Auth, JWE, sessions, field encryption, tenancy, disclosure, logging | [docs/rules/server/identity.md](../archive/docs/rules/server/identity.md) | +| C# style, naming, async, error handling, tests, DI | [docs/rules/server/conventions.md](../archive/docs/rules/server/conventions.md) | +| The wire contract — envelope, status codes, enums, pagination | [docs/integration/](../archive/docs/integration/index.md) | +| What is built, what is mocked, what is next | [docs/status/](../archive/docs/status/index.md) | +| Cross-project rules — naming, gates, code quality, config | [docs/rules/shared/](../archive/docs/rules/shared/) | diff --git a/server/README.md b/server/README.md index 5691ca8..b30e154 100644 --- a/server/README.md +++ b/server/README.md @@ -10,8 +10,8 @@ Backend API for the Balinyaar application. It is an **ASP.NET Core (.NET 10)** s - Observability out of the box: Serilog, OpenTelemetry, Prometheus metrics, health checks > Looking for an architecture/file map to navigate the code? See [CLAUDE.md](CLAUDE.md) (the project map -> and the hard rules) and [../docs/rules/server/](../docs/rules/server/) (the coding rules, one file per -> area — `conventions.md` is the successor to the former `CONVENTIONS.md`). +> and the hard rules) and [../archive/docs/rules/server/](../archive/docs/rules/server/) (the coding rules, +> one file per area — `conventions.md` is the successor to the former `CONVENTIONS.md`). ## Requirements