📄️ Code Documentation Index
Canonical implementation documentation for the SalesArck monorepo, derived from the current source code.
📄️ Repository Structure
Monorepo topology and package boundaries for salesarck-monorepo.
📄️ Backend Runtime
API startup, middleware execution order, and route topology.
📄️ Auth, Tenant, and RBAC
Authentication, role derivation, tenant isolation, and permission enforcement.
📄️ Email Notifications
Resend-backed email flows used by the API.
📄️ Merchant Onboarding
Merchant account approval, workspace bootstrap, and onboarding wizard flow.
📄️ POS Integrations
Square and Clover OAuth, webhook processing, polling fallback, and adapter architecture.
📄️ Ingestion, Wallet, and Rewards
End-to-end pipeline from POS transaction to wallet ledger and redemption.
📄️ Data Model and Migrations
Drizzle schema domains, constraints, and migration progression.
📄️ Frontend Architecture
Route model, auth state handling, and role-driven UX behavior in apps/web.
📄️ Observability and Error Handling
Correlation IDs, logging, Sentry, redaction, and API error normalization.
📄️ Deployment and Environments
Deployment topology, environment contract, and scheduled processing model.
📄️ Testing and Quality
Current automated coverage, quality gates, CI/CD pipelines, and gaps.
📄️ Dependencies
Current workspace packages and the main external libraries they rely on.
📄️ Git Evolution Timeline
High-level evolution of the current implementation.