Build your own ChatGPT: a streaming AI chatbot with auth, persistent history, and shareable conversations.
Demo offline. The hosted demo at chatgptegy.com is no longer running. Follow Getting Started below to run it locally.
A ChatGPT clone built on the Vercel AI SDK and OpenAI's Edge runtime. Sign in with GitHub or Google to keep your chat history, use guest mode for a quick session, or share any conversation with a public link.
✨ Features#
- Streaming responses: token-by-token replies via the Vercel AI SDK over Next.js Edge runtime
- Auth via NextAuth: GitHub and Google providers, plus a one-click guest mode for ephemeral chats
- Persistent chat history: every conversation saved to Upstash / Vercel KV (Redis), indexed per user
- Shareable conversations: turn any chat into a public, read-only link
- Bring-your-own key: override the server's OpenAI key per-request with a preview token
- Rich markdown rendering: GFM tables, math via
remark-math, and syntax-highlighted code blocks - UI: shadcn/ui + Radix primitives, dark theme by default, responsive
- Configurable model: pick any chat-completion model via
OPEN_AI_MODEL(defaults togpt-3.5-turbo)
🛠️ Tech Stack#
| Layer | Technology |
|---|---|
| Framework | Next.js 13 (App Router, Edge runtime) + React 18 |
| Language | TypeScript |
| AI | Vercel AI SDK (ai) + openai-edge |
| Auth | NextAuth.js (GitHub, Google) |
| Storage | Upstash Redis / Vercel KV |
| UI | Tailwind CSS, shadcn/ui, Radix UI, Lucide icons |
| Content | react-markdown, remark-gfm, remark-math, react-syntax-highlighter |
| Forms & Validation | react-hook-form + Zod |
| Tooling | ESLint, Prettier, Husky |
🙌 Credits#
Built by Mohamed Gado.