How kewlaninaveen5/masterlingo works
This is a full-stack chat and video-calling application with account creation, onboarding, friend discovery and requests, messaging, notifications, and calls. The principal workflow is a user signing in and completing onboarding, then finding friends and starting chat or video calls. The graph follows documented frontend routes and sampled backend auth, user, Redis, Prisma, and call behavior. Chat, notifications, socket event handling, and several route details are represented at subsystem level because their implementation was not sampled.
Main entry points: api.js HTTP API client · App.jsx Route application · server.js Express server · auth.middleware.js Session auth guard
Components 34
Web application
- Route application
frontend/src/App.jsx - Auth and onboarding pages
frontend/src/pages - Friends page
frontend/src/pages/FriendsPage.jsx - Notifications page
frontend/src/pages/NotificationsPage.jsx - HTTP API client
frontend/src/lib/api.js
Identity and onboarding
- Auth routes
backend/src/routes/auth.route.js - Auth handlers
backend/src/controllers/auth/auth.middleware.js - Session auth guard
backend/src/middleware/auth.middleware.js - Auth helper
backend/src/services/authHelper.js
Friends and notifications
- User routes
backend/src/routes/user.route.js - Friend and user handlers
backend/src/controllers/user.controller.js
Chat and calling
- Chat experience
frontend/src/pages/ChatPage.jsx - Call experience
frontend/src/pages/CallPage.jsx - Custom video call
frontend/src/pages/CustomVideoCall.jsx - Incoming call listener
frontend/src/components/GlobalIncomingCallListener.jsx - Chat API client
frontend/src/lib/ChatApi.js - Socket client
frontend/src/lib/sockets.js - Chat routes
backend/src/routes/chat.route.js - Chat middleware
backend/src/middleware/chat.middleware.js - Message middleware
backend/src/middleware/chat.message.middleware.js - Chat controller
backend/src/controllers/chat.controller.js - Chat room helper
backend/src/services/ChatRoomHelper.js - Video call routes
backend/src/routes/videocall.route.js - Call handlers
backend/src/controllers/videocall.controller.js - Call channel model
backend/src/models/VideoCallChannel.js
Backend platform
- Socket server
backend/src/lib/sockets.js - User socket events
backend/src/socketsCommunication/user.js - Express server
backend/src/server.js - Prisma client
backend/src/lib/prismaClient.js - Redis client
backend/src/lib/redis.js - Database connector
backend/src/lib/db.js
Other components
- User
- Cloud PostgreSQL
- Redis service
Connections 48
- User → Route application: uses
frontend/src/App.jsx - Route application → Auth and onboarding pages: routes
frontend/src/App.jsx - Route application → Friends page: routes
frontend/src/App.jsx - Route application → Notifications page: routes
frontend/src/App.jsx - Route application → Chat experience: routes
frontend/src/App.jsx - Route application → Call experience: routes
frontend/src/App.jsx - Route application → Custom video call: routes
frontend/src/App.jsx - Route application → Incoming call listener: renders
frontend/src/App.jsx - Auth and onboarding pages → HTTP API client: requests
frontend/src/lib/api.js - Friends page → HTTP API client: requests
frontend/src/pages/FriendsPage.jsx - Notifications page → HTTP API client: requests
- Chat experience → Chat API client: requests
- Chat API client → HTTP API client: uses HTTP
frontend/src/lib/ChatApi.js - Custom video call → HTTP API client: creates calls
- Incoming call listener → Socket client: listens
- HTTP API client → Auth routes: HTTP requests
frontend/src/lib/api.js - HTTP API client → User routes: HTTP requests
frontend/src/lib/api.js - HTTP API client → Chat routes: HTTP requests
frontend/src/lib/api.js - HTTP API client → Video call routes: HTTP requests
frontend/src/lib/api.js - Express server → Auth routes: mounts
backend/src/server.js - Express server → User routes: mounts
backend/src/server.js - Express server → Chat routes: mounts
backend/src/server.js - Express server → Video call routes: mounts
backend/src/server.js - Express server → Socket server: initializes
backend/src/server.js - Express server → Redis client: connects
backend/src/server.js - Express server → Database connector: connects
backend/src/server.js - Auth routes → Auth handlers: routes to
backend/src/routes/auth.route.js - Auth routes → Session auth guard: routes to
backend/src/routes/auth.route.js - Auth handlers → Auth helper: delegates
backend/src/controllers/auth/auth.middleware.js - Auth helper → Prisma client: queries
backend/src/services/authHelper.js - Auth handlers → Prisma client: queries
backend/src/controllers/auth/auth.middleware.js - Auth handlers → Redis client: stores sessions
backend/src/controllers/auth/auth.middleware.js - Session auth guard → Redis client: checks session
backend/src/middleware/auth.middleware.js - Session auth guard → Auth helper: loads user
backend/src/middleware/auth.middleware.js - User routes → Session auth guard: protects
backend/src/routes/user.route.js - User routes → Friend and user handlers: routes to
backend/src/routes/user.route.js - Friend and user handlers → Prisma client: queries
backend/src/controllers/user.controller.js - Friend and user handlers → Redis client: reads presence
backend/src/controllers/user.controller.js - Chat routes → Session auth guard: protects
backend/src/routes/chat.route.js - Chat routes → Chat middleware: routes to
backend/src/routes/chat.route.js - Chat routes → Message middleware: routes to
backend/src/routes/chat.route.js - Chat middleware → Chat controller: delegates
- Chat middleware → Chat room helper: uses
- Video call routes → Session auth guard: protects
backend/src/routes/videocall.route.js - Video call routes → Call handlers: routes to
backend/src/routes/videocall.route.js - Call handlers → Call channel model: creates and reads
backend/src/controllers/videocall.controller.js - Socket server → Redis client: uses
backend/src/lib/sockets.js - Socket server → User socket events: initializes
backend/src/lib/sockets.js