Experience · Repository · Active
cs-chat
Enterprise chat experience with a dedicated NestJS BFF, React workspace, local shared contracts, conversation forks, MCP tools and dedicated PostgreSQL persistence.
- NestJS 11
- Prisma 7
- PostgreSQL
- React 19
- Vite
- Redux Toolkit
- Tailwind 4
Spec sheet
Area
Experience / CS Chat
Public host
http://chat.cs.lvh.me:8080
Runtime shape
apps/api + apps/web + packages/shared
Backend port
3004
Frontend port
5178
Data store
Dedicated PostgreSQL
Responsibilities
- Own chat threads, messages, conversation forks and product-specific chat UX.
- Expose a same-origin BFF that wraps platform auth, platform AI and platform MCP.
- Let users choose the AI provider per thread through the BFF, without direct Core calls from the browser.
- Persist product state in cs-chat-postgres through Prisma.
- Keep frontend traffic same-origin and never direct-to-Core.
Interfaces and contract surface
- GET /api/health
- GET /api/ai/providers
- GET /api/chats
- POST /api/chats/:threadId/messages
- POST /api/chats/:threadId/forks
- GET /api/mcp/tools
Internal modules
Backend
cs-chat api
NestJS BFF for CS Chat, owning chat persistence and same-origin product APIs while delegating auth, direct AI generation, agentic MCP replies and manual MCP tool calls to Core services.
Frontend
cs-chat web
React and Vite frontend for CS Chat, rendering multi-chat navigation, conversation composer, fork actions and MCP tool panels through same-origin APIs.
Package
cs-chat shared
Local shared package for CS Chat contracts, exposing Zod schemas and TypeScript types consumed by the BFF and frontend.
Consumers
- Internal users via chat host
Dependencies and external touchpoints
Notes
- The BFF stores product state locally and delegates shared capabilities to Core services.
- The local stack exposes the experience through chat.cs.lvh.me:8080.
Source references
cs-chat/README.mdcs-chat/AGENTS.mdcs-chat/package.jsoncs-chat/apps/api/package.jsoncs-chat/apps/web/package.jsoncs-chat/packages/shared/package.json