English | 简体中文
ChatGPT Minimal implements core ChatGPT features with a minimal codebase. Built with Next.js. Clean code, easy to extend.
Try the ChatGPT Minimal Demo Site.
What this project includes:
- Real-time streaming chat with Server-Sent Events
- Text + image chat (image upload and paste)
- Web search integration (with source citations when supported by provider/model)
- Markdown rendering with syntax highlighting
- Supports OpenAI, Azure OpenAI, and OpenAI-compatible providers
- Light/Dark mode toggle
Looking for a more complete version? ChatGPT Lite builds on this project's codebase and adds:
- Persona system with custom system prompts
- Multi-conversation management
- File attachments (PDF, XLSX/CSV, text files)
- Voice input
- 40+ UI themes
For required environment variables, see Environment Variables.
For OpenAI account users:
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>" \
-e OPENAI_MODEL="gpt-4o-mini" \
blrchen/chatgpt-minimalFor Azure OpenAI account users:
docker run -d -p 3000:3000 \
-e AZURE_OPENAI_RESOURCE_NAME="<YOUR_AZURE_RESOURCE_NAME>" \
-e AZURE_OPENAI_API_KEY="<YOUR_AZURE_OPENAI_API_KEY>" \
-e AZURE_OPENAI_DEPLOYMENT="<YOUR_AZURE_DEPLOYMENT_NAME>" \
blrchen/chatgpt-minimal- Install Node.js 22+.
- Clone this repository.
- Install dependencies with
npm install. - Copy
.env.exampleto.env.localand fill in values. - Start the app with
npm run dev. - Open http://localhost:3000.
| Name | Required | Description | Default Value |
|---|---|---|---|
| OPENAI_API_KEY | Yes | API key from OpenAI Platform. | - |
| OPENAI_API_BASE_URL | No | Base URL for OpenAI-compatible endpoints. If it does not end with /v1, the app will append it. |
https://api.openai.com |
| OPENAI_MODEL | No | Model name for OpenAI mode. | gpt-4o-mini |
| Name | Required | Description |
|---|---|---|
| AZURE_OPENAI_RESOURCE_NAME | Yes | Azure OpenAI resource name (for example my-openai-resource). |
| AZURE_OPENAI_API_KEY | Yes | Azure OpenAI API key. |
| AZURE_OPENAI_DEPLOYMENT | Yes | Azure OpenAI deployment name (not the model name). |
PRs of all sizes are welcome.

