Part 4 · How it is built
Technical Architecture & Backend Requirements
Modular storefront plus isolated scanners. Lovable Cloud is the current system of record. Clerk + Neon + Vercel is the planned independent stack.
Canonical spec v1.2 · Phase 0 runtime: Lovable Cloud
Architecture recommendation
TanStack Start storefront on Lovable hosting. Lovable Cloud provides Postgres, Auth, Storage, and server functions. Scanner jobs must stay isolated from production credentials. Export Cloud data on a schedule so JusticeBridge can leave.
Target architecture from the spec: marketplace control plane as a modular monolith; untrusted scanning in short-lived workers with default-deny egress; PostgreSQL as catalog source of truth; object storage for evidence bundles — never large artifacts inside the database.
Logical systems
| System | Responsibility |
|---|---|
| Storefront PWA | Catalog, listing, install coach, Trust Center |
| Publisher portal | Domain challenge, disclosures, scan reports, versions |
| Scan farm | Isolated manifest, header, SW, destination, and agent-manifest checks |
| Trust service | Evidence bundles, tiers, drift, revocation |
| Review console | Queue, reason codes, sanctions, appeals |
| Commerce | Deferred. Link-out only until funds-flow memo. |
Release state machine
DRAFT → SUBMITTED → IDENTITY_CHECK → SCANNING → NEEDS_FIX / REVIEW → APPROVED → PUBLISHED → MONITORING. Exceptional: QUARANTINED, SUSPENDED, WITHDRAWN, REPLACED, REVOKED. Live-origin drift creates OBSERVED_CHANGE and can drop trust until evidence is current.
Security model
- RLS on every organization-owned table. Cross-tenant negative tests.
- Scanner environments get no production secrets.
- Signing keys for trust reports live in Lovable Secrets, never in git.
- Aether does not claim one permanent hash for a dynamic origin.
Launch NFRs
- Catalog API p95 <300 ms cached.
- Automated preflight p95 <15 minutes for supported scans.
- Critical containment to read paths <5 minutes.
- RPO ≤15 min and RTO ≤4 h for catalog after we control backups.
- WCAG 2.2 AA target on public marketplace and install flows.