How bhargav-sadineni/fullstack-ems works
This is an employee-management system for administrators and employees. Users sign in, then use role-specific views to manage employee records, attendance, leave, payslips, profiles, and dashboard information; an assistant also answers questions using HR data. The client routes requests through a shared HTTP client to the Express API, whose protected routes delegate to domain controllers and MongoDB models. Scheduled and event-driven attendance and leave reminders are a separate capability. Edges reflect shown routes, imports, and calls; some backend route-to-controller links are supported by the source index rather than full excerpts.
Main entry points: server.js Express API · App.jsx Application routes · axios.js HTTP client · Employee.js Employee records
Components 30
Web client
- Application routes
client/src/App.jsx - Session context
client/src/context/AuthContext.jsx - HTTP client
client/src/api/axios.js - Login form
client/src/components/LoginForm.jsx - App layout
client/src/pages/Layout.jsx - Dashboard view
client/src/pages/Dashboard.jsx - Employee management
client/src/pages/Employees.jsx - Attendance view
client/src/pages/Attendance.jsx - Leave view
client/src/pages/Leave.jsx - Payslip views
client/src/pages/Payslips.jsx - Chat widget
client/src/components/ChatWidget.jsx
API and workflows
- Express API
server/server.js - Auth middleware
server/middleware/auth.js - Reminder workflows
server/inngest/index.js
HR domains
- Authentication
server/controllers/authController.js - Employee records
server/controllers/employeeController.js - Attendance operations
server/controllers/attendanceController.js - Leave applications
server/controllers/leaveController.js - Payslip operations
server/controllers/payslipController.js - Dashboard data
server/controllers/dashboardController.js - Employee profile
server/controllers/profileController.js - HR assistant
server/controllers/chatbotController.js
Persistent data
- MongoDB connection
server/config/db.js - User records
server/models/User.js - Employee records
server/models/Employee.js - Attendance records
server/models/Attendance.js - Leave records
server/models/LeaveApplication.js - Payslip records
server/models/Payslip.js
Other components
- Administrator or employee
- Google Gemini
Connections 46
- Administrator or employee → Application routes: uses
client/src/App.jsx - Application routes → Login form: routes to
client/src/App.jsx - Application routes → App layout: routes to
client/src/App.jsx - Application routes → Dashboard view: routes to
client/src/App.jsx - Application routes → Employee management: routes to
client/src/App.jsx - Application routes → Attendance view: routes to
client/src/App.jsx - Application routes → Leave view: routes to
client/src/App.jsx - Application routes → Payslip views: routes to
client/src/App.jsx - Login form → Session context: signs in through
client/src/components/LoginForm.jsx - Session context → HTTP client: requests session
client/src/context/AuthContext.jsx - App layout → Chat widget: renders
client/src/pages/Layout.jsx - Dashboard view → HTTP client: requests data
client/src/pages/Dashboard.jsx - Employee management → HTTP client: requests data
client/src/pages/Employees.jsx - Attendance view → HTTP client: requests data
client/src/pages/Attendance.jsx - Leave view → HTTP client: requests data
client/src/pages/Leave.jsx - Payslip views → HTTP client: requests data
client/src/pages/Payslips.jsx - Chat widget → HTTP client: sends chat
client/src/components/ChatWidget.jsx - HTTP client → Express API: calls API
- Express API → Auth middleware: protects routes
- Express API → Authentication: routes requests
- Express API → Employee records: routes requests
- Express API → Attendance operations: routes requests
- Express API → Leave applications: routes requests
- Express API → Payslip operations: routes requests
- Express API → Dashboard data: routes requests
server/server.js - Express API → Employee profile: routes requests
server/server.js - Express API → HR assistant: routes requests
server/server.js - Employee records → User records: creates and updates
server/controllers/employeeController.js - Employee records → Employee records: reads and writes
server/controllers/employeeController.js - Authentication → User records: reads credentials
server/controllers/authController.js - Attendance operations → Attendance records: reads and writes
server/controllers/attendanceController.js - Attendance operations → Employee records: loads employee
server/controllers/attendanceController.js - Leave applications → Employee records: loads employee
server/controllers/leaveController.js - Leave applications → Leave records: reads and writes
server/controllers/leaveController.js - Leave applications → Reminder workflows: sends event
server/controllers/leaveController.js - Payslip operations → Payslip records: reads and writes
server/controllers/payslipController.js - Payslip operations → Employee records: loads employee
server/controllers/payslipController.js - HR assistant → Employee records: queries and updates
server/controllers/chatbotController.js - HR assistant → Attendance records: queries
server/controllers/chatbotController.js - HR assistant → Leave records: queries
server/controllers/chatbotController.js - HR assistant → Google Gemini: sends interactions
server/controllers/chatbotController.js - Reminder workflows → Attendance records: checks attendance
server/inngest/index.js - Reminder workflows → Employee records: loads employees
server/inngest/index.js - Reminder workflows → Leave records: checks leave
server/inngest/index.js - Express API → MongoDB connection: connects
server/server.js - Employee records → User records: references
server/models/Employee.js