Commit graph

1 commit

Author SHA1 Message Date
King Omar
69f77b1e46 Add admin dashboard + member DB storage
worker.js:
- Store join submissions in new 'members' D1 table (in addition to email)
- Add GET /api/admin/members — full member list, password gated
- Add GET /api/admin/stats — member counts, by-state breakdown, recent
  signups, top petitions, site stats; all password gated ('dictator')

admin.html:
- Password gate → full dashboard
- AEC progress bar (X/2000 with % and members-to-go)
- Stat cards: total members, this week, site users, proposals, votes
- State breakdown with mini bars
- Recent signups (last 10, NEW badge for this week)
- Top 10 petitions by signature count
- Full searchable/filterable/sortable member table with NEW badges
- CSV export (respects active search + state filter)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:32:53 +10:00