Upload your old chats. Talk to them again.
ghostthemback/
├── app/
│ ├── (auth)/
│ │ ├── login/page.jsx # Sign in page
│ │ └── signup/page.jsx # Sign up page
│ ├── (legal)/
│ │ ├── privacy/page.jsx # Privacy policy
│ │ └── terms/page.jsx # Terms of service
│ ├── api/
│ │ ├── auth/
│ │ │ ├── [...nextauth]/route.js # NextAuth handler
│ │ │ └── signup/route.js # Email signup endpoint
│ │ ├── chat/route.js # Anthropic API proxy (hides key)
│ │ └── personas/route.js # Save/get/delete personas
│ ├── dashboard/
│ │ ├── page.jsx # Protected dashboard (server)
│ │ └── DashboardClient.jsx # Dashboard UI (client)
│ ├── globals.css
│ ├── layout.jsx
│ ├── page.jsx # Landing page
│ └── providers.jsx # SessionProvider wrapper
├── components/
│ └── ChatApp.jsx # Full chat flow component
├── lib/
│ ├── auth.js # NextAuth config
│ ├── db.js # Prisma client singleton
│ └── parsers.js # Chat log parsers
├── prisma/
│ └── schema.prisma # Database schema
├── .env.example # Environment variables template
└── package.json
npm installcp .env.example .env.local
# Fill in all values in .env.localYou need a PostgreSQL database. Free options:
After getting your connection string, add it to .env.local and run:
npm run db:push- Go to Google Cloud Console
- Create a new OAuth 2.0 Client ID
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy client ID and secret to
.env.local
npm run dev- Push to GitHub
- Go to vercel.com → Import project
- Add all environment variables from
.env.local - Change
NEXTAUTH_URLto your production domain - Add production redirect URI to Google OAuth:
https://yourdomain.com/api/auth/callback/google - Deploy
- Next.js 14 — App Router
- NextAuth v4 — Authentication (credentials + Google OAuth)
- Prisma — ORM
- PostgreSQL — Database
- Anthropic Claude — AI backend
- bcryptjs — Password hashing =======
afb34a233c9cd909fc85bef31a9e1c874efdf1d0