Skip to content

RutujaGharat-11/Smart-Dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ SmartDispatch โ€“ Intelligent Resource Allocation System

SmartDispatch is a full-stack web application designed to optimize public resource allocation using Operating System scheduling concepts. It simulates real-world dispatch systems (like police/fire services) with role-based access, dynamic resource management, and algorithm-driven task assignment.

๐Ÿ”— Live Demo: https://smart-dispatch-o7y0mkzja-rutujagharat-11s-projects.vercel.app/


๐Ÿ“Œ Problem Statement

Efficient allocation of limited public resources (e.g., emergency services) is a critical challenge. Traditional systems may suffer from delays, unfair prioritization, or resource starvation.

SmartDispatch solves this by:

  • Applying scheduling algorithms
  • Ensuring fair resource distribution
  • Minimizing request wait times

๐Ÿง  Key Features

  • ๐Ÿ” Role-based authentication (User / Admin)
  • ๐Ÿ“ Request submission & tracking system
  • ๐Ÿ“Š Admin dashboard for monitoring requests
  • ๐Ÿš“ Resource management (Available / Unavailable)
  • โš™๏ธ Algorithm-driven scheduling system
  • ๐Ÿ”„ Anti-starvation mechanism for fairness
  • ๐ŸŒ Full-stack deployment (Vercel + Render)

๐Ÿง  Scheduling Algorithm

The core of this system is a scheduler inspired by Operating System concepts:

  • Priority-based scheduling
  • Anti-starvation handling
  • Dynamic task-resource assignment

๐ŸŽฏ Goals:

  • Reduce waiting time
  • Ensure fairness across requests
  • Efficient utilization of resources

๐Ÿ—๏ธ System Architecture

Frontend (Next.js)
โ†“
API Layer (Flask)
โ†“
Scheduler Module
โ†“
SQLite Database

๐Ÿ› ๏ธ Tech Stack

Frontend:

  • Next.js (App Router)
  • React
  • TypeScript
  • Tailwind CSS

Backend:

  • Flask
  • SQLite
  • Flask-CORS
  • Werkzeug (password hashing)

Deployment:

  • Vercel (Frontend)
  • Render (Backend)

๐Ÿ“‚ Project Structure

SmartDispatch/
โ”‚
โ”œโ”€โ”€ app/                # Next.js frontend pages
โ”œโ”€โ”€ components/         # UI components
โ”œโ”€โ”€ scheduler/          # Scheduling logic
โ”œโ”€โ”€ app.py              # Flask backend entry
โ”œโ”€โ”€ auth.py             # Authentication logic
โ”œโ”€โ”€ database.py         # DB operations
โ”œโ”€โ”€ schema.sql          # Database schema
โ””โ”€โ”€ smartdispatch.db    # SQLite database

๐Ÿ‘ฅ User Roles

๐Ÿ‘ค USER

  • Create account
  • Login
  • Submit service requests
  • Track request status

๐Ÿ› ๏ธ ADMIN

  • Login to admin dashboard
  • View all requests
  • Manage resource availability
  • Run scheduling system

๐Ÿ“ธ Screenshots

๐Ÿ‘ค User Dashboard

User Dashboard

๐Ÿ› ๏ธ Admin Dashboard

Admin Dashboard

โš™๏ธ Scheduler

Scheduler

โš™๏ธ Run Locally

1๏ธโƒฃ Backend (Flask)

python -m venv .venv
.venv\Scripts\activate   # (Windows)

pip install flask flask-cors werkzeug
python app.py

Backend runs at:
http://localhost:5000


2๏ธโƒฃ Frontend (Next.js)

npm install
npm run dev

Frontend runs at:
http://localhost:3000


๐Ÿ” Authentication Notes

  • Session-based authentication using Flask sessions

API endpoints:

  • POST /api/login
  • GET /api/check-auth
  • POST /api/logout

๐Ÿ”Œ API Overview

Endpoint Method Description
/api/login POST User/Admin login
/api/logout POST Logout
/api/requests GET Fetch requests
/api/schedule POST Run scheduler

๐Ÿ“ˆ Resume Highlights

  • Built a full-stack resource dispatch system using Next.js and Flask
  • Implemented OS-based scheduling algorithms with anti-starvation logic
  • Designed role-based authentication and admin control panel
  • Deployed scalable application using Vercel and Render

๐Ÿ”ฎ Future Improvements

  • ๐Ÿค– AI-based demand prediction
  • ๐Ÿ“ Real-time location tracking (Maps integration)
  • โšก WebSocket-based live updates
  • ๐Ÿ“Š Advanced analytics dashboard

โญ Final Note

This project demonstrates how core Operating System concepts can be applied to solve real-world problems in resource management and dispatch systems.

About

SmartDispatch is a full-stack web application that applies Operating System scheduling concepts to real-world public resource management. Built using Next.js (App Router), Flask, and SQLite, it supports role-based authentication, dynamic resource control, and algorithm-driven task allocation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors