Felipe Cardoso
98b455fdc3
refactor(backend): enforce route→service→repo layered architecture
- introduce custom repository exception hierarchy (DuplicateEntryError,
IntegrityConstraintError, InvalidInputError) replacing raw ValueError
- eliminate all direct repository imports and raw SQL from route layer
- add UserService, SessionService, OrganizationService to service layer
- add get_stats/get_org_distribution service methods replacing admin inline SQL
- fix timing side-channel in authenticate_user via dummy bcrypt check
- replace SHA-256 client secret fallback with explicit InvalidClientError
- replace assert with InvalidGrantError in authorization code exchange
- replace N+1 token revocation loops with bulk UPDATE statements
- rename oauth account token fields (drop misleading 'encrypted' suffix)
- add Alembic migration 0003 for token field column rename
- add 45 new service/repository tests; 975 passing, 94% coverage
2026-02-27 09:32:57 +01:00
..
2026-02-27 09:32:57 +01:00
2026-02-27 09:32:57 +01:00
2026-02-27 09:32:57 +01:00
2026-02-27 09:32:57 +01:00
2026-02-27 09:32:57 +01:00
2026-02-27 09:32:57 +01:00
2026-02-27 09:32:57 +01:00
2025-11-10 11:55:15 +01:00
2025-10-31 21:57:12 +01:00
2026-02-27 09:32:57 +01:00
2025-11-26 13:23:44 +01:00