opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

A static DeepSeek chat demo where the browser talks directly to the API
GitHub RepoViews48

Project Description

View on GitHub

A DeepSeek Chat Demo That Runs Entirely in Your Browser

Most chat demos come with a backend you have to stand up, configure, and babysit. What if the browser just talked to the API directly? That's exactly what DeepSeek's chat-demo does—it's a static chat interface where your browser connects straight to the configured API service, no application backend in the middle.

What It Does

chat-demo is a static chat application powered by the DeepSeek API. There's no server component on the app side: the browser talks directly to the API service you point it at. You can try it online, or download an archive from Releases, extract it, and double-click index.html to run it locally—no installation, no build step. You'll need to enter an API key in Settings before your first chat.

If you want to work on it, the project uses Node.js 22.12+ and pnpm. The dev server runs on port 8090, and pnpm build spits out a static site into dist/ that you can deploy anywhere or open directly. The config in rspack.config.ts defaults to https://api.deepseek.com, and a createConfig({ apiOrigin, devServer }) helper lets you customize the API origin and dev proxy. Chat defaults to deepseek-flash through Anthropic-compatible Messages / Files APIs, with speech features hitting ASR / TTS endpoints.

Why It's Cool

  • The architecture is refreshingly simple. No backend means no deployment headaches. It's a static site that happens to make API calls. That's the whole trick, and it's a good one—especially for a demo you want people to actually try rather than read about.

  • The feature list punches above its weight. Multiple conversations with automatic titles, renaming, deletion, prompt editing, reply regeneration, and message branch switching. Streaming replies, deep thinking, smart search, link reading, and source citations are all in there. You can stop generation or continue eligible replies.

  • Input options are more generous than you'd expect. Upload, paste, or drag and drop attachments. Voice input and read-aloud replies. On mobile, a live audio spectrum shows up in the first row of the input area while you're recording—a small touch that shows someone cared about the details.

  • Rendering is handled properly. Markdown, syntax highlighting, KaTeX math, and Mermaid diagrams. For a static demo, that's a solid set of things that usually break in lesser implementations.

  • It's honest about where your data goes. The README spells out the storage model clearly: API key and settings live in localStorage, conversations and original attachments in IndexedDB, isolated by browser profile and site origin. It also tells you plainly that sending messages, uploading attachments, and using speech features sends that content to the configured API service. No hand-waving.

  • Import/export is thought through. History export uses ZIP archives, and importing replaces all local conversations and attachments after validation. Exports include conversations and locally available original images but deliberately exclude API keys, settings, and original non-image attachments. There's even a "Delete all chats" action that clears local data while preserving your key and settings.

The one caveat worth flagging: opening dist/index.html directly requires browser support for storage on file:// pages, plus an API service that permits those cross-origin requests. The README says so, and it's the kind of thing you'll want to test before handing a build to someone.

How to Try It

The fastest path is the online demo, but running it locally is just as easy:

  1. Download the archive from Releases, extract it, and double-click index.html.
  2. Enter your API key in Settings.
  3. Start chatting.

For development, clone the repo and run:

git clone https://github.com/deepseek-ai/chat-demo.git
cd chat-demo
pnpm install
pnpm dev

Then open http://localhost:8090. To build the static site:

pnpm build

The output lands in dist/. There are also pnpm type, pnpm lint (oxlint), and pnpm format (oxfmt) commands if you're contributing.

Find the project at github.com/deepseek-ai/chat-demo.

Final Thoughts

chat-demo is a well-scoped example of the "static frontend, direct API" pattern—useful if you're building your own chat client and want to see how someone else handled streaming, storage, and history import/export. The storage model is documented clearly enough that you can reason about the tradeoffs before committing. It's best suited to developers who want a working reference or a quick local chat tool, not a hardened production deployment. Worth a look, especially if you've been putting off building that chat UI yourself.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: chat-demoLast updated: November 16, 2026 at 02:47 AM