Work / Seedha Ghar / Wiki / Concepts
design-principles
Conceptcanonicalverified 2026-07-22
CONCEPT.DESIGN-PRINCIPLESArchitecture
System-level design. Reads .context/wiki/ as source-of-truth for what the app does; encodes how it does it.
Files
| File | Purpose |
|---|---|
| overview.md | Subsystems, data flow, key invariants, service boundaries |
| flows.md | Five load-bearing sequence flows (publish, unlock, 30-day takedown, review queue, complaint/refund) |
| non-functional.md | Regulatory constraints, SLOs, observability, cost ceilings, open questions |
Design principles (load-bearing)
- Server-authoritative money. Wallet debits, unlock atomicity, refunds — all in
apps/api. Web and mobile request an action; the server decides. Never trust a client-computed balance. - Visibility mask is a server-side projection. Locked vs unlocked property detail is the same record.
apps/apistrips masked fields based on the buyer's unlock ledger before responding. Frontend cannot un-mask. - State machine over booleans. Listing state (
draft/in_review/needs_changes/live/expired/paused/sold/removed) is one enum with an explicit transition table. No parallel flags. - Everything reviewable is versioned. Publish, renew, and edit each create a new
ListingVersion. TheListingpoints at its latest approved version. The reviewer sees the diff. - CATALOG is the single source of copy + prices.
packages/copyis code-generated from.context/wiki/entities/catalog.md; UI never hard-codes strings or amounts. Drift is caught in CI. - Every admin/reviewer write emits an AuditEvent. No exceptions. This is how we survive a DPDP or NCDRC audit.
- Cost < ₹5,000/month until 1000 active users. If a subsystem breaks this, we redesign the subsystem, not raise the ceiling.
Cross-references
- Product intent:
../product/spec.md,../product/catalog.md - Regulatory constraints:
../product/regulatory.md - Tech stack decisions:
../tech-stack/(to be written in step 4 — architecture here calls out which subsystem is needed; step 4 locks what each one is built with) - Screens the architecture must serve:
../product/screens.md