This project is an Employee Shift Management System built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. The system allows an admin to view employee availability, create shifts, and assign them to employees based on their availability and time zones.
To get the project up and running, follow the steps below.
-
Clone the repository to your local machine:
git clone <repository-url>
-
Navigate to the backend directory:
cd backend -
Install the required dependencies:
npm install
-
Create a
.envfile in the root of the backend directory and add the following environment variables:MONGO_URI=<your-mongodb-connection-string> JWT_SECRET=<your-jwt-secret-token>
MONGO_URI: This should be your MongoDB connection string.JWT_SECRET: A secret key for JSON Web Token (JWT) authentication.
To start the backend server in development mode, run the following command:
npm run devThe server will start, and you should see output indicating that the server is running and connected to the database.
- Navigate to the frontend directory:
cd frontend- Install the required dependencies:
bash
npm install
###Running the Frontend To start the frontend development server, run the following command:
npm startThis will launch the React application in your default browser at http://localhost:3000.