Storage and export - Keep books and transactions in SQLite (data/cashbook.db) instead of .ods files; existing .ods books are migrated once at startup - Export a book as the cashbook spreadsheet (.xlsx/.ods, built from the template via LibreOffice) or as CSV - GST rounded per transaction to match the spreadsheet Tax - GST return page with IRD GST101A boxes 5-15 per six-monthly, two-monthly or monthly period, due dates, and a Zero-rated GST type - Income tax page with IR10 (financial statements summary) and IR4 (company return) boxes, from the cashbook plus year-end amounts typed in and saved per book FastAPI and accounts (following led-editor) - Replace the stdlib server with a FastAPI app (src/cashbook_app) run by uvicorn; dependencies in Pipfile - Cookie sessions with bcrypt passwords, first-run admin setup or BOOTSTRAP_ADMIN_*, invites (link or email), sign-in throttling, password change that signs out other sessions - Users page for administrators: rename, reset password, promote or demote, delete, list and revoke invites; last admin is protected - Replaces the shared CASHBOOK_PASSWORD basic auth; AUTH_* settings in .env (see .env.example) - Docker image uses a venv with system site packages for python3-uno - pytest suite for auth, user management, imports, GST and tax figures Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
1.2 KiB
Bash
29 lines
1.2 KiB
Bash
# Copy to `.env` next to compose.yaml (it's git-ignored) and adjust.
|
|
|
|
# --- Sign-in ---
|
|
# AUTH_ENABLED=true # require sign-in (set false only on a trusted machine)
|
|
# AUTH_REGISTER_OPEN=true # allow creating accounts at /register
|
|
# AUTH_INVITE_ONLY=true # ...but only with an invite link from an administrator
|
|
# AUTH_SESSION_DAYS=14 # how long a sign-in lasts
|
|
|
|
# First run: create this administrator if there are no accounts yet.
|
|
# Leave unset to create the first account in the browser instead (it becomes the admin).
|
|
# BOOTSTRAP_ADMIN_USERNAME=admin
|
|
# BOOTSTRAP_ADMIN_PASSWORD=change-me
|
|
|
|
# --- Invites by email (optional) ---
|
|
# PUBLIC_BASE_URL=https://cashbook.example.com # used in invite links
|
|
# SMTP_HOST=smtp.example.com
|
|
# SMTP_PORT=587
|
|
# SMTP_USER=mailer@example.com
|
|
# SMTP_PASSWORD=app-password
|
|
# SMTP_FROM=Cashbook <mailer@example.com>
|
|
# SMTP_TLS=true
|
|
|
|
# --- Docker ---
|
|
# CASHBOOK_USER=1000:1000 # uid:gid owning ./data; use 0:0 with rootless Docker
|
|
# CASHBOOK_BIND=127.0.0.1 # host address to publish on
|
|
# CASHBOOK_PORT=8765
|
|
# CASHBOOK_ALLOWED_HOSTS= # extra host names, if a proxy doesn't pass Host through
|
|
# FORWARDED_ALLOW_IPS=127.0.0.1 # proxies trusted for X-Forwarded-Proto
|