How macworldgithub/neximet-backend works
Neximet is an enterprise portal backend for employee administration and project delivery. Users authenticate through the API, then use role- and department-scoped project/task, attendance/deduction, leave, and dashboard workflows; managers also maintain project scopes and time logs. The server mounts the documented route families, and controllers perform domain operations through Mongoose models. Sampled controller excerpts support several specific data relationships; unsampled controller internals are represented as domain capabilities without speculative wiring.
Main entry points: server.js Express server · auth.js Authentication · rbac.js Role authorization · projectRoutes.js Project routes
Components 29
API entry
- Express server
src/server.js - DB connection
src/config/db.js
Identity and access
- Auth routes
src/routes/authRoutes.js - Identity management
src/controllers/authController.js - Authentication
src/middleware/auth.js - Role authorization
src/middleware/rbac.js
Project delivery
- Project routes
src/routes/projectRoutes.js - Project operations
src/controllers/projectController.js - Task routes
src/routes/taskRoutes.js - Task and time logs
src/controllers/taskController.js - Scope uploads
src/middleware/upload.js
Workforce operations
- Dashboard routes
src/routes/dashboardRoutes.js - Workforce dashboard
src/controllers/dashboardController.js - Attendance routes
src/routes/attendanceRoutes.js - Attendance and pay
src/controllers/attendanceController.js - Deduction routes
src/routes/deductionRoutes.js - Deduction rules
src/controllers/deductionController.js - Leave routes
src/routes/leaveRoutes.js - Leave management
src/controllers/leaveController.js
Persistence
- Employee records
src/models/User.js - Project records
src/models/Project.js - Task records
src/models/Task.js - Time records
src/models/TimeLog.js - Attendance records
src/models/Attendance.js - Deduction rules
src/models/DeductionRule.js - Leave requests
src/models/LeaveRequest.js - Holiday records
src/models/Holiday.js
Other components
- Portal clients
- MongoDB
Connections 48
- Portal clients → Express server: sends requests
- Express server → DB connection: connects
- Express server → Auth routes: mounts API
- Express server → Project routes: mounts API
- Express server → Task routes: mounts API
- Express server → Dashboard routes: mounts API
- Express server → Attendance routes: mounts API
- Express server → Deduction routes: mounts API
- Express server → Leave routes: mounts API
- DB connection → MongoDB: connects
- Auth routes → Authentication: protects routes
- Auth routes → Role authorization: checks roles
- Auth routes → Identity management: dispatches
- Identity management → Employee records: reads and writes
- Project routes → Authentication: protects routes
- Project routes → Role authorization: checks roles
- Project routes → Scope uploads: parses uploads
- Project routes → Project operations: dispatches
- Project operations → Project records: reads and writes
- Project operations → Task records: reads tasks
- Task routes → Authentication: protects routes
- Task routes → Role authorization: checks roles
- Task routes → Task and time logs: dispatches
- Task and time logs → Task records: reads and writes
- Task and time logs → Time records: reads and writes
- Task and time logs → Project records: reads and updates
- Dashboard routes → Authentication: protects routes
- Dashboard routes → Workforce dashboard: dispatches
- Workforce dashboard → Project records: reads projects
- Workforce dashboard → Employee records: reads employees
- Workforce dashboard → Attendance records: reads attendance
- Workforce dashboard → Leave requests: reads leave
- Attendance routes → Authentication: protects routes
- Attendance routes → Role authorization: checks roles
- Attendance routes → Attendance and pay: dispatches
- Attendance and pay → Employee records: reads employee
- Attendance and pay → Deduction rules: reads rules
- Attendance and pay → Attendance records: reads and writes
- Deduction routes → Authentication: protects routes
- Deduction routes → Role authorization: checks roles
- Deduction routes → Deduction rules: dispatches
- Deduction rules → Deduction rules: reads and writes
- Deduction rules → Attendance records: reads records
- Leave routes → Authentication: protects routes
- Leave routes → Role authorization: checks roles
- Leave routes → Leave management: dispatches
- Leave management → Leave requests: reads and writes
- Leave management → Holiday records: reads and writes