How subhankar-roy06/banking-backend works
This is a small Express backend centered on account registration. An HTTP client reaches the server, which mounts the authentication routes; the registration controller checks for an existing email and creates a user through the Mongoose model. The model validates account fields and hashes passwords with bcrypt. The server also initiates a MongoDB connection. The excerpts show no registration response after creation, login route, or JWT use, so those behaviors are not represented.
Main entry points: server.js Backend server · app.js Express app · auth.routes.js Auth routes · auth.controller.js Registration controller
Components 9
Server runtime
- Backend server
backend/server.js - Express app
backend/src/app.js
Authentication
- Auth routes
backend/src/routes/auth.routes.js - Registration controller
backend/src/controllers/auth.controller.js
Persistence
- User model
backend/src/models/user.model.js - Password hashing
backend/src/models/user.model.js - DB connection
backend/src/config/db.js
Other components
- HTTP client
- MongoDB
Connections 8
- HTTP client → Backend server: sends HTTP
backend/server.js - Backend server → Express app: starts listener
backend/server.js - Backend server → DB connection: connects database
backend/server.js - Express app → Auth routes: mounts routes
backend/src/app.js - Auth routes → Registration controller: dispatches registration
backend/src/routes/auth.routes.js - Registration controller → User model: checks and creates
backend/src/controllers/auth.controller.js - User model → Password hashing: hashes passwords
backend/src/models/user.model.js - DB connection → MongoDB: connects
backend/src/config/db.js