Skip to content

SakithNizar/ems-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘¨β€πŸ’Ό EMS - Employee Management System (Backend)

✨ Overview

The EMS Backend is a scalable RESTful API built with the MERN stack to manage employee records, departments, and HR operations efficiently.

It handles authentication, authorization, and data management while ensuring smooth integration with the EMS frontend application.


πŸš€ Features

πŸ‘₯ Employee Management (CRUD operations) 🏒 Department Management πŸ” Secure Authentication (JWT) πŸ›‘οΈ Role-Based Access Control (Admin / Employee / HR) πŸ“Š RESTful API architecture ⚑ Scalable Node.js backend πŸ—‚οΈ MongoDB data modeling


πŸ› οΈ Tech Stack

  • 🟒 Node.js
  • πŸš‚ Express.js
  • πŸƒ MongoDB
  • 🧩 Mongoose
  • πŸ”‘ JWT Authentication
  • πŸ”’ bcrypt

πŸ“ Project Structure

ems-backend/
 ┣ config/
 ┣ controllers/
 ┣ models/
 ┣ routes/
 ┣ middlewares/
 ┣ services/
 ┣ utils/
 ┣ app.js
 β”— server.js

βš™οΈ Installation

1️⃣ Clone Repository

git clone https://github.com/SakithNizar/ems-backend.git
cd ems-backend

2️⃣ Install Dependencies

npm install

3️⃣ Environment Variables

Create a .env file:

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key

4️⃣ Run Server

npm run dev

πŸ“‘ API Endpoints (Sample)

  • POST /api/auth/register β€” Register user
  • POST /api/auth/login β€” Login user
  • GET /api/employees β€” Get all employees
  • POST /api/employees β€” Create employee
  • PUT /api/employees/:id β€” Update employee
  • DELETE /api/employees/:id β€” Delete employee

πŸ” Security

πŸ”’ JWT authentication πŸ›‘οΈ Protected routes πŸ‘€ Role-based access control πŸ”‘ Password hashing with bcrypt


πŸš€ Future Enhancements

πŸ“Š Admin analytics dashboard πŸ“© Email notifications πŸ”” Real-time updates πŸ“± Mobile API support ⚑ Performance optimization


πŸ‘¨β€πŸ’» Author

Sakith Nizar πŸ”— GitHub: https://github.com/SakithNizar


πŸ“„ License

This project is licensed under the MIT License.

About

πŸ‘¨β€πŸ’Ό The EMS Backend is a RESTful API built using the MERN stack (Node.js, Express.js, and MongoDB) for managing employee data, departments, and organizational operations. It provides secure authentication πŸ”, role-based access control πŸ‘₯, and full CRUD functionality βš™οΈ for employees, allowing efficient HR and administrative management. This bac

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors