feat: initial implementation
This commit is contained in:
commit
e29da874ee
39 files changed
+2309
No files matched your search
@@ -0,0 +1,28 @@
|
||||
# Architecture
|
||||
|
||||
## Runtime
|
||||
|
||||
Single FastAPI process with server-rendered HTML and a SQLite database volume. This keeps deployment suitable for a small VPS, NAS or home server.
|
||||
|
||||
## Layers
|
||||
|
||||
- `models.py`: persistence schema.
|
||||
- `scheduling.py`: deterministic month/rotation generation.
|
||||
- `web.py`: authentication, admin editing and change-request orchestration.
|
||||
- `notifications.py`: synchronous SMTP adapter + durable send log.
|
||||
- `cli.py`: maintenance commands that can be run manually or by cron.
|
||||
|
||||
## Data lifecycle
|
||||
|
||||
1. Visiting a month calls `ensure_month_assignments`.
|
||||
2. Missing Night rows are created unassigned.
|
||||
3. Missing lunch rows are created from each independent rotation.
|
||||
4. Admin assigns/overrides rows through the month editor.
|
||||
5. Member change requests operate on concrete assignment IDs.
|
||||
6. Email is attempted after the database action commits.
|
||||
|
||||
## Deployment
|
||||
|
||||
`docker-compose.yml` mounts `./data` at `/app/data`, so the SQLite DB persists across image rebuilds.
|
||||
|
||||
For larger installations, the SQLAlchemy configuration can point to PostgreSQL, but the project intentionally ships only the SQLite deployment path today.
|
||||
Reference in new issue
Block a user