How dakshchauhan2005/snapseek works
SnapSeek is a React chat workspace backed by an Express API. Users register or sign in, then create and manage persistent chats; sending a message saves it through HTTP before assistant generation streams over Socket.IO and the completed reply is persisted. The map also includes email and Google authentication, device-aware sessions, and optional web search. Relationships come from the shown source and README; unsampled UI and integration details are included only where documented.
Main entry points: auth.controller.js Auth controller · chat.controller.js Chat controller · auth.routes.js Auth routes · device.model.js Device sessions
Components 30
Frontend experience
- App routing
FRONTEND/src/app/app.routes.jsx - Auth pages
FRONTEND/src/features/auth/pages/Login.jsx - Auth actions
FRONTEND/src/features/auth/hook/useAuth.js - Auth API client
FRONTEND/src/features/auth/services/auth.api.js - Chat dashboard
FRONTEND/src/features/chat/pages/Dashboard.jsx - Chat actions
FRONTEND/src/features/chat/hooks/useChat.js - Chat state and socket
FRONTEND/src/features/chat/chat.slice.js - Chat API client
FRONTEND/src/features/chat/services/chat.api.js
Identity and sessions
- Express application
BACKEND/src/app.js - Auth routes
BACKEND/routes/auth.routes.js - Auth controller
BACKEND/controller/auth.controller.js - Google OAuth controller
BACKEND/controller/googleAuth.controller.js - Google account resolver
BACKEND/services/googleAuth.service.js - Session service
BACKEND/services/session.service.js - Email delivery
BACKEND/services/mail.service.js
Chat and generation
- Chat routes
BACKEND/routes/chat.routes.js - Chat controller
BACKEND/controller/chat.controller.js - AI generation
BACKEND/services/ai.service.js - Socket.IO server
BACKEND/socket/server.socket.js
Persistence and integrations
- User records
BACKEND/model/user.model.js - Device sessions
BACKEND/model/device.model.js - Chat records
BACKEND/model/chat.model.js - Message records
BACKEND/model/message.model.js - MongoDB connection
BACKEND/config/db.js
Other components
- User
- MongoDB
- Email provider
- Google OAuth
- Groq model
- Tavily search
Connections 38
- User → App routing: uses
FRONTEND/src/app/app.routes.jsx - App routing → Auth pages: routes to
FRONTEND/src/app/app.routes.jsx - App routing → Chat dashboard: routes to
FRONTEND/src/app/app.routes.jsx - Auth pages → Auth actions: uses
FRONTEND/src/features/auth/pages/Login.jsx - Auth actions → Auth API client: calls
FRONTEND/src/features/auth/hook/useAuth.js - Auth API client → Auth routes: calls
README.md - Chat actions → Chat API client: calls
FRONTEND/src/features/chat/hooks/useChat.js - Chat actions → Chat state and socket: updates
FRONTEND/src/features/chat/hooks/useChat.js - Chat API client → Chat routes: calls
README.md - Chat dashboard → Chat actions: uses
- Express application → Auth routes: mounts
BACKEND/src/app.js - Express application → Chat routes: mounts
BACKEND/src/app.js - Express application → MongoDB connection: connects
BACKEND/src/app.js - Auth routes → Auth controller: routes to
BACKEND/routes/auth.routes.js - Auth routes → Google OAuth controller: routes to
BACKEND/routes/auth.routes.js - Auth controller → User records: reads and writes
BACKEND/controller/auth.controller.js - Auth controller → Device sessions: deletes
BACKEND/controller/auth.controller.js - Auth controller → Session service: starts session
BACKEND/controller/auth.controller.js - Auth controller → Email delivery: sends mail
BACKEND/controller/auth.controller.js - Google OAuth controller → Google account resolver: resolves account
BACKEND/controller/googleAuth.controller.js - Google OAuth controller → Session service: starts session
BACKEND/controller/googleAuth.controller.js - Google OAuth → Auth routes: returns callback
README.md - Session service → Device sessions: upserts session
BACKEND/services/session.service.js - Email delivery → Email provider: delivers email
README.md - Chat routes → Chat controller: routes to
BACKEND/routes/chat.routes.js - Chat controller → Chat records: reads and writes
BACKEND/controller/chat.controller.js - Chat controller → Message records: reads and writes
BACKEND/controller/chat.controller.js - Chat controller → AI generation: generates reply
BACKEND/controller/chat.controller.js - Chat controller → Socket.IO server: emits events
BACKEND/controller/chat.controller.js - Socket.IO server → Chat records: checks ownership
BACKEND/socket/server.socket.js - Socket.IO server → Device sessions: checks session
BACKEND/socket/server.socket.js - AI generation → Groq model: generates tokens
README.md - AI generation → Tavily search: searches optionally
README.md - MongoDB connection → MongoDB: connects
README.md - User records → MongoDB: persists in
README.md - Device sessions → MongoDB: persists in
README.md - Chat records → MongoDB: persists in
README.md - Message records → MongoDB: persists in
README.md