Add footer with CHNS.tech credit and Buy Me a Coffee button

Adds a green footer (matching nav colour) to all authenticated pages
with a "Created by: CHNS.tech" link and a styled BMC button. CSP updated
to allow buymeacoffee CDN domains.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 22:50:30 -07:00
parent d2afdc4ea3
commit 4172b63dc2
9 changed files with 105 additions and 8 deletions

View File

@@ -44,17 +44,24 @@ A self-hosted, multi-user web app for backyard chicken keepers to track egg prod
cp .env.example .env
```
Key variables:
Required variables:
| Variable | Description |
|----------|-------------|
| `MYSQL_ROOT_PASSWORD` | MySQL root password — generate with `openssl rand -hex 16` |
| `MYSQL_DATABASE` | Database name (default: `eggtracker`) |
| `MYSQL_USER` | MySQL app username |
| `MYSQL_PASSWORD` | MySQL app user password |
| `ADMIN_USERNAME` | Username for the built-in admin account |
| `ADMIN_PASSWORD` | Password for the built-in admin account |
| `JWT_SECRET` | JWT signing secret — generate with `openssl rand -hex 32` |
| `SECURE_COOKIES` | Set to `true` (default) when behind HTTPS; `false` for local HTTP testing only |
| `ALLOWED_ORIGINS` | Comma-separated list of external origins allowed to call the API. Leave empty if accessed only through the bundled nginx frontend. |
Optional variables (with defaults):
| Variable | Default | Description |
|----------|---------|-------------|
| `SECURE_COOKIES` | `true` | Set to `false` for local HTTP testing only; leave `true` when behind HTTPS |
| `ALLOWED_ORIGINS` | *(empty)* | Comma-separated list of external origins allowed to call the API. Leave empty if accessed only through the bundled nginx frontend. |
3. Start the stack:
```bash
@@ -109,6 +116,10 @@ The gear icon (⚙) in the top-right nav opens the Settings panel:
| SQL injection | SQLAlchemy ORM with parameterized queries throughout |
| Container security | API runs as non-root user; all volume mounts read-only except database |
## Footer
All authenticated pages include a footer with a **Created by: [CHNS.tech](https://chns.tech)** credit and a Buy Me a Coffee button linking to [buymeacoffee.com/CHNS](https://www.buymeacoffee.com/CHNS).
## Migrating an Existing Install (pre-multi-user)
If you have an existing single-user install, run the migration script before rebuilding:
@@ -161,17 +172,26 @@ yolkbook/
│ └── Dockerfile
├── nginx/
│ ├── html/ # Frontend (HTML, CSS, JS)
│ │ ├── login.html
│ │ ├── admin.html
│ │ ├── index.html # Dashboard
│ │ ├── log.html # Log Eggs + full collection history
│ │ ├── flock.html # Flock management
│ │ ├── budget.html # Budget / cost analysis
│ │ ├── summary.html # Monthly summary
│ │ ├── admin.html # Admin panel
│ │ ├── login.html
│ │ ├── 404.html
│ │ ├── 50x.html
│ │ ├── js/
│ │ │ ├── api.js # Shared fetch helpers
│ │ │ ├── auth.js # Auth utilities, nav, settings modal
│ │ │ ├── login.js # Login/register page logic
│ │ │ ├── admin.js # Admin panel
│ │ │ ├── dashboard.js
│ │ │ ├── log.js # Egg logging interface
│ │ │ ├── history.js # Collection history table (used on log page)
│ │ │ ── dashboard.js
│ │ │ ── flock.js
│ │ │ ├── budget.js
│ │ │ ├── summary.js
│ │ │ └── admin.js # Admin panel
│ │ └── css/style.css
│ └── nginx.conf
├── mysql/