A full-stack web application for visualizing and analyzing CPU scheduling algorithms with real-time calculations and interactive Gantt charts.
Status: ✅ PRODUCTION READY | Real Data Only | Fully Documented
Double-click: run-software.batOpens: http://localhost:5173
cpu-scheduling-visualization/
│
├── frontend/ (React Application)
│ ├── src/
│ │ ├── App.tsx
│ │ ├── components/
│ │ ├── main.tsx
│ │ └── index.css
│ ├── package.json
│ ├── vite.config.ts
│ └── index.html
│
├── backend/ (Express API)
│ └── scheduler-api/
│ ├── server.js
│ ├── fcfs_json.exe
│ ├── sjf_json.exe
│ ├── rr_json.exe
│ ├── priority_json.exe
│ ├── fcfs.c
│ ├── sjf.c
│ ├── rr.c
│ ├── priority.c
│ └── package.json
│
├── run-software.bat (Run the application)
├── push-to-github.bat (Push to GitHub)
├── .gitignore
└── README.md (This file)
- FCFS (First Come First Served)
- SJF (Shortest Job First)
- Round Robin (with configurable time quantum)
- Priority Scheduling
- Interactive Gantt Charts
- Real-time Process Metrics
- Waiting Time & Turnaround Time Calculations
- Dark/Light Mode Support
- Export Results as JSON
- Export Results as CSV
- Modern, Responsive Design
- Intuitive Process Input Form
- Real-time Error Messages
- Loading States
Frontend (Port 5173) Backend (Port 3000) C Algorithms
┌─────────────────┐ ┌──────────────────┐ ┌──────────────┐
│ React + TS │──POST────>│ Express.js │─spawn─>│ C Programs │
│ Vite │<──JSON────│ Node.js │<─JSON──│ (.exe) │
│ Tailwind CSS │ │ │ │ │
│ Recharts │ │ /fcfs │ │ fcfs_json │
│ Radix UI │ │ /sjf │ │ sjf_json │
└─────────────────┘ │ /rr │ │ rr_json │
│ /priority │ │ priority_json
└──────────────────┘ └──────────────┘
All endpoints accept POST requests with JSON bodies.
POST http://localhost:3000/fcfs
POST http://localhost:3000/sjf
POST http://localhost:3000/rr
POST http://localhost:3000/priority
- React 18.3.1
- TypeScript
- Vite 6.3.5
- Tailwind CSS
- Recharts (charting)
- Radix UI (components)
- Lucide React (icons)
- Express.js 5.1.0
- Node.js
- C (scheduling algorithms)
- Node.js v16 or higher
- npm or yarn
- Windows OS (for .exe executables)
- Git (for version control)
1. Install Backend Dependencies
cd backend/scheduler-api
npm install2. Install Frontend Dependencies
cd frontend
npm installDouble-click: run-software.batTerminal 1 - Backend:
cd backend/scheduler-api
npm startTerminal 2 - Frontend:
cd frontend
npm run devThen open: http://localhost:5173
- Enter Process ID:
1 - Enter Arrival Time:
0 - Enter Burst Time:
5 - Click "Add Process"
- Choose: FCFS
- Click "Run Algorithm"
- See Gantt Chart
- View Process Metrics
- Check Waiting/Turnaround Times
- ✅ CORS properly configured
- ✅ Input validation on backend
- ✅ Error messages don't expose system details
- ✅ Process isolation for C programs
- ✅ No hardcoded credentials
- Ensure C executables (.exe files) exist
- Check that port 3000 is not in use
- Verify Node.js is installed:
node --version
- Ensure backend is running on port 3000
- Check browser console (F12) for CORS errors
- Verify firewall isn't blocking localhost
npm cache clean --force
rm -r node_modules package-lock.json
npm installDouble-click: push-to-github.batOr manually:
git remote add origin https://github.com/YOUR-USERNAME/cpu-scheduling-visualization.git
git push -u origin masterSee README.md for details.
- Frontend running on port 5173
- Backend running on port 3000
- CORS enabled
- All mock data removed
- Real C algorithm execution
- Error handling in place
- Documentation complete
- Ready for production
✅ PRODUCTION READY
- All features working
- Real data only (no mock data)
- Comprehensive documentation
- Ready for deployment
- Ready for collaboration
- Run App:
run-software.bat - Push to GitHub:
push-to-github.bat - Frontend: http://localhost:5173
- Backend API: http://localhost:3000
This project is provided as-is for educational purposes.
Version: 1.0
Last Updated: November 11, 2025
Status: ✅ Production Ready
Happy Scheduling! 📊