Niek/chatgpt-web
ChatGPT web interface using the OpenAI API
ChatGPT‑web – a lightweight, self‑hosted chat UI for any OpenAI‑compatible model
What it is – A single‑page web application that lets you talk to large‑language‑model chat endpoints (OpenAI, Anthropic, Google Gemini, Mistral, xAI, OpenRouter, etc.) directly from your browser. You supply the provider name and an API key, the app discovers the models that the endpoint offers, and then you can start a conversation.
Why it matters – All conversation history lives in the browser’s local storage, so nothing is sent to a third‑party server. The UI is open‑source (GPL‑3.0) and can be hosted anywhere, bundled as a desktop app with Tauri, or run locally via Docker. It gives you the same chat experience you get on commercial sites while keeping your data private and letting you pick any compatible provider.
Core features (as described in the README)
- Provider‑agnostic – Works with any API that follows the OpenAI chat spec. Presets are included for OpenAI, Anthropic, xAI, Google Gemini, Mistral AI, APIpie, OpenRouter, OrcaRouter, plus a generic “custom” mode.
- Local‑only storage – Chats are saved in the browser’s local storage; no server‑side persistence.
- Customizable model settings – Adjust temperature, system prompt, and other parameters per chat.
- Voice I/O – Speech‑to‑text input and text‑to‑speech output.
- Prompt library – Comes with a curated list of 100 popular prompts from the awesome‑chatgpt‑prompts collection.
- Export – Chats can be saved as Markdown files for sharing or archiving.
- Code handling – Detects code blocks, applies syntax highlighting, and adds a one‑click copy button.
- Image generation – If the selected provider offers an image endpoint, you can request pictures by typing “show me an image of …”. The UI automatically picks the provider‑specific image model (e.g.,
gpt-image-2for OpenAI). - Streaming responses – Shows the model’s output as it arrives, mimicking the real‑time feel of ChatGPT.
- Mobile‑friendly – Responsive layout works on phones and tablets.
- Desktop build – Using Tauri (Rust‑based), the web app can be packaged as a native desktop application for Windows/macOS/Linux.
- Docker support – A
docker composefile can spin up the UI together with a mocked API for testing or offline demos.
Typical workflow
- Open the hosted page (or your own deployment) at
https://niek.github.io/chatgpt-web/. - Choose a provider from the setup screen, paste your API key, and let the app list the available models.
- Start a new chat, optionally picking a pre‑loaded prompt or writing your own system prompt.
- Type or speak your message; the app forwards it to the selected endpoint and streams the reply.
- Chats persist locally; you can export them or clear the storage at any time.
Getting started (developer‑focused)
- Run locally
npm ci # install exact dependencies npm run dev # start Vite dev server (http://localhost:5173) - Build for production
npm run build # creates a static `dist/` folder ready for any static host - Update the bundled prompt list
npm run update-prompts # fetches the latest 100 top‑voted prompts from the public API - Docker –
docker compose up -dlaunches the UI and a mock API. SetVITE_PROVIDER=customandVITE_API_BASE=http://localhost:5174in.envto point the UI at the mock. - Desktop app – After installing Rust, run
npm run tauri devfor a development window ornpm run tauri buildto produce binaries insrc-tauri/target.
Who might use it
- Privacy‑conscious users who want a chat UI without sending conversation logs to a third‑party website.
- Developers testing multiple LLM providers or comparing model behaviours side‑by‑side.
- Educators / trainers who need a simple, self‑hosted interface for classroom demos.
- Open‑source enthusiasts who want to fork, extend, or embed the UI in their own projects.
License & community
- License: GPL‑3.0 (full source available, you can host, modify, and redistribute under the same license).
- Contributors: The project follows the all‑contributors model; dozens of people have contributed code, ideas, design, and documentation.
- Issue tracking & PRs: Open on GitHub; the README includes guidance for adding new prompts, customizing the mock API, and building the desktop version.
Bottom line
ChatGPT‑web is a practical, privacy‑first front‑end for any OpenAI‑compatible chat service. It bundles useful extras (voice, image generation, prompt library, export) while staying lightweight enough to run entirely in the browser or as a tiny desktop app.
Related
- Project
- Project
- Project
- Project
- Project