Skip to content

Add session auth API and register/login frontend - #6

Merged
mtiluk merged 1 commit into
mainfrom
auth
Oct 1, 2026
Merged

mtiluk merged 1 commit into
mainfrom
auth

Conversation

@mtiluk

@mtiluk mtiluk commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Backend:

  • Store layer (internal/database) with CreateUser, GetUserByEmail, GetUserByID; duplicate email surfaces as ErrEmailTaken
  • Register, login, logout and /me endpoints; argon2id password hashing, request JSON parsing and go-playground/validator validation
  • scs sessions stored in Postgres (00003_sessions.sql) with hashed tokens, 12h lifetime and 30m idle timeout; RequireAuth middleware

Frontend:

  • Tailwind v4 theme (beui-inspired dark palette, Geist fonts)
  • beui motion components: input, button, stateful button, checkbox, animated toast stack, with a ToastProvider/useToast
  • Register, login and logout routes using TanStack Query mutations, Zod validation and shared server error parsing
  • /client routes guarded via router context and the cached /me query

Backend:
- Store layer (internal/database) with CreateUser, GetUserByEmail,
  GetUserByID; duplicate email surfaces as ErrEmailTaken
- Register, login, logout and /me endpoints; argon2id password hashing,
  request JSON parsing and go-playground/validator validation
- scs sessions stored in Postgres (00003_sessions.sql) with hashed
  tokens, 12h lifetime and 30m idle timeout; RequireAuth middleware

Frontend:
- Tailwind v4 theme (beui-inspired dark palette, Geist fonts)
- beui motion components: input, button, stateful button, checkbox,
  animated toast stack, with a ToastProvider/useToast
- Register, login and logout routes using TanStack Query mutations,
  Zod validation and shared server error parsing
- /client routes guarded via router context and the cached /me query
@mtiluk
mtiluk merged commit ea857b3 into main Oct 1, 2026
2 checks passed
@mtiluk
mtiluk deleted the auth branch October 1, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant