This repository includes the both frontend & backend source codes for simple employee manager full-stack project. This project handles CRUD operations for employee management, including creating, retrieving, updating, and deleting employee records.
The frontend is built on NextJs and backend is build on NodeJS with express and mongoDB.
All the state management done by using Redux and Redux toolkit.
-
Navigate to the backend directory by running
cd backend
-
Install the dependencies by running
npm install
-
Create a new database cluster by using mongoDB Atlas & add
database cluster URL
,username
andpassword
into .env file. -
Completing the configurations, To run the server application by running
npm run dev
in developer mode. -
To run unit tests by running
npm run test
in test mode.
-
Navigate to the frontend directory by running
cd frontend
-
Install the dependencies by running
npm install
-
Add backend base url into .env
-
Completing the configurations, To run the frontend application by running
npm run dev
Method | Endpoint | Description |
---|---|---|
GET | /api/v1/ping | Health check endpoint |
POST | /auth/login | Login endpoint |
POST | /auth/logout | Logout endpoint |
GET | /api/v1/user | List all users. |
POST | /api/v1/user | Add a new user. |
PUT | /api/v1/user/:id | Update an existing user by user id. |
DELETE | /api/v1/user/:id | Delete an existing user by user id. |
API Documentation - Please check the docs directory