Core-First Architecture⚓︎
This document describes the intended system shape for DMS. The architecture should protect decision integrity, keep the product maintainable, and support search and insight features without weakening the core record.
The Big Picture⚓︎
DMS follows a core-first design. One system owns the decision record, enforces the rules, and exposes trusted interfaces to everything else. Clients and supporting services are built around that core rather than around direct data access.
The Four System Layers⚓︎
1. The Core (dms-core)⚓︎
The core is the authoritative system for the decision record. It is the only place where domain data is written and where domain rules are enforced.
- Responsibility: Manage Topics, Choices, Reasons, Decisions, Expectations, Outcomes, Reviews, and Lessons.
- Security: Enforce the authorization model and visibility rules on every request.
- History: Preserve a trustworthy record of meaningful changes.
2. Supporting Services⚓︎
Supporting services consume events or read models from the core, but they do not own or rewrite domain data.
- Search: Help users find earlier Topics, decisions, and lessons.
- Notifications: Remind users when a Topic needs attention.
- Insights: Surface patterns and related records without becoming authors of human reasoning.
3. The Clients⚓︎
Clients are the user-facing applications. They should remain thin, with business rules concentrated in the core.
- Web App: The primary way people work with Topics.
- Mobile App: A lighter client for updates and review.
- Admin Tools: Account and operational management outside the decision domain.
4. The Foundation (dms-infra)⚓︎
The foundation supports deployment, hosting, storage, and operations. It carries no product-specific decision logic.
Write and Read Model⚓︎
The design separates writes from reads:
- Write path: Clients send commands to the core to create or update the decision record.
- Read path: Clients query the core for Topic history, comparisons, dashboards, and search-driven views.
- Service path: Supporting services receive events or derived data from the core for search, notifications, and insight features.
This keeps the primary record simple while still allowing broader discovery and review features around it.
Repository Map⚓︎
| Repository | Focus | Current Status |
|---|---|---|
dms-docs |
Strategy, vision, and design | Active |
dms-core |
Backend, database, and API | Active |
dms-infra |
DevOps, cloud, and setup | Active |
dms-web |
User interface and UX | Planned |
Safety Guarantees⚓︎
The architecture is built around four guarantees:
- One source of truth: Only the core can write domain data.
- Full auditability: Every meaningful change leaves a trace.
- Protected history: New information can be added, but past reasoning cannot be silently rewritten.
- Bounded intelligence: Search and insight features can assist discovery, but they cannot make Decisions or author human reasoning.
Next Steps⚓︎
- Read the Domain Model for the core entities and records.
- Read the Behavior for Topic stages and lifecycle rules.