Chatbot MVP Distillation
Use this skill to borrow the architectural lessons from chatgpt-vue3-light-mvp without copying the project blindly.
The source project is a Vue 3 + Vite + TypeScript MVP for single-turn LLM chat. Its reusable ideas are:
- split model-specific streaming formats from UI rendering
- normalize model deltas into plain text chunks before display
- render text with a typewriter buffer so network speed and UI speed are decoupled
- process Markdown, code highlighting, math, Mermaid diagrams, and reasoning blocks as a rendering pipeline
- keep mock streams available so downstream projects can develop without real API keys
Workflow
- Identify the target project's framework, state management, and API boundary.
- Read references/architecture.md for the reusable component boundaries.
- Read references/streaming-sse.md when implementing fetch/SSE/ReadableStream handling.
- Read references/model-adapters.md when adding providers or normalizing response formats.
- Read references/markdown-rendering.md when implementing rich answer rendering.
- Read references/migration-checklist.md before proposing or editing code in another project.
Output Expectations
When using this skill in another project:
- describe the adapted architecture before editing code
- keep provider adapters independent from UI components
- define a small stream delta contract before implementing providers
- include a mock stream path for local development
- call out target-project changes that differ from the Vue MVP
- verify streaming, abort, completion, Markdown, code blocks, math, and Mermaid behavior when feasible
Source Anchors
Use these files as source examples from this repository:
src/views/chat.vuefor input, model selection, reader lifecycle, and stop behaviorsrc/store/business/index.tsfor the service/store boundary that creates readerssrc/components/MarkdownPreview/transform/index.tsfor SSE and JSON chunk splittingsrc/components/MarkdownPreview/models/index.tsfor provider adapters and delta transformssrc/components/MarkdownPreview/index.vuefor typewriter rendering and completion statesrc/components/MarkdownPreview/plugins/markdown.tsfor Markdown, KaTeX, Mermaid, and reasoning-block rendering