19 lines
722 B
Markdown
19 lines
722 B
Markdown
# Architecture
|
|
|
|
FastAPI with Jinja2, rendered on the server. SQLite through `dataset`, synchronous and deliberately without a threadpool. Sessions with PBKDF2-SHA256 passwords.
|
|
|
|
## Layers
|
|
|
|
- `molodetz/database/`: one file per subject, always import from the package root.
|
|
- `molodetz/routers/`: mirrors the URL path.
|
|
- `molodetz/services/`: background services under one supervisor with a file lock.
|
|
- `molodetz/templates/`: one Jinja environment in `templating.py`.
|
|
|
|
## Deleting
|
|
|
|
Everything is soft deleted with `deleted_at` and `deleted_by`. Only cleanup jobs delete for real.
|
|
|
|
## Static files
|
|
|
|
Assets go through `static_url()`, which versions them under `/static/v<version>/`. Those are immutably cacheable for a year.
|