Commit graph

62 commits

Author SHA1 Message Date
Jon Seager
7eab263071
chore: slight simplifications to bags 2025-11-27 14:03:00 +00:00
Jon Seager
14c3079600
feat: add bags domain and repositories 2025-11-27 13:56:06 +00:00
Jon Seager
f88a880d07
feat!: update to a more human friendly url structure for roasters/roasts 2025-11-25 21:34:08 +00:00
Jon Seager
dd0f716437
chore: remove duplicated code for pagination 2025-11-25 19:56:50 +00:00
Jon Seager
7d4c7dda28
chore: remove unused code 2025-11-25 19:14:38 +00:00
Jon Seager
42d0f71eb1
feat!: use numeric, database-generated IDs throughout 2025-11-25 18:21:04 +00:00
copilot-swe-agent[bot]
e710c6dc62
refactor: improve code quality and add comprehensive documentation
Code Quality Improvements:
- Fix hex literal grouping in ID generator (0xB10C_1D -> 0x00B1_0C1D)
- Rename ListQuery::default() to default_query() to avoid confusion with Default trait
- Use div_ceil() instead of manual ceiling division
- Remove unnecessary borrows in auth token generation and hashing
- Simplify nested if statements in error handling

Documentation:
- Add comprehensive authentication section to README
- Document environment variables for server and CLI
- Add security best practices and considerations
- Document password hashing (Argon2id), token storage (SHA-256), and session management
- Include step-by-step authentication setup guide
- Add production deployment recommendations

All 70 tests pass (8 unit + 46 server + 16 CLI) 

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:51 +00:00
copilot-swe-agent[bot]
4c040f2c58
fix(security): validate session tokens against database
- Add sessions table to store session tokens with expiration
- Create Session domain model and SessionRepository trait
- Implement SqlSessionRepository for session persistence
- Update is_authenticated() to validate tokens against database
- Sessions expire after 30 days
- Session tokens hashed with SHA-256 before storage
- Delete sessions from database on logout
- Update all page handlers to properly validate sessions

This prevents session hijacking by ensuring only valid, unexpired
tokens stored in the database can authenticate requests.

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:48 +00:00
copilot-swe-agent[bot]
6d0ee869f7
feat(api): add authentication middleware and token management routes
Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:10 +00:00
copilot-swe-agent[bot]
ca5d25ea10
feat(domain): add auth database schema and domain models
Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:27:51 +00:00
Jon Seager
4f69d20bb1
feat: add pagination/infinite scroll to timeline 2025-11-24 21:45:59 +00:00
Jon Seager
3241f3c961
feat: bootstrap brewlog platform 2025-11-24 11:44:12 +00:00