How anujsaroj7518-ops/sigmagpt works
SigmaGPT is a React chat interface backed by an Express API, MongoDB thread history, and Groq-hosted chat completions. The main workflow is user prompt → API chat handler → AI reply and persisted messages → rendered conversation; users can also create, switch, list, and delete threads. The README additionally describes Markdown, message actions, scrolling, and profile/plan/logout options. Source confirms the rendering and UI affordances, but does not show working account, settings, plan, or logout services; unsampled wiring is omitted.
Main entry points: ChatWindow.jsx Chat window · chat.js Chat routes · App.jsx App state · Sidebar.jsx Thread sidebar
Components 13
Chat interface
- React mount
Frontend/src/main.jsx - App state
Frontend/src/App.jsx - Shared context
Frontend/src/MyContext.jsx - Thread sidebar
Frontend/src/Sidebar.jsx - Chat window
Frontend/src/ChatWindow.jsx - Chat display
Frontend/src/Chat.jsx
Chat API
- Express server
Backend/server.js - Chat routes
Backend/routes/chat.js
History and AI
- Thread model
Backend/models/Thread.js - MongoDB
- Completion client
Backend/utils/openai.js
Other components
- User
- Groq API
Connections 16
- User → Chat window: enters prompts
- React mount → App state: mounts
- App state → Thread sidebar: renders
- App state → Chat window: renders
- App state → Shared context: provides state
- Thread sidebar → Shared context: reads and updates
- Chat window → Shared context: reads and updates
- Chat window → Chat display: renders
- Chat window → Chat routes: posts prompt
- Thread sidebar → Chat routes: loads and deletes threads
- Express server → Chat routes: mounts API
- Express server → MongoDB: connects
- Chat routes → Thread model: queries and saves
- Thread model → MongoDB: persists documents
- Chat routes → Completion client: requests completion
- Completion client → Groq API: sends completion request