HRpro is a comprehensive HR Administration System designed to manage employee details and departments efficiently. This project consists of both frontend and backend components built with Node.js and React. It provides user authentication, role-based access control, and CRUD operations for managing employees and departments.
- Features
- Getting Started
- Usage
- Backend (Node.js)
- Frontend (React)
- Authentication
- Role-Based Access Control
- API Endpoints
- Testing
- Deployment
- Continuous Improvement
- Contributing
- License
- User Authentication (Admin, Manager, Employee)
- Role-Based Access Control
- Employee Management (CRUD)
- Department Management (CRUD)
- Secure Password Handling (bcrypt)
- JWT-Based Authentication
- React Frontend with Material-UI
- Scalable Node.js Backend with Express
- MongoDB Database Integration
- Responsive and User-Friendly UI
Before running HRpro, ensure you have the following prerequisites installed:
- Node.js (v14+)
- npm (v6+)
- MongoDB (v4+)
-
Clone the HRpro repository:
git clone https://github.com/Thrinkxs/HR_ADMIN_SYS.git cd hr-admin-sys
cd hr-admin-sys frontend npm install
cd ../hr-admin-sys backend npm install
cd hr-admin-sys backend npm run dev
cd hr-admin-sys frontend npm run dev
PORT=3001 MONGODB_URI=mongodb://localhost/hr_admin_db // Please Key in your own credentials or request one from me JWT_SECRET=your-secret-key // - you can generate one with crypto.randomBytes(64).toString("hex") or openssl rand -hex 64 in the terminal
///Roles
- Admin
- Employee
- Manager
Admin:
- have the highest priviledge in the app.
- Login details: Default login, as stipulated
- Can create employees Can assign managers (boolean)
- can activate or deactivate employees and departments
Employees:
- can login with their default password and email
- Can view their details
Managers:
- can login with their default password and email
- Can view their details and employees and departments under them.
Backend (Node.js) The backend is responsible for handling API requests and managing the MongoDB database. Built with NodeJS, Express and Typescript
Frontend (React) The frontend is built with React and provides a user-friendly interface for HR administrators, managers, and employees. Built with React, Material UI, Tailwind and Typescript
HRpro supports user authentication with different roles:
Admin: Full access to all features and data. Manager: Can manage employees and departments within their assigned departments. Employee: Can view and update their own data but has limited access. To log in, use the provided admin user:
Username: [email protected] Password: TestPass1234
HRpro provides various API endpoints for managing employees and departments [SOME API Endpoint] "api/get/employee" - Get all employees from the DB "api/create" - Create New Employee "/api/get/departments" - Get all department "/api/create-department" - Create New Departments
cd hr-admin-sys frontend npm test
cd hr-admin-sys backend Test locally with POSTMAN