chatgpt-vue3-light-mvp: a single-turn Vue 3 chat template with a mock mode and a dev-only proxy
A customizable single-turn chat bot web MVP template built with Vue 3, Vite, TypeScript, Naive UI, Pinia and UnoCSS. Integrates mainstream LLM APIs (Xunfei Spark, Zhipu, SiliconFlow, DeepSeek V3/R1) with streaming SSE output, markdown-it with Mermaid/KaTeX rendering, and support for <think> tags.
At a glance
- What is it?
- pdsuwwz/chatgpt-vue3-light-mvp is a MIT-licensed, front-end-only chat bot template on Vue 3, Vite, Naive UI and Pinia. It streams answers from several LLM APIs, but it keeps no conversation history and its proxy only exists in development.
- Who is it for?
- Use it as a starting point for a streaming, single-question LLM demo where Markdown, KaTeX and Mermaid output matter and you are happy to write the backend and any multi-turn memory yourself. Skip it if you need conversation context out of the box or a production-ready proxy.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 115 days ago.
- What is it written in?
- Mainly Vue, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- pdsuwwz/chatgpt-vue3-light-mvp586 ★ · +12
| Repository | 2026-09-15 | 2026-11-22 |
|---|---|---|
| pdsuwwz/chatgpt-vue3-light-mvp | 574 | 586 |
12 Stars in the last 68 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Every question is answered in isolation, with no conversation memory
The project calls itself an MVP and says plainly that it supports only single-turn dialogue. Each question gets an independent response, and no earlier context is kept. The same notice says multi-turn support may come someday but that there is no concrete plan, and it invites you to extend the code yourself.
The consequence for a reader is practical. If your product needs follow-up questions such as "make that shorter", this template will not do it, because the previous answer is never sent back to the model. You would have to add message history to the store, change how each request body is built, and decide how to trim long histories. That work is not a small patch on top of a finished feature; it changes the core request loop the template is built around.
The flip side is that a single-turn design is easy to read. Pinia holds the state, Naive UI draws the interface, and the streaming path has no history bookkeeping to understand first. For prototypes that answer one prompt at a time, such as a code explainer or a formula helper, that simplicity is the selling point.
Mock mode is the default in development and is switched by VITE_ROUTER_MODE
The first entry in the model table is a simulated model with the identifier standard. It needs no API key, runs locally, and is the one used by default in the development environment. This lets you work on the interface, the typewriter output and the rendering without spending tokens.
The switch for the GitHub demo deployment lives in src/config/env.ts:
// src/config/env.ts
/**
* TODO: 若是 Github 演示部署环境,则仅模拟大模型相关策略,不调接口
*/
export const isGithubDeployed = process.env.VITE_ROUTER_MODE === 'hash'
The flag is true whenever VITE_ROUTER_MODE equals hash. The package script build:gh-pages is cross-env VITE_ROUTER_MODE=hash pnpm build, so a GitHub Pages build automatically becomes a mock-only build. The live demo at pdsuwwz.github.io therefore shows simulated answers rather than a real model.
The catch is that the flag is tied to the router mode. If you deploy your own build with hash routing for an unrelated reason, you also turn on the mock behaviour, and real API calls will not happen. Check this flag first when a deployed build answers with canned text.
API keys live in a .env file that a pure front-end project has to expose to its own code
Real models need keys. The template ships a .env.template, and you create your working file with:
cp .env.template .envThen you fill in four variables: VITE_SPARK_KEY, VITE_SILICONFLOW_KEY, VITE_MOONSHOT_KEY and VITE_DEEPSEEK_KEY. The Spark value has a special shape: key and secret joined with a colon, for example key123456:secret123456. The other three are described as usually starting with sk-.
The project is explicitly a pure front-end architecture, with every backend service supplied by something external or local. There is no server of your own in the repository that keeps the key out of the browser. So the key is read by client code, and anyone who can load your deployed bundle is in a position to extract it. The repository's own migration checklist, which the README says covers security, proxy and key handling for other projects, points at the same concern. If you ship this publicly, put a service of your own between the page and the vendor, and keep the key there.
The Ollama and standard entries need no key at all, which makes them the safest choices for a shared demo.
The Vite proxy that avoids CORS only exists while you run the dev server
Calling LLM vendors straight from a browser runs into cross-origin limits, so the repository configures server.proxy in vite.config.ts. Each vendor gets a path prefix that is stripped before forwarding. The first three entries read:
server: {
// ...
proxy: {
'/spark': {
target: 'https://spark-api-open.xf-yun.com',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(/^\/spark/, '')
},
'/siliconflow': {
target: 'https://api.siliconflow.cn',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(/^\/siliconflow/, '')
},
'/moonshot': {
target: 'https://api.moonshot.cn',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(/^\/moonshot/, '')
},A request to /spark/v1/chat/completions on your local server is forwarded to https://spark-api-open.xf-yun.com/v1/chat/completions. A DeepSeek entry follows the same pattern.
The limitation is stated outright: the proxy works only in the development environment. After pnpm build and vite preview or a static host, those prefixes lead nowhere. For production the project suggests three routes: correct CORS response headers, an Nginx reverse proxy, or serving everything from one domain and port. All three are your job, and nothing in the repository provisions them for you.
Seven model identifiers, and the repository description names one the table does not
The supported-model table maps each backend to an identifier and a key variable:
The identifiers are standard for the mock model, ollama3 for Ollama (Llama 3), deepseek-v3 for DeepSeek-V3, deepseek-deep for the DeepSeek-R1 reasoning model, spark, siliconflow and moonshot. The three DeepSeek and vendor rows need VITE_DEEPSEEK_KEY, VITE_SPARK_KEY, VITE_SILICONFLOW_KEY or VITE_MOONSHOT_KEY respectively.
Only standard and ollama3 run without a key, and only Ollama requires a service you install yourself. The other four identifiers need a vendor account.
One mismatch is worth knowing about. The GitHub description lists Xunfei Spark, Zhipu, SiliconFlow and DeepSeek V3/R1, while the README table lists Moonshot and Ollama and has no Zhipu row. If Zhipu is the vendor you need, check the source for an adapter before planning around it. The feature list also says the model set can be freely extended, and the bundled skill describes a model mapping table that isolates each vendor's response format, so adding a model means writing one more adapter rather than rewriting the chat view.
Rendering covers Markdown, code, KaTeX, Mermaid and think blocks, with a pinned KaTeX version
Answers are rendered as rich text. The feature list names markdown-it and highlight.js for code highlighting, Mermaid for flowcharts and sequence diagrams, and KaTeX/LaTeX for formulas. The description adds support for think tags, so a reasoning model such as DeepSeek-R1 can show its reasoning separately from the final answer. Output arrives as streamed text with a typewriter effect, and the bundled skill says the network read speed is decoupled from the display speed through a buffer that emits frame by frame.
Two dependency notes affect anyone upgrading. The project is on Vite 8 and Vue 3.5, and formulas use @vscode/markdown-it-katex together with katex. KaTeX is held at 0.16.x for compatibility with that plugin, and under Vite 8 the KaTeX ESM entry is used explicitly so that CommonJS prebundling does not break formula parsing. Bumping katex to a new minor version is therefore a deliberate risk, not a routine update.
The package.json dependencies also include marked ^18.0.5 and dompurify ^3.4.11, alongside @types/markdown-it in devDependencies. If you plan to customise the rendering pipeline, open the source and confirm which libraries are actually in the path before editing.
The .agents folder is documentation for coding agents, not a runtime feature
Recent versions ship an Agent Skill called chatbot-mvp-distillation, with a Chinese twin named chatbot-mvp-distillation-zh, under .agents/skills/. The project is careful to say these are not runtime features and not an npm package. They are architecture notes meant to be read by an AI coding agent that is building a similar chat product elsewhere.
Each skill has a SKILL.md, an agents/openai.yaml, and a references folder with architecture.md, streaming-sse.md, model-adapters.md and markdown-rendering.md. The English version also lists migration-checklist.md. The topics include the fetch(Response.body), TextDecoderStream and TransformStream chain used to split SSE, JSON and plain text, plus checks for stop-generation, scrolling, empty and completed states.
To invoke it, the suggested prompt is:
Use $chatbot-mvp-distillation to design a reusable streaming chatbot UI for another project.If your agent does not discover project skills on its own, read .agents/skills/chatbot-mvp-distillation/SKILL.md directly and load the referenced files one at a time. None of this changes what the app does when you run it.
Node 22.12, pnpm 10 and a pre-release ESLint extension are the entry price
The prerequisites are Vue 3.x, Node >= 22.12.x, pnpm 10.x, and the VS Code extension dbaeumer.vscode-eslint at version 3.0.5 or later, specifically the pre-release channel. The package.json engines field repeats the Node and pnpm floors, and packageManager pins [email protected]. An older Node install will be the first thing to fail.
Setup is two commands:
pnpm ipnpm devThe dev script is vite --host, so the server is reachable from other machines on your network, and the app opens at http://localhost:2048. Remember that when you are holding a real API key in .env.
On upkeep, the repository is not archived. The last push was on 2026-07-31, which is also the date of release v3.2.0. Earlier tags are v3.1.0 on 2026-06-22 and v3.0.0 on 2026-04-21. The package.json version field still reads 0.0.1, so the release tags, not that field, tell you which version you have. The license is MIT, and the live site is at https://botkit.likemashang.com.
Editorial conclusion
Use it as a starting point for a streaming, single-question LLM demo where Markdown, KaTeX and Mermaid output matter and you are happy to write the backend and any multi-turn memory yourself. Skip it if you need conversation context out of the box or a production-ready proxy. Before committing, run it in mock mode, then confirm the model you want has a working proxy or CORS path in your own deployment.
Frequently asked questions
Does chatgpt-vue3-light-mvp remember earlier messages in a conversation?
No. It is a single-turn design where every question gets an independent response and no context is kept. Multi-turn support has no concrete plan, so you would add it yourself.
Can I try chatgpt-vue3-light-mvp without an API key?
Yes. The standard mock model needs no key and is the default in development, and the Ollama entry (ollama3) needs no key but requires a locally installed Ollama service.
Will the API proxy in chatgpt-vue3-light-mvp work in a production build?
No. The Vite server.proxy configuration only applies in development. For production the project suggests correct CORS headers, an Nginx reverse proxy, or serving front end and API from the same domain and port.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/pdsuwwz-chatgpt-vue3-light-mvp)Star history chart for your README
[](https://hysenlabs.com/projects/pdsuwwz-chatgpt-vue3-light-mvp)Was this useful?