How ceejaydev1/igraph-it works
iGraph IT is documented as a learning-SDLC/UML-diagram app, but this repository snapshot contains only its Express authentication backend; the frontend and diagram workflows are absent. The visible user workflow is auth API request → route validation/protection → controller logic → Firebase-backed user/OTP/session state, with email OTP delivery and JWT session tokens. The graph represents only relationships shown in the sampled backend sources and README; the OTP model’s Firebase dependency is indexed but its implementation excerpt supports the storage role.
Main entry points: authController.js Auth controller · authRoutes.js Auth routes · firebase.js Firebase Admin · authMiddleware.js Access protection
Components 16
HTTP API
- Express server
igraph-backend/server.js - Auth routes
igraph-backend/routes/authRoutes.js - Request validation
igraph-backend/middleware/validationMiddleware.js
Identity workflows
- Auth controller
igraph-backend/controllers/authController.js - OTP generation
igraph-backend/utils/generateOTP.js
Firebase state
- User records
igraph-backend/models/userModel.js - OTP records
igraph-backend/models/otpModel.js - Session records
igraph-backend/controllers/authController.js - Firebase Admin
igraph-backend/config/firebase.js
Auth security
- JWT utilities
igraph-backend/utils/generateJWT.js - Access protection
igraph-backend/middleware/authMiddleware.js
Email delivery
- Email service
igraph-backend/services/emailService.js
Other components
- API client
- Firebase Auth
- Firestore
- Gmail SMTP
Connections 19
- API client → Express server: sends requests
igraph-backend/server.js - Express server → Auth routes: mounts auth routes
igraph-backend/server.js - Auth routes → Request validation: validates inputs
igraph-backend/routes/authRoutes.js - Auth routes → Access protection: protects logout
igraph-backend/routes/authRoutes.js - Auth routes → Auth controller: dispatches handlers
igraph-backend/routes/authRoutes.js - Auth controller → User records: reads and updates
igraph-backend/controllers/authController.js - Auth controller → OTP records: manages codes
igraph-backend/controllers/authController.js - Auth controller → Session records: stores sessions
igraph-backend/controllers/authController.js - Auth controller → Firebase Auth: creates and verifies
igraph-backend/controllers/authController.js - Auth controller → JWT utilities: issues tokens
igraph-backend/controllers/authController.js - Auth controller → OTP generation: generates codes
igraph-backend/controllers/authController.js - Auth controller → Email service: sends OTP mail
igraph-backend/controllers/authController.js - Access protection → JWT utilities: verifies access tokens
igraph-backend/middleware/authMiddleware.js - Access protection → User records: loads user
igraph-backend/middleware/authMiddleware.js - User records → Firebase Admin: uses database client
igraph-backend/models/userModel.js - OTP records → Firebase Admin: uses database client
igraph-backend/models/otpModel.js - Firebase Admin → Firestore: provides Firestore
igraph-backend/config/firebase.js - Firebase Admin → Firebase Auth: provides Admin Auth
igraph-backend/config/firebase.js - Email service → Gmail SMTP: sends messages
igraph-backend/services/emailService.js