How tola-lemma/employee-management-using-mern-stack works
Employee Management System is a React frontend backed by an Express/MongoDB API. Users register or log in, then manage departments and employees; employee records can include uploaded profile photos. The README documents authenticated department and employee CRUD, while the sampled routes show registration and login are public and protect the management APIs with JWT middleware. UI-to-API calls and backend controller-to-model calls are visible in the excerpts; the upload implementation and Home component were not sampled, so their internal behavior is not inferred.
Main entry points: router.js API routes · AllRouter.js Page routing · Employee.js Employee management · Department.js Department management
Components 19
React application
- Frontend entry
frontend/src/index.js - Page routing
frontend/src/Router/AllRouter.js - Home and auth
frontend/src/Component/Home.js - Department management
frontend/src/Component/Department.js - Employee management
frontend/src/Component/Employee.js - Navigation bar
frontend/src/Navigation Bar/header.js
Express API
- HTTP server
Backend/index.js - API routes
Backend/server/route/router.js - JWT authorization
Backend/server/middleware/auth.js
Management domain
- Registration and login
Backend/server/Controller/user_controller.js - Department operations
Backend/server/Controller/department_controller.js - Employee operations
Backend/server/Controller/Employee_controller.js - Profile photo upload
Backend/server/Controller/fileupload.js
MongoDB persistence
- User records
Backend/server/model/user.js - Department records
Backend/server/model/Deparment_model.js - Employee records
Backend/server/model/Employee_model.js - Database connection
Backend/server/database/connection.js
Other components
- User
- MongoDB
Connections 22
- User → Frontend entry: uses
frontend/src/index.js - Frontend entry → Page routing: renders
frontend/src/index.js - Page routing → Home and auth: routes to
frontend/src/Router/AllRouter.js - Page routing → Department management: routes to
frontend/src/Router/AllRouter.js - Page routing → Employee management: routes to
frontend/src/Router/AllRouter.js - Department management → Navigation bar: renders
frontend/src/Component/Department.js - Employee management → Navigation bar: renders
frontend/src/Component/Employee.js - Home and auth → HTTP server: calls auth API
- Department management → API routes: calls department API
frontend/src/Component/Department.js - Employee management → API routes: calls employee API
frontend/src/Component/Employee.js - Employee management → API routes: uploads photo
frontend/src/Component/Employee.js - HTTP server → API routes: mounts
Backend/index.js - HTTP server → Database connection: connects
Backend/index.js - API routes → JWT authorization: guards routes
Backend/server/route/router.js - API routes → Registration and login: dispatches auth
Backend/server/route/router.js - API routes → Department operations: dispatches
Backend/server/route/router.js - API routes → Employee operations: dispatches
Backend/server/route/router.js - API routes → Profile photo upload: dispatches upload
Backend/server/route/router.js - Registration and login → User records: reads and writes
Backend/server/Controller/user_controller.js - Department operations → Department records: reads and writes
Backend/server/Controller/department_controller.js - Employee operations → Employee records: reads and writes
Backend/server/Controller/Employee_controller.js - Database connection → MongoDB: connects