Multimodal chat application built with Next.js 16, React 19, TypeScript, Zustand, TanStack Query, and the OpenAI Responses API.
The project focuses on a ChatGPT-like experience with conversation history, reasoning display, model selection, prompt tuning, persistent memory, artifact rendering, and polished mobile/PWA behavior.
- Real-time chat experience with streaming responses
- Dedicated reasoning panel with explicit state transitions
- Conversation history with editing and deletion flows
- Model picker with support for
gpt-5.5,gpt-5.3-codex, andgpt-5.3-chat-latest - Persistent memory and custom instructions stored server-side
- Artifact rendering and export flows, including PDF generation
- Mobile-first shell refinements for Safari and installed PWA usage
- Local persistence for conversations, memories, and persona bootstrap data
Next.js 16with App RouterReact 19TypeScriptTailwind CSS 4Zustand@tanstack/react-queryRadix UIOpenAI Node SDKVitest
app/
api/
auth/ Authentication endpoints
chat/ Server-side OpenAI proxy
conversations/ Conversation CRUD
memories/ Memory CRUD
persona/ Custom instructions endpoint
transcribe/ Audio transcription endpoint
components/
artifacts/ Artifact viewers and export entry points
chat/ Main chat experience
layout/ Application shell
settings/ Persona and memory settings
sidebar/ Conversation navigation
hooks/
useChat.ts Streaming chat orchestration
lib/
artifacts/ Artifact generation/parsing helpers
export/ PDF and export utilities
models/ Model catalog and selector metadata
data/
conversations.json Local conversation persistence
memories.json Local memory persistence
persona.json Persona bootstrap persistence
- Streaming responses with reasoning state handling
- Markdown rendering with code, math, and rich formatting support
- Message actions for editing, exporting, and artifact handling
- Improved mobile composer behavior and safe-area handling
- Conversation list with clearer active state
- Safer delete flow for the currently open conversation
- Shared panel sizing between conversation sidebar and settings drawer
- Persona/custom instructions persisted through
/api/persona - Memory management persisted through
/api/memories - Inline editing and autosave behavior for settings workflows
- Right-side artifact panel for document-like outputs
- PDF export tuned for cleaner layout and OpenAI-branded header
- Support for document and quiz-oriented artifact rendering
GET/POST /api/chatGET/POST /api/conversationsGET/PATCH/DELETE /api/conversations/[id]GET/POST /api/memoriesPATCH/DELETE /api/memories/[id]GET/PUT /api/personaPOST /api/transcribePOST /api/auth/loginPOST /api/auth/logoutGET /api/auth/checkGET /api/health
Node.js 20+npm
npm installnpm run devThe development server uses port 3040 by default.
npm run dev
npm run build
npm run start
npm run lint
npm test
npx tsc --noEmitBefore shipping a change, the repo is typically validated with:
npm test
npm run build
npx tsc --noEmit
npm run lintRun only the commands that are applicable to the current change if you are doing a narrow, documentation-only update.
- The canonical service configuration is documented in
systemd/chatgpt.service - Additional infrastructure notes live in
docs/INFRASTRUCTURE.md - If you are also managing Apache or reverse proxy behavior, check the repo's infrastructure docs before changing ports or service bindings
- Local JSON files in
data/are used for simple persistence during development and server-side flows - The repository also contains project-specific operational guidance in
AGENTS.md - If you need to adjust the OpenAI model catalog, start with
lib/models/modelConfig.ts