add architecture documentation and testing strategy
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# 7. Deployment View
|
||||
|
||||
Describes:
|
||||
|
||||
1. Technical infrastructure used to execute your system, with infrastructure elements like geographical locations, environments, computers, processors, channels and net topologies.
|
||||
2. Mapping of (software) building blocks to that infrastructure elements.
|
||||
|
||||
## Infrastructure Level 1
|
||||
|
||||
```text
|
||||
┌─────────────────────────────────────────────┐
|
||||
│ Host / VM │
|
||||
│ ┌─────────────┐ ┌─────────────────────┐ │
|
||||
│ │ frontend │ │ backend │ │
|
||||
│ │ (Flask) │ │ (FastAPI) │ │
|
||||
│ │ :5000 │ │ :8000 │ │
|
||||
│ └──────┬──────┘ └──────────┬──────────┘ │
|
||||
│ │ │ │
|
||||
│ └────────┬──────────┘ │
|
||||
│ │ │
|
||||
│ ┌───────▼────────┐ │
|
||||
│ │ db (DuckDB) │ │
|
||||
│ │ data/app.db │ │
|
||||
│ └────────────────┘ │
|
||||
└─────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**Motivation:** All three components run on a single VM (or as Docker containers) for simplicity and low operational overhead.
|
||||
|
||||
**Quality and/or Performance Features:** The frontend and backend are stateless; DuckDB persists data on the host filesystem.
|
||||
|
||||
**Mapping of Building Blocks to Infrastructure:**
|
||||
|
||||
| Building Block | Container / Process | Port |
|
||||
| --------------- | ---------------------------- | ---- |
|
||||
| Flask frontend | `frontend` | 5000 |
|
||||
| FastAPI backend | `backend` | 8000 |
|
||||
| DuckDB | File on host (`data/app.db`) | — |
|
||||
|
||||
## Infrastructure Level 2
|
||||
|
||||
### Docker Compose (alternative)
|
||||
|
||||
All three services can be run with `docker compose up`. The `backend` mounts the `data/` volume for DuckDB persistence.
|
||||
Reference in New Issue
Block a user