How karimansari4/calling-backend works
This repository is a Node.js backend for user accounts and real-time calling. The HTTP workflow mounts authentication and user routes, applies login checks where configured, then runs controllers that read or write user records and return responses. Separately, the Socket.IO server tracks online users and active calls, relaying call signaling and status events. The entry point also connects to MongoDB before listening. The README is empty; the real-time behavior is visible in index.js, while some route and controller relationships are supported by the excerpts and source index.
Main entry points: index.js API Server · authRout.js Auth Routes · userRout.js User Routes · authControler.js Auth Controller
Components 14
HTTP API
- API Server
index.js - Auth Routes
rout/authRout.js - User Routes
rout/userRout.js
Identity and Users
- Auth Controller
routControler/authControler.js - User Controller
routControler/userController.js - Login Check
middleware/isLogin.js - JWT Cookie
utils/jwtToken.js
Real-time Calls
- Call Signaling
index.js - Call State
index.js
Persistence
- User Model
schema/userSchema.js - DB Connector
db/dbConnect.js
Other components
- HTTP Client
- MongoDB
- Socket Client
Connections 16
- HTTP Client → API Server: sends requests
index.js - API Server → Auth Routes: mounts routes
index.js - API Server → User Routes: mounts routes
index.js - Auth Routes → Auth Controller: dispatches to
rout/authRout.js - Auth Routes → Login Check: checks logout
rout/authRout.js - User Routes → User Controller: dispatches to
rout/userRout.js - User Routes → Login Check: checks listing
rout/userRout.js - Auth Controller → User Model: reads and writes
routControler/authControler.js - Auth Controller → JWT Cookie: issues token
routControler/authControler.js - User Controller → User Model: queries
routControler/userController.js - Login Check → User Model: loads user
middleware/isLogin.js - API Server → DB Connector: connects database
index.js - DB Connector → MongoDB: connects to
db/dbConnect.js - Socket Client → Call Signaling: sends socket events
index.js - Call Signaling → Call State: tracks calls
index.js - Call Signaling → Socket Client: relays events
index.js