Commit Graph

7 Commits

Author SHA1 Message Date
4172b63dc2 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>
2026-03-23 22:50:30 -07:00
958c409e8e Fix bugs, data integrity, and cache busting
- models.py: add UniqueConstraint(user_id, date) to flock_history so
  duplicate flock entries for the same day are rejected at the DB level
- main.py: v2.3 migration applies the new unique constraint to existing
  installs at startup
- login.html: update register form minlength and placeholder from 6 to 10
  characters to match backend; add specific 429 error message so rate-
  limited users see "Too many attempts — please wait a minute" instead of
  a generic failure
- auth.js: update settings modal password input minlength from 6 to 10
- summary.js: fix CSV export truncation — pass limit=10000 so users with
  more than 500 days of data get a complete export; read chart border color
  from --green CSS variable instead of hardcoded hex
- All HTML files: bump JS version params to ?v=4 so browsers discard
  cached copies of files changed across recent sessions (api.js, auth.js,
  dashboard.js, history.js, log.js, flock.js, budget.js, summary.js,
  admin.js)
- .env.example: add password strength guidance for MySQL and admin vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 00:27:02 -07:00
b660263f30 Merge History into Log Eggs page; update dashboard card order and colors
- Removed standalone History page (history.html); full collection history
  (date filter, edit, delete, totals footer) is now embedded in the Log
  Eggs page below the log form
- Removed History nav link from all pages
- Reordered dashboard stat cards: egg counts → averages → Flock Size →
  cost cards
- Egg count and average cards now use green; Flock Size card uses orange
- Updated README to reflect removed History page, merged log/history
  feature, dashboard card changes, and project structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 23:43:27 -07:00
aa12648228 Add multi-user auth, admin panel, and timezone support; rename to Yolkbook
- Rename app from Eggtracker to Yolkbook throughout
- Add JWT-based authentication (python-jose, passlib/bcrypt)
- Add users table; all data tables gain user_id FK for full data isolation
- Super admin credentials sourced from ADMIN_USERNAME/ADMIN_PASSWORD env vars,
  synced on every startup; orphaned rows auto-assigned to admin post-migration
- Login page with self-registration; JWT stored in localStorage (30-day expiry)
- Admin panel (/admin): list users, reset passwords, disable/enable, delete,
  and impersonate (Login As) with Return to Admin banner
- Settings modal (gear icon in nav): timezone selector and change password
- Timezone stored per-user; stats date windows computed in user's timezone;
  date input setToday() respects user timezone via Intl API
- migrate_v2.sql for existing single-user installs
- Auto-migration adds timezone column to users on startup
- Updated README with full setup, auth, admin, and migration docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 23:19:29 -07:00
b633586012 Show cost per egg as 2 decimal places
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 22:53:09 -08:00
404fd0510f Add Other Purchases to budget page
- New other_purchases table (date, total, notes)
- /api/other CRUD endpoints
- Budget stats now include other costs in cost/egg and cost/dozen math
- Budget page: new Log Other Purchases form, stat cards for other costs,
  combined Purchase History table showing feed and other entries together

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 22:47:57 -08:00
492e1fd68f Initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 22:27:58 -08:00