Add 2026.10 release notes and update README
- release-notes/2026.10.md: version changes, code/config changes, upgrade and rollback steps, and test results for the October 2026 dependency upgrades - README: add Upgrading section, component versions, Other purchases feature, session token row in Security; fix API docs location (not exposed via nginx); add ntfy.py, favicon.svg, release-notes/ to project structure Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
896be8fbe9
commit
d357d6b885
2 files changed
+118
-10
No files matched your search
@@ -8,7 +8,8 @@ A self-hosted, multi-user web app for backyard chicken keepers to track egg prod
|
||||
- **Daily log** — record egg collections with one entry per day; includes full collection history with date filtering, edit, and delete below the form
|
||||
- **Flock management** — track changes to your flock size over time so per-hen averages stay accurate
|
||||
- **Feed tracking** — log feed purchases (bags + price per bag)
|
||||
- **Budget** — cost per egg and cost per dozen, all-time and over the last 30 days
|
||||
- **Other purchases** — log other flock expenses (bedding, snacks, supplies) so they count toward your costs
|
||||
- **Budget** — feed and other costs, cost per egg, and cost per dozen, all-time and over the last 30 days
|
||||
- **Monthly summary** — month-by-month breakdown of production, averages, feed cost, and cost per egg
|
||||
- **Multi-user** — each user has their own isolated data; self-registration on the login page
|
||||
- **Admin panel** — view all users, reset passwords, disable/enable accounts, delete accounts, and log in as any user
|
||||
@@ -17,13 +18,15 @@ A self-hosted, multi-user web app for backyard chicken keepers to track egg prod
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology |
|
||||
|----------|-------------------------|
|
||||
| Frontend | Vanilla HTML/CSS/JS |
|
||||
| Backend | FastAPI (Python) |
|
||||
| Database | MySQL 8.4 LTS |
|
||||
| Server | Nginx (static + proxy) |
|
||||
| Runtime | Docker Compose |
|
||||
| Layer | Technology |
|
||||
|----------|-----------------------------------------------------|
|
||||
| Frontend | Vanilla HTML/CSS/JS, Chart.js 4.6 |
|
||||
| Backend | Python 3.14, FastAPI, SQLAlchemy 2.1, PyJWT, bcrypt |
|
||||
| Database | MySQL 8.4 LTS |
|
||||
| Server | Nginx 1.30 (static + proxy) |
|
||||
| Runtime | Docker Compose |
|
||||
|
||||
Exact versions are pinned in `backend/requirements.txt`, `backend/Dockerfile`, and `docker-compose.yml`. See [`release-notes/`](release-notes/) for what changed in each release.
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -77,6 +80,23 @@ A self-hosted, multi-user web app for backyard chicken keepers to track egg prod
|
||||
|
||||
The database schema is applied automatically on first start via `mysql/init.sql`. The admin user is created (or synced) automatically every time the API starts.
|
||||
|
||||
## Upgrading
|
||||
|
||||
1. Read the release notes in [`release-notes/`](release-notes/) for the version you're moving to. Some releases have extra steps.
|
||||
2. Back up the database:
|
||||
```bash
|
||||
docker compose exec -T db sh -c 'mysqldump -uroot -p"$MYSQL_ROOT_PASSWORD" --single-transaction --routines --triggers --databases "$MYSQL_DATABASE"' > yolkbook-backup.sql
|
||||
```
|
||||
3. Pull the update, then rebuild and restart:
|
||||
```bash
|
||||
git pull
|
||||
docker compose build --pull api
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
When the MySQL version changes, the first start runs a one-time data upgrade, and the API waits until it finishes. Going from MySQL 8.0 to 8.4 takes about 1–2 minutes, and the change is one-way: to go back, you have to restore from your backup. Follow progress with `docker compose logs -f db`.
|
||||
|
||||
## Authentication
|
||||
|
||||
- **Login / Register** — the landing page (`/login`) has both a sign-in form and a self-registration link.
|
||||
@@ -127,11 +147,12 @@ The gear icon (⚙) in the top-right nav opens the Settings panel:
|
||||
| Authentication | HttpOnly + Secure + SameSite=Strict session cookie; no token in JS-accessible storage |
|
||||
| CSRF protection | SameSite=Strict cookie prevents cross-site request forgery without explicit tokens |
|
||||
| Password hashing | bcrypt |
|
||||
| Session tokens | HS256-signed JWT (PyJWT), 30-day expiry |
|
||||
| CORS | Locked to same origin by default; configurable via `ALLOWED_ORIGINS` |
|
||||
| Rate limiting | Login: 5 req/min · Register: 3 req/min · Admin endpoints: 10 req/min (nginx) |
|
||||
| Login lockout | Account locked for 15 minutes after 5 consecutive failed attempts |
|
||||
| Security headers | X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy, Content-Security-Policy |
|
||||
| Subresource Integrity | Chart.js CDN script pinned with SHA-384 hash |
|
||||
| Subresource Integrity | Chart.js CDN script pinned with a SHA-384 hash on every page that loads it |
|
||||
| Input validation | Server-side via Pydantic; all user-rendered content HTML-escaped |
|
||||
| SQL injection | SQLAlchemy ORM with parameterized queries throughout |
|
||||
| Container security | API runs as non-root user; all volume mounts read-only except database |
|
||||
@@ -156,7 +177,7 @@ All existing data will be automatically assigned to the admin account on first s
|
||||
|
||||
## API
|
||||
|
||||
The FastAPI backend is available at `/api`. Interactive docs (Swagger UI) are at `/api/docs`.
|
||||
The FastAPI backend is available at `/api`. The interactive docs (Swagger UI) aren't exposed through nginx. FastAPI serves them inside the API container at `http://localhost:8000/docs`.
|
||||
|
||||
| Prefix | Description |
|
||||
|------------------|----------------------------------------------------|
|
||||
@@ -180,6 +201,7 @@ yolkbook/
|
||||
│ ├── models.py # SQLAlchemy models
|
||||
│ ├── schemas.py # Pydantic schemas
|
||||
│ ├── database.py # DB connection
|
||||
│ ├── ntfy.py # ntfy push notification helper
|
||||
│ ├── routers/
|
||||
│ │ ├── auth_router.py # /api/auth — login, logout, register, settings
|
||||
│ │ ├── admin.py # /api/admin — user management + impersonation
|
||||
@@ -201,6 +223,7 @@ yolkbook/
|
||||
│ │ ├── login.html
|
||||
│ │ ├── 404.html
|
||||
│ │ ├── 50x.html
|
||||
│ │ ├── favicon.svg
|
||||
│ │ ├── js/
|
||||
│ │ │ ├── api.js # Shared fetch helpers
|
||||
│ │ │ ├── auth.js # Auth utilities, nav, settings modal
|
||||
@@ -217,6 +240,7 @@ yolkbook/
|
||||
├── mysql/
|
||||
│ ├── init.sql # Schema for fresh installs
|
||||
│ └── migrate_v2.sql # Migration for pre-multi-user installs
|
||||
├── release-notes/ # Per-release change logs (e.g. 2026.10.md)
|
||||
├── .env.example # Template — copy to .env and fill in values
|
||||
├── docker-compose.yml
|
||||
└── .env # Secrets — not committed
|
||||
|
||||
Reference in new issue
Block a user