Files
g-butandClaude Sonnet 4.6 95432036f4 feat(portal): add patient portal with auth, DB, and admin panel
Complete patient portal built on Neon (vitareba DB, same project as SYL):
- Drizzle schema: users/auth tables, profiles, assessment_results, bookings, documents, threads, thread_messages
- NextAuth v5 beta with DrizzleAdapter — credentials + Google, JWT strategy, patient|admin roles
- Lazy DB singleton (Proxy) + functional NextAuth config so build never requires DATABASE_URL
- 11 API routes: account, assessment, bookings, documents, messages, profile, admin endpoints
- Auth pages: login, register, forgot-password (Suspense-wrapped for useSearchParams)
- Portal pages: dashboard, assessment (saves on complete), assessments history, profile, bookings, messages/[threadId]
- Admin pages: patient list, patient detail, bookings management, documents
- Middleware: route protection, admin guard, returnTo param
- Landing page CTA wired to /assessment (login required) — Assessment overlay removed from homepage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 11:06:57 +02:00
..