How ratheshan03/matrimony-backend works
This is an Express backend for a matrimony service. The main workflow accepts profile registration, lets administrators review and approve submissions, then supports login and authenticated profile discovery and management. Controllers own these domain operations and use Mongo-backed models; profile operations also include photo storage and caching. The map preserves authentication, administration, profile features, and supporting infrastructure. Redis initialization is commented out, and some configuration/service implementations were not shown, so uncertain infrastructure links are omitted or marked unverified.
Main entry points: server.js Express server · adminController.js Review and account admin · profileRoutes.js Profile routes · profileController.js Profile discovery and media
Components 21
HTTP entry
- Express server
server.js - Auth routes
routes/authRoutes.js - Profile routes
routes/profileRoutes.js - Admin routes
routes/adminRoutes.js
Identity
- Authentication
controllers/authController.js - Token protection
middlewares/authMiddleware.js - User records
models/User.js
Profiles
- Profile discovery and media
controllers/profileController.js - Profile records
models/Profile.js - Photo upload parsing
middlewares/uploadMiddleware.js
Administration
- Review and account admin
controllers/adminController.js - Admin authorization
middlewares/adminMiddleware.js - Credential generation
utils/generateCredentials.js - Approval email
services/emailService.js
Infrastructure
- Database connection
config/db.js - Cloud storage config
config/gcs.js - Redis client config
config/redisClient.js
Other components
- API client
- MongoDB
- Cloud object storage
- Redis
Connections 24
- API client → Express server: sends requests
server.js - Express server → Database connection: connects database
server.js - Express server → Auth routes: mounts routes
server.js - Express server → Profile routes: mounts routes
server.js - Express server → Admin routes: mounts routes
server.js - Auth routes → Authentication: dispatches requests
routes/authRoutes.js - Profile routes → Profile discovery and media: dispatches requests
routes/profileRoutes.js - Profile routes → Token protection: protects routes
routes/profileRoutes.js - Profile routes → Photo upload parsing: parses uploads
routes/profileRoutes.js - Admin routes → Review and account admin: dispatches requests
routes/adminRoutes.js - Authentication → User records: reads and updates
controllers/authController.js - Authentication → Profile records: creates profiles
controllers/authController.js - Token protection → User records: loads user
middlewares/authMiddleware.js - Profile discovery and media → Profile records: queries and updates
controllers/profileController.js - Profile discovery and media → Cloud storage config: uploads and deletes
controllers/profileController.js - Profile discovery and media → Redis client config: reads and writes cache
controllers/profileController.js - Review and account admin → Profile records: reviews profiles
controllers/adminController.js - Review and account admin → User records: updates accounts
controllers/adminController.js - Review and account admin → Credential generation: generates credentials
controllers/adminController.js - Review and account admin → Approval email: sends approval email
controllers/adminController.js - Admin authorization → User records: checks account
middlewares/adminMiddleware.js - Database connection → MongoDB
- Cloud storage config → Cloud object storage
- Redis client config → Redis