A web-based system to manage company employees, departments, and roles using the MERN stack (MongoDB, Express.js, React.js, Node.js). This project allows Admin users to manage departments, employees, and view summary statistics.
- Authentication: Secure Login for Admins.
- Employee Management: CRUD operations, Search, Filter by Department, Pagination.
- Department Management: Create, Read, Update, Delete Departments.
- File Upload: Profile photo upload for employees.
- Role-based Access: Admin role implemented.
- Frontend: React.js, Tailwind CSS, Vite
- Backend: Node.js, Express.js
- Database: MongoDB
- Security: JWT, Bcrypt
- Node.js installed
- MongoDB installed and running locally or Atlas URI
git clone https://github.com/30tools/employee-mern.git
cd employee-mernNavigate to the server directory:
cd serverInstall dependencies:
npm installCreate a .env file based on .env.example:
cp .env.example .envUpdate .env with your MongoDB URI and Secret Keys.
Run the User Seed (to create Admin account):
node userSeed.jsNote: Default Admin credentials will be logged to console or specified in seed file (admin@gmail.com / admin)
Start the server:
npm run devNavigate to the client directory:
cd ../clientInstall dependencies:
npm installStart the React app:
npm run devAccess the app at http://localhost:5173.
client/: React Frontendserver/: Express Backend