Store ledger for advanced/deferred payments. Member registry, cashier, point of sale module, and transaction history.
Find a file
Claude a5c9af1ca6
Add staff auth, admin area, currency decimal input
Auth system
- staff_accounts table: name, username, bcrypt password, role (staff|admin)
- Session tokens in memory (8-hour TTL), httpOnly cookie
- POST /auth/login, /auth/logout, GET /auth/me
- All API endpoints now require a valid session
- Default admin account seeded on first run (admin/admin), printed to console
- Staff name for transactions comes from the session, no more dropdown

Currency input fix
- Amount inputs are now decimal (step=0.01); users enter 1.00 not 100
- Frontend multiplies by cfg.currency_divisor before POSTing
- TopupRequest/ChargeRequest no longer include staff_name (from session)

Admin area (4th tab, admin role only)
- App Settings: club name, currency symbol, major/minor unit names,
  divisor, min/max topup, max charge, receipt footer, allow overdraft
- Settings persisted in app_settings DB table; merged with CONFIG defaults
  at startup and refreshed after each save
- Staff Accounts: list with edit modal (name, username, password, role,
  active flag) and delete; Add Account inline form
- /admin/settings GET/POST, /admin/staff-accounts CRUD
- /config endpoint exposes live settings to frontend on every page load

receipt_footer field rendered on both receipt and statement print views

https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7
2026-05-30 09:19:07 +00:00
static Add staff auth, admin area, currency decimal input 2026-05-30 09:19:07 +00:00
.gitignore Initial commit 2026-05-30 12:01:08 +07:00
LICENSE Initial commit 2026-05-30 12:01:08 +07:00
main.py Add staff auth, admin area, currency decimal input 2026-05-30 09:19:07 +00:00
README.md Initial commit 2026-05-30 12:01:08 +07:00
requirements.txt Add store-credit web app (FastAPI + SQLite) 2026-05-30 05:21:01 +00:00

ClubLedger

Store ledger for advanced/deferred payments. Member registry, cashier, point of sale module, and transaction history.