Backend:
- /api/admin/users: GET list, POST create, PUT update, DELETE
- Admin users can be added with email, display name, and password
- Self-deletion and last-admin deletion are blocked
- Admin role auto-assigned on creation
Frontend:
- AdminUsersTabComponent: list + add/delete admin users
- AdminUserService: HTTP client for admin user CRUD
- AdminUser interface
- 'Admins' tab added to admin dashboard
Tests:
- 10 new tests for admin user management endpoints
- 140 total tests pass (130 original + 10 new)
The Programs feature is superseded by Shows, which provides a more
flexible model with schedule slots. This commit removes all Programs
code across frontend and backend:
Frontend:
- Delete admin-program-form component (ts/html/scss)
- Delete program.service.ts and program.ts interface
- Remove Programs tab, form modal, and all CRUD logic from admin
component (ts + html)
Backend:
- Delete programs API router
- Remove Program ORM model and ProgramCreate/Update/Response schemas
- Remove programs router registration from main.py
- Remove Program from seed data, seed helpers, and truncate/reset
- Document bootstrap admin login via KMTN_ADMIN_USERNAME/PASSWORD
env vars, including setup guide, curl examples, and config table
entries across docker-compose and bare-metal deployment sections
- Add KMTN_JWT_SECRET_KEY to all deployment config examples and
production checklist
- Fix docker-entrypoint.sh: remove unused API_UPSTREAM variable from
config.json envsubst (only API_PUBLIC_URL is needed)
- Fix app-config.service: default apiBaseUrl now reads from Angular
environment instead of empty string, and config.json path drops
leading ./ for cleaner resolution
The field name 'date' in EventUpdate shadowed the 'date' type from
datetime, causing Pydantic v2 to interpret Optional[date] as
Optional[None] — rejecting all non-null values with a 422 error.
Fix: rename import to 'date as _date' and use '_date' in all
annotations. Also improve error handling in admin forms to properly
display 422 validation error messages.
Co-Authored-By: Claude <noreply@anthropic.com>