xtablo-source/backend/internal/web
Arthur Belleville efdc16babe
feat(02-04): signup handler, router wiring, and integration tests
- Add handlers_auth.go: SignupPageHandler + SignupPostHandler (validate -> hash -> insert -> session -> redirect)
- Add AuthDeps struct; wire argon2id hash, InsertUser, Store.Create, SetSessionCookie
- Update router.go: NewRouter accepts AuthDeps; mount ResolveSession (D-24); wire /signup routes behind RedirectIfAuthed
- Update cmd/web/main.go: build AuthDeps (sqlc.Queries + auth.Store + secure flag) and pass to NewRouter
- Add nil-Store guard to auth.ResolveSession for Phase 1 unit-test compatibility
- Update handlers_test.go: pass AuthDeps{} zero value to NewRouter (Phase 1 routes unaffected)
- Add testdb_test.go: isolated-schema test helper for web package integration tests
- Add handlers_auth_test.go: 8 TestSignup_* integration tests (all pass against real Postgres)
2026-05-14 22:17:50 +02:00
..
ui test(01-02): add ui package smoke tests 2026-05-14 18:47:31 +02:00
handlers.go feat(01-03): templ layout/index/fragments + handlers + chi router 2026-05-14 19:25:43 +02:00
handlers_auth.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00
handlers_auth_test.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00
handlers_test.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00
middleware.go feat(01-03): pgxpool wrapper, RequestID/slog middleware, slog handler switch 2026-05-14 19:24:16 +02:00
router.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00
slog.go feat(01-03): pgxpool wrapper, RequestID/slog middleware, slog handler switch 2026-05-14 19:24:16 +02:00
testdb_test.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00