System Scope and Context
This section provides a high-level overview of Framework M's boundaries and its interactions with external systems.
3.1 Business Context
Framework M is an application construction framework that sits between the business logic (DocTypes) and the infrastructure (Adapters).
3.2 External Interfaces (The Ports)
Framework M interacts with the outside world through standardized Ports (Protocols), divided into Primary and Secondary categories.
3.2.1 Primary Interfaces (How to reach us)
| Interface | Purpose | Implementation (Example) |
|---|---|---|
| HTTP API | Frontend Desk, external integrations | Litestar |
| CLI Tools | Developer scaffolding, production migrations | Cyclopts |
| Event Bus | Asynchronous service-to-service messaging | NATS JetStream |
3.2.2 Secondary Interfaces (External systems we use)
| Interface | Purpose | Implementation (Example) |
|---|---|---|
| SQL Database | Relational data storage | PostgreSQL / SQLite |
| NATS / Redis | Message brokering and event storage | NATS JetStream |
| Identity Provider | Authentication and authorization | Citadel / Keycloak |
| Bucket Storage | File and asset storage | Local FS / S3 |
| Caching Engine | High-performance state caching | Redis |
3.3 Context Diagram
┌────────────────┐ ┌───────────────┐
│ External API │◄───────────────┤ Framework M │
└────────────────┘ (HTTP) └───────┬───────┘
│
┌────────▼────────┐
┌────────────────┐ │ Adapters │
│ Web Frontend │◄──────────────┤ (Ports/Protocols)│
└────────────────┘ (HTTP) └────────┬────────┘
│
┌────────┴────────┐
┌────────────────┐ │ Infrastructure │
│ Databases │◄──────────────┤ (SQL, Redis,...) │
└────────────────┘ └─────────────────┘