85 lines
3.9 KiB
Markdown
85 lines
3.9 KiB
Markdown
# Chat Agent WebApp
|
|
|
|
## What This Is
|
|
|
|
A personal AI chat web application built with Blazor WebAssembly and the OpenAI GPT API. Users send messages, receive streaming AI responses rendered as markdown, and manage multiple persistent conversations. The project doubles as an incremental learning journey — each phase introduces one concept with well-documented, explained code, making it suitable as a Blazor tutorial for a developer experienced in C# but new to the framework.
|
|
|
|
## Core Value
|
|
|
|
A working, well-understood AI chat interface — every line of code is intentional and explained, so the builder learns Blazor patterns while shipping a real product.
|
|
|
|
## Requirements
|
|
|
|
### Validated
|
|
|
|
(None yet — ship to validate)
|
|
|
|
### Active
|
|
|
|
- [ ] Send messages to OpenAI GPT and display responses
|
|
- [ ] Stream AI responses token-by-token in real time
|
|
- [ ] Render AI responses as formatted markdown
|
|
- [ ] Create, switch between, and delete multiple conversations
|
|
- [ ] Persist conversation history to JSON files across sessions
|
|
- [ ] Clean, responsive chat UI with message bubbles and input area
|
|
- [ ] Well-commented code with inline explanations of Blazor concepts
|
|
- [ ] Incremental build structure — each phase introduces one concept
|
|
|
|
### Out of Scope
|
|
|
|
- Authentication/login — single user, no auth needed
|
|
- Database (SQL Server, PostgreSQL) — JSON file storage is sufficient for personal use
|
|
- Deployment/hosting — local development only for v1
|
|
- Multi-user support — personal tool
|
|
- OAuth or third-party login — not needed
|
|
- LangChain / agentic workflows — deferred to v2 milestone
|
|
- RAG (retrieval-augmented generation) — deferred to v2 milestone
|
|
- MCP servers — deferred to v2 milestone
|
|
|
|
## Context
|
|
|
|
- Builder is experienced in C# but new to Blazor — Blazor-specific patterns (components, lifecycle, dependency injection, SignalR for streaming) need clear inline documentation
|
|
- Project serves as both a real tool and a structured learning path
|
|
- v2 milestone will layer agentic capabilities: LangChain for workflow orchestration, RAG for document retrieval, and MCP servers for tool integration
|
|
- Blazor WebAssembly chosen — runs client-side in the browser, needs a separate backend API for OpenAI calls (API key must not be exposed to client)
|
|
- OpenAI GPT is the LLM backend (GPT-4o or latest available)
|
|
- JSON file storage on disk — simplest persistence, no database setup
|
|
|
|
## Constraints
|
|
|
|
- **Tech stack**: .NET / C# / Blazor WebAssembly — non-negotiable
|
|
- **LLM provider**: OpenAI GPT API
|
|
- **Storage**: JSON files on local disk
|
|
- **Architecture**: WASM client + backend API (API key stays server-side)
|
|
- **Code style**: Every Blazor concept introduced must have inline comments explaining what it does and why
|
|
|
|
## Key Decisions
|
|
|
|
| Decision | Rationale | Outcome |
|
|
|----------|-----------|---------|
|
|
| Blazor WebAssembly over Server | User preference — client-side execution | — Pending |
|
|
| JSON file storage over SQLite/SQL | Simplest option for single-user personal tool | — Pending |
|
|
| OpenAI GPT as sole LLM provider | User preference for v1; multi-provider deferred | — Pending |
|
|
| Tutorial-style incremental phases | Project doubles as Blazor learning path | — Pending |
|
|
| v1 = chat, v2 = agentic features | Ship working chat first, layer LangChain/RAG/MCP later | — Pending |
|
|
|
|
## Evolution
|
|
|
|
This document evolves at phase transitions and milestone boundaries.
|
|
|
|
**After each phase transition** (via `/gsd:transition`):
|
|
1. Requirements invalidated? → Move to Out of Scope with reason
|
|
2. Requirements validated? → Move to Validated with phase reference
|
|
3. New requirements emerged? → Add to Active
|
|
4. Decisions to log? → Add to Key Decisions
|
|
5. "What This Is" still accurate? → Update if drifted
|
|
|
|
**After each milestone** (via `/gsd:complete-milestone`):
|
|
1. Full review of all sections
|
|
2. Core Value check — still the right priority?
|
|
3. Audit Out of Scope — reasons still valid?
|
|
4. Update Context with current state
|
|
|
|
---
|
|
*Last updated: 2026-03-27 after initialization*
|