This web-based scheduling system provides a comprehensive platform for both administrators and users to efficiently manage schedules. The system is designed with a default configuration of three shifts per day, accommodating one user per shift, with a total capacity for six users and one administrator.
-
Schedule Management:
- View schedules in list or calendar mode
- Edit and delete schedules directly from the list interface
- Create, edit and delete schedules directly from the calendar interface
- Manage new shifts and review user leave requests
- Review and approve shift exchange requests
-
User Management:
- Modify user access rights
- Grant administrative privileges to users
-
Real-time Messaging:
- One-on-one instant messaging with any user
- Message history tracking
-
Personal Schedule Management:
- View personal schedules
- Submit leave requests
- Track leave request status
- Submit shift exchange requests
-
Profile Customization:
- Upload and manage personal avatar
-
Notification System:
- Access a dashboard for the latest updates
- Receive notifications for schedule changes, leave request status updates and shift exchange request updates
-
Real-time Messaging:
- Direct messaging with administrators and other users
- Message history tracking
- Default setup: 3 shifts per day
- Capacity: 6 users + 1 administrator
- 1 user assigned per shift
- Dual view modes for schedules (list and calendar)
- Intuitive date-based schedule management in calendar mode
- Comprehensive CRUD operations for schedule management
- Integrated leave request system
- User-specific notification system
- Flexible user role management
- Shift exchange request and approval system
- Redis caching for getProfile functionality, optimizing performance for frequent profile access
- Socket.IO real-time chat system with message history management
This project requires the following software to be installed:
- Node.js v18.15.0
- MySQL v8
- Redis v7.2.5
-
Clone the repository:
git clone https://github.com/maomao0007/scheduling-system.git
-
Navigate to the project directory:
cd scheduling-system -
Set environment variables:
Setup steps:
- Duplicate the env.example file in the project root directory.
- Rename the duplicated file to .env.
- Open the .env file and replace the placeholder values with your actual configuration.
Ensure your .env file contains the following variables:
DATABASE_URL=mysql://DB_USERNAME:DB_PASSWORD@localhost:3306/scheduling_system SESSION_SECRET=YOUR_SESSION_SECRET
-
Setup:
- Install dependencies:
npm install
- Create database in MySQL:
CREATE DATABASE scheduling_system; - Create tables:
npx sequelize db:migrate
- Set seed data:
npx sequelize-cli db:seed:all
- Start the application:
npm run dev
- Install dependencies:
-
The server should now be running at
http://localhost:3000. -
To stop the server:
- For local setup: Use
Ctrl + Cin the terminal.
- For local setup: Use
-
Admin Account:
- Username: root@example.com
- Password: 123
-
User Accounts:
- user1@example.com (Password: 123)
- user2@example.com (Password: 123)
- user3@example.com (Password: 123)
- user4@example.com (Password: 123)
- user5@example.com (Password: 123)
- user6@example.com (Password: 123)
- "@fullcalendar/interaction": "^6.1.15"
- "@socket.io/admin-ui": "^0.5.1"
- "bcryptjs": "^2.4.3"
- "connect-flash": "^0.1.1"
- "connect-redis": "^7.1.1"
- "date-fns": "^3.6.0"
- "dayjs": "^1.11.12"
- "debug": "^4.3.7",
- "dotenv": "^16.4.5"
- "eslint": "^9.7.0"
- "express": "^4.19.2"
- "express-handlebars": "^7.1.3"
- "express-session": "^1.18.0"
- "faker": "^6.6.6"
- "fullcalendar": "^6.1.15"
- "handlebars-helper": "^0.0.12"
- "jsonwebtoken": "^9.0.2"
- "method-override": "^3.0.0"
- "multer": "^1.4.5-lts.1"
- "mysql2": "^3.10.3"
- "nodemon": "^3.1.0"
- "passport": "^0.7.0"
- "passport-jwt": "^4.0.1"
- "passport-local": "^1.0.0"
- "redis": "^4.7.0"
- "sequelize": "^6.37.3"
- "sequelize-cli": "^6.6.2"
- "socket.io": "^4.8.0"






