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>
33 lines
1.2 KiB
Markdown
33 lines
1.2 KiB
Markdown
# Compliance Architecture
|
|
|
|
## Principles
|
|
|
|
1. **Compliance is independent** of UI fashion and optional modules — controls remain even if a feature UI changes.
|
|
2. Every business action that matters is **auditable** (`audit_logs`).
|
|
3. Financial postings only through **Posting Engine** ([ADR-010](adr/ADR-010.md)).
|
|
4. Regulated connectors (e.g. tax authority / سامانه مؤدیان) live behind Accounting/compliance adapters — never scatter across modules.
|
|
|
|
## Audit Log
|
|
|
|
Core `audit_logs` captures `tenant_id`, actor, action, resource, metadata, IP, user agent.
|
|
|
|
Modules should emit domain events and/or write their own audit trails for module-owned resources; never skip tenant context.
|
|
|
|
## Accounting Compliance (future)
|
|
|
|
- Double-entry integrity
|
|
- Cost centers / projects as dimensions
|
|
- Tax and e-invoicing providers via provider registry
|
|
- No direct `JournalEntry` creation outside Posting Engine
|
|
|
|
## Data Isolation
|
|
|
|
Cross-tenant reads for “support” require platform_admin controls and must be logged.
|
|
|
|
## Related Documents
|
|
|
|
- [Security Architecture](security-architecture.md)
|
|
- [ADR-010](adr/ADR-010.md)
|
|
- [Phases / Accounting](../phases/Accounting/README.md)
|
|
- [Project Principles](../development/project-principles.md)
|