06. Domain Architecture: The Skeletal Map (MOCKUP)
Status: Auto-Generated by
index-architecture.tsDrift Detected: ⚠️ 2 Orphans, 1 Zombie
This document is the "Living Map" of the application. It connects the Intent (Capabilities) to the Implementation (Code/Data).
1. Finance Module (L1: Vertical)
Path: packages/modules/finance
📒 Sub-Module: Ledger (L2)
Summary: The double-entry bookkeeping core.
⚡ Capabilities (The Feature)
- [FIN-GL-JOURNAL] Manual Journal Entry creation
- Implementation:
finance/src/ledger/service.ts(createJournalEntry) - Access:
AccountingDepartment - Data Used:
JournalEntry,Account - Triggers Event:
SIG-FIN-JOURNAL-POSTED
- Implementation:
💾 Data Entities (The Structure)
- [JournalEntry]: A set of balanced debits/credits.
- Schema:
finance/src/ledger/schema.ts - Relations:
HasMany List<LedgerEntry>,BelongsTo Account
- Schema:
- [Account]: A chart of accounts node.
- Schema:
finance/src/ledger/schema.ts
- Schema:
🔌 Interface (The Skin)
POST /api/finance/journal-> Maps to[FIN-GL-JOURNAL]GET /api/finance/ledger/{id}-> Maps to[FIN-GL-VIEW]
📡 Nervous System (Events)
- [SIG-FIN-JOURNAL-POSTED]
- Triggered By:
createJournalEntry - Listeners:
AuditLog,BudgetWatchdog
- Triggered By:
2. Operations Module (L1: Vertical)
Path: packages/modules/operations
🛠️ Sub-Module: Maintenance (L2)
⚡ Capabilities
- [OPS-WO-SUBMIT] Request Work Order
- Implementation:
operations/src/maintenance/service.ts - Access:
Resident
- Implementation:
- [OPS-WO-ASSIGN] Dispatch Ticket
- Implementation:
operations/src/maintenance/service.ts - Access:
Dispatcher
- Implementation:
⚠️ ARCHITECTURAL DRIFT DETECTED
The Indexer found code that doesn't match the design.
- 👻 Zombie Capability:
[OPS-WO-ARCHIVE]- Issue: Tag exist in
service.tsbut is NOT registered in the Master Matrix. - Action: Register it or delete the dead code.
- Issue: Tag exist in
- 🚧 Orphaned Route:
DELETE /api/operations/ticket/{id}- Issue: This API route exists but has NO
@captag. - Risk: Who is allowed to call this? What capability does it serve?
- Issue: This API route exists but has NO
- 🏚️ Unused Entity:
[VendorRating]- Issue: Schema defined in
schema.tsbut never referenced by any Service.
- Issue: Schema defined in
3. How to Read This Map
- If it's here, it's real. (Generated from code, not manual wiki edits).
- If it has a warning (⚠️), the implementation has drifted from the design.
- Clicking a Link takes you directly to the source file line number.