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>
1.4 KiB
1.4 KiB
Integration Architecture
Inter-Service Channels
Only these channels are allowed (ADR-001):
- Versioned REST API
- Webhook
- Async Event (message bus / outbox worker)
- Outbox/Inbox pattern
Internal Auth
Services authenticate with Internal Service Tokens (hashed in internal_service_tokens, scoped).
External Providers
External systems (SMS, payment, storage, tax) integrate through provider adapters registered in provider-registry.md. Modules must not hardcode vendor SDKs into domain services without a provider boundary.
Current known providers
| Provider | Use |
|---|---|
| Payamak | SMS OTP |
| Keycloak | IdP / SSO |
| Let's Encrypt + Certbot | TLS certificates |
| S3-compatible (planned) | File storage |
BFF Pattern
Identity & Access acts as BFF for OIDC token exchange and Keycloak theme handoff so browser secrets stay constrained.
Frontend Integration
Frontend uses typed API clients (lib/api.ts primary; lib/api-client.ts may exist for narrower helpers). Never call databases from the browser.