Skip to content

Latest commit

 

History

History
69 lines (57 loc) · 1.52 KB

File metadata and controls

69 lines (57 loc) · 1.52 KB

EMS

Employee Management System (EMS)

A full-stack MERN (MongoDB, Express, React, Node.js) application for managing employees.

Features

  • Add, view, update, and delete employee records
  • RESTful API with Express and MongoDB (Mongoose)
  • Modern React frontend (Vite + React 19)
  • Modular code structure (controllers, models, routers)
  • Environment variable support with dotenv

Project Structure

ems/
├── controllers/         # Express route controllers
├── models/              # Mongoose data models
├── routers/             # Express routers
├── client/              # React frontend (Vite)
│   ├── src/
│   ├── public/
│   └── ...
├── db.js                # MongoDB connection
├── index.js             # Express server entry point
├── package.json         # Backend dependencies
└── ...

Getting Started

Prerequisites

  • Node.js & npm
  • MongoDB
  • Git

Backend Setup

cd ems
npm install
npx nodemon index.js

Frontend Setup

cd client
npm install
npm run dev

Environment Variables

Create a .env file in the root with:

PORT=5000
MONGODB_URI=your_mongodb_connection_string

API Endpoints

  • POST /employee/store - Add new employee
  • GET /employee/all - Get all employees
  • GET /employee/edit/:id - Get employee by ID
  • PUT /employee/update/:id - Update employee
  • DELETE /employee/delete/:id - Delete employee

License

ISC


Feel free to contribute or open issues!