Commit Graph

14 Commits

Author SHA1 Message Date
3fa242076b feat: add GET /api/projects using NextAuth + Postgres 2026-02-18 01:24:46 +00:00
934ac1cadf Fix: use client Providers wrapper instead of SessionProvider directly in root layout 2026-02-18 00:07:33 +00:00
b2e7c70d17 Add client-side Providers wrapper for SessionProvider 2026-02-18 00:07:23 +00:00
bbb22f1c37 Switch from SuperTokens to NextAuth.js
BREAKING CHANGE: Replace SuperTokens with NextAuth.js

Why:
- SuperTokens had persistent Traefik routing issues
- SSL certificate not issuing correctly
- Complex infrastructure (separate container)
- NextAuth runs in Next.js app (simpler, no separate service)

Changes:
- Install next-auth, @auth/prisma-adapter, prisma
- Create NextAuth API route: app/api/auth/[...nextauth]/route.ts
- Add Prisma schema for NextAuth tables (users, sessions, accounts)
- Update auth page to use NextAuth signIn()
- Remove all SuperTokens code and dependencies
- Keep same Google OAuth (just simpler integration)

Benefits:
- No separate auth service needed
- No Traefik routing issues
- Sessions stored in Montreal PostgreSQL
- Simpler configuration
- Battle-tested, widely used

All authentication data stays in Montreal!

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 15:12:21 -08:00
8cd95607a4 Fix Google OAuth: add redirectURIOnProviderDashboard parameter
- SuperTokens requires redirectURIOnProviderDashboard param
- Construct it from NEXT_PUBLIC_APP_URL or window.location.origin
- Properly encode the redirect URI in the query string
- Fixes 400 error: 'Please provide the redirectURIOnProviderDashboard'

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 12:47:00 -08:00
3d9a8498fc Remove simple landing page to use full marketing page
- Delete app/page.tsx to let app/(marketing)/page.tsx be the root
- Full marketing page has Hero, Features, Pricing, etc.
- Much better for vibnai.com root domain

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 11:34:45 -08:00
44895f9c31 Fix SuperTokens build error with lazy initialization
- Move SuperTokens.init() to runtime (not build time)
- Add dynamic route config to prevent build-time evaluation
- Move appInfo inside backendConfig function
- Update default URLs to vibnai.com

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 17:22:41 -08:00
c3bbc7818d Fix SuperTokens initialization timing issues
- Remove session check from home page (landing page doesn't need it)
- Add delayed session check in auth page to redirect logged-in users
- Handle SuperTokens not being initialized yet with proper error handling

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:15:03 -08:00
17dbcd36b9 Update home page with proper landing page and auth redirect
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:11:56 -08:00
0f8dbf8888 Fix SuperTokens to use separate ThirdParty and EmailPassword recipes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:07:27 -08:00
abddadce94 Fix SuperTokens auth component for Google OAuth
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:02:18 -08:00
1ca3a68148 Update auth page to use SuperTokens
Replace Firebase auth with SuperTokens PreBuilt UI for seamless integration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 15:58:52 -08:00
6764c1feb0 Add SuperTokens authentication integration
- Install supertokens-auth-react, supertokens-node, supertokens-web-js
- Create frontend and backend SuperTokens configuration
- Add API route handler for auth endpoints
- Add SuperTokensProvider wrapper in root layout
- Create new auth component with SuperTokens UI
- Configure Google and GitHub OAuth providers
- Ready for SuperTokens core deployment

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 15:27:40 -08:00
40bf8428cd VIBN Frontend for Coolify deployment 2026-02-15 19:25:52 -08:00