Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
2.0 KiB
Module Boundaries
Architecture only. Module inventory → module-registry.md
Core Platform
Owns: tenants, domains, plans, features, subscriptions, entitlement checks, service/module registry, internal service tokens, outbox/inbox (core), audit log, core users, tenant memberships (operational), onboarding, public tenant-site resolution.
Must not own: business journals, CRM entities, restaurant menus, file blobs, SMS campaigns.
Identity & Access
Owns: user profiles linked to Keycloak, identity-layer memberships, OIDC BFF (config/token/me), mobile OTP handoff/session redeem, Keycloak admin sync.
Must not own: workspace onboarding lifecycle, plan/subscription, operational tenant roles source of truth (Core).
Frontend
Owns: UI, theme application, client-side auth redirects, dashboards, onboarding wizard UX.
Must not own: business rules, direct DB access, SQLAlchemy/Alembic, entitlement computation.
Future Business Modules
Each module (Accounting, CRM, Restaurant, Ecommerce, …) owns its database and domain APIs. Cross-module coupling is API/event only. Financial postings go only through Accounting Posting Engine (ADR-010).
Shared Library (backend/shared-lib)
Owns: JWT validation helpers, phone normalization, event envelope types, shared exceptions/responses.
Must not own: tenant business workflows or service-specific repositories.
Boundary Rules
- No cross-database foreign keys.
- No importing another service's models.
- Feature gates use Core entitlement API.
- Frontend talks to public/versioned APIs only.
- Providers are integrated behind module/provider adapters — see integration-architecture.md.