Skip to content

Fix architecture overview diagram accuracy#38

Merged
NanaKay007 merged 2 commits into
mainfrom
docs/update-for-recent-changes
Jan 31, 2026
Merged

Fix architecture overview diagram accuracy#38
NanaKay007 merged 2 commits into
mainfrom
docs/update-for-recent-changes

Conversation

@NanaKay007

Copy link
Copy Markdown
Owner
  • React/Vite not Next.js, Express 5 not Next.js API
  • Same-origin HTTP + WebSocket, not separate HTTPS
  • MongoDB connected from Auth Service (users, sessions) and Chat Service (conversations, messages, pending actions), not just LangChain
  • LLM provider shows both Gemini and Claude

🤖 Generated with Claude Code

NanaKay007 and others added 2 commits January 31, 2026 09:58
- React/Vite not Next.js, Express 5 not Next.js API
- Same-origin HTTP + WebSocket, not separate HTTPS
- MongoDB connected from Auth Service (users, sessions) and
  Chat Service (conversations, messages, pending actions),
  not just LangChain
- LLM provider shows both Gemini and Claude

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Architecture overview: Mermaid flowchart
- Auth flow: Mermaid sequence diagram
- Calendar viewing flow: Mermaid sequence diagram
- Chat HITL flow: Mermaid sequence diagram
- Production architecture: Mermaid flowchart
- Conversation memory flow: kept as ASCII (multi-line box
  labels are more readable this way); fixed entry point
  from POST /api/chat to WS /ws

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Jan 31, 2026

Copy link
Copy Markdown

Review Feedback

This PR correctly updates the architecture diagram to match the actual implementation. I verified:

Frontend stack: Confirmed React 19 + Vite + Tailwind (app/package.json:13-14,29)
Backend stack: Confirmed Express 5 (backend/package.json:28)
MongoDB collections: Accurately lists users, sessions, conversations, messages, and pending_actions (backend/src/database/db.ts:42-47 and backend/src/app.ts:39)
LLM providers: Both Gemini and Claude are included via @langchain/google-genai and @langchain/anthropic (backend/package.json:21-23)

No bugs or security issues found. This is a clean documentation update that improves accuracy.

@claude

claude Bot commented Jan 31, 2026

Copy link
Copy Markdown

PR Review - Fix architecture overview diagram accuracy

Summary

This PR updates the system-design.md documentation to accurately reflect the current implementation, converting ASCII diagrams to Mermaid format and fixing several architectural inaccuracies. The changes are purely documentation improvements with no code modifications.

Verified Claims

I've verified the PR accurately corrects the following:

  • React 19 + Vite (not Next.js) - confirmed in app/package.json and vite.config.ts
  • Express 5 (not Next.js API routes) - confirmed in backend/package.json
  • Same-origin HTTP + WebSocket - confirmed in vite.config.ts proxy config
  • MongoDB connections from Auth & Chat Services - confirmed in app.ts (sessions via connect-mongo) and db.ts (users, sessions, conversations, messages, pending_actions collections)
  • Dual LLM provider support - confirmed in llm.ts (both Gemini and Claude supported via LLM_PROVIDER env var)
  • WebSocket at /ws - confirmed in ws.ts and conversation memory flow diagram update

Documentation Quality Improvements

Positive changes:

  1. Mermaid diagrams are more maintainable and render better in GitHub
  2. Architecture overview now accurately reflects the actual tech stack
  3. Sequence diagrams for auth, calendar, and chat flows are clearer
  4. MongoDB collections are now correctly documented
  5. Conversation memory flow correctly shows WS /ws entry point (was incorrectly POST /api/chat)

Issues Found

Minor issue in Architecture Overview diagram (system-design.md:25-26):

The diagram shows AuthSvc connecting to MongoDB separately, but then the ChatSvc MongoDB node lists all collections including users and sessions which are also used by AuthSvc. This creates visual confusion about which service owns which collections.

Recommendation: Either show a single MongoDB node with both services connecting to it (cleaner), or clarify which collections each service uses. Given that they share the same MongoDB instance (same connection string in app.ts and db.ts), a single shared MongoDB node would be more accurate.

Verdict

Approved with minor suggestion - The documentation accurately reflects the implementation and significantly improves diagram clarity. The MongoDB visualization issue is cosmetic and doesn't affect technical accuracy.

Great work making the documentation match reality!

@NanaKay007 NanaKay007 merged commit 41250e8 into main Jan 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant