Architecture
This section is for the technical structure behind TTRPG Forge: crate boundaries, domain modeling, API design, storage concerns, and query behavior.
Start here if you need to understand how the project is assembled before changing code.
Reading Order
- Architecture Overview
- Recommended Rust Workspace
- Crate Boundaries
- Domain Model
- API Design
- Search and Query Design
Design Bias
The core architecture should keep narrative concepts separate from delivery details.
That means:
- domain rules belong in domain/application crates
- persistence details belong behind storage traits
- HTTP details belong in the API crate
- frontend workflows should present user questions instead of internal table names
- rules systems should attach around the core model instead of redefining it