Commit Graph
11 Commits
Author SHA1 Message Date
emil28092005andClaude Sonnet 4.6 02a9320c69 fix: export Go PATH globally in Makefile so all targets find go/goose/air
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 02:35:09 +03:00
emil28092005andClaude Sonnet 4.6 0679ff21ae chore: add Docker installation to setup.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 02:30:09 +03:00
emil28092005andClaude Sonnet 4.6 80d0ebb640 chore: add setup.sh to install Go and Node.js on fresh server
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 02:23:45 +03:00
emil28092005andClaude Sonnet 4.6 6e96e72b3e chore: add install/build targets and split dev/prod server commands
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 02:16:35 +03:00
emilandClaude Sonnet 4.6 094c8953b6 fix: scan timestamptz into time.Time in users repository
Same pgx v5 binary protocol issue as admin service — created_at
in transactions cannot be scanned into *string.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 17:10:41 +03:00
emilandClaude Sonnet 4.6 e2e8afd07a fix: scan timestamptz into time.Time in admin service
pgx v5 uses binary protocol for timestamptz and cannot scan it
directly into *string. Scan into time.Time and format as RFC3339.
Fixes /admin/users internal server error and broken grant search.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 17:06:34 +03:00
emilandClaude Sonnet 4.6 2dba7f7cd2 feat: add StudentNav with logout to all student pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 17:00:08 +03:00
emilandClaude Sonnet 4.6 9bc2d65b43 fix: use hard redirect after login to avoid stale router cache
router.push() can reuse a cached middleware redirect that was
issued before the cookie was set, sending the user back to /login.
window.location.href forces a fresh browser request that carries
the newly set access_token cookie.

Also changed SameSite=Strict -> SameSite=Lax so the cookie is
included in all same-site navigation patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:56:38 +03:00
emilandClaude Sonnet 4.6 b3f9655cf7 fix: redirect to /login after logout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:46:16 +03:00
emilandClaude Sonnet 4.6 be2260d259 feat: add partner interface, admin dashboard, and unit tests
Partner flow: QR scanner component (html5-qrcode) with camera
permission/not-found handling, 3-step spend flow (scan → amount
entry with auto-filled max → success/error result).

Admin dashboard: stats overview, grant points with debounced
student search, paginated transactions table with type filters,
paginated students table.

Tests: comprehensive unit tests for points and auth packages —
service (all paths including error branches, RS256 wrong-method),
handler (all HTTP status codes via httptest), JWT round-trip,
repository constructors. Auth coverage: 72.9%, points service
coverage: 100%.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:41:17 +03:00
emilandClaude Sonnet 4.6 50b3c4198a feat: initial commit — backend API + student cabinet frontend
- Go backend: auth (JWT), points earn/spend, QR token generation,
  partners, admin grant/stats endpoints with chi router
- Next.js 14 frontend: login, student dashboard, transaction history,
  QR display, partners list
- PostgreSQL migrations (4 tables), Redis cache, Docker Compose
- CORS middleware, role-based route protection, Zustand auth store

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 10:03:27 +03:00