Architecture

A smaller system with harder boundaries.

The prototype mixed analytics, settings, docs, demo, admin, and public ingestion over time. The production rebuild keeps only the core RetentBase flows and separates them into server-side domain modules with one SQL migration as the database source of truth.

core

Environment parsing, Supabase clients, request parsing, crypto, and URL safety checks.

workspaces

Workspace membership, API key auth, reason configuration, and signing-secret derivation.

cancellations

Hosted cancel-link flow, public start/complete APIs, result token verification, and custom ingestion.

issues

Issue detection summaries, current issue state, and review workflow updates.

billing

Plan policy, write restrictions, usage checks, and Stripe sync scaffolding.

webhooks

Signed outbound customer webhooks with SSRF validation and delivery attempt audit rows.