An advanced, AI-powered full-stack aviation crew scheduling system β automating crew assignment, conflict detection, duty compliance, and flight operations management for airlines. Built as a Final Year T.E. AI & DS Project.
| Interactive Scheduler | Admin Analytics | Live Flight Board |
|---|---|---|
| Drag-and-drop assignment board | Scatter plots, delays, and CSV export | FIDS airport-style departure board |
| Flight Management | Crew Portal | Notifications |
|---|---|---|
| Boarding-pass style cards | Shift Bids, Swaps, and Leave Requests | Real-time WebSocket + SMTP Email |
Three distinct portals with protected routes and JWT authentication:
| Role | Access |
|---|---|
| Admin | Full control β crew, flights, rules, reports, analytics, system insights |
| Scheduler | Auto-generate schedules, drag-and-drop assignments, resolve conflicts |
| Crew | Personal schedule, shift bidding, peer swaps, availability management |
Multi-factor crew scoring algorithm enforcing dynamic system rules:
- Respects Min Rest Period between flights
- Enforces Max Weekly Duty Hours cap per crew member
- Checks Crew Availability and Leave Requests
- Matches Qualification Type to flight constraints
- Detects and prevents Overlap Conflicts automatically.
A specialized visual workspace for Schedulers:
- Filter available crew memebers by date.
- Drag-and-drop crew from the Available Pool directly onto upcoming Flight Cards.
- Triggers instant recalculation and assignment validation.
The system is capable of ingesting live tracking data rather than relying completely on simulations:
- Live FIDS Sync: Instant integration with the Aviationstack API to ingest real-world, live domestic flights (e.g., DEL to BOM).
- Fallback Simulation: Automatically generates realistic high-volume routing models if an API key is absent.
- Auto-Staffing Pipeline: Wipes old dummy flights, pulls 60+ new tracking flights, and instantly fires the AI Scoring Engine to evaluate 80+ mock crew members and auto-staff every single real flight according to compliance rules.
Actionable operational intelligence:
- Fleet Delays (7-Day Forecast): Rolling line chart tracking dispatch reliability.
- Crew Fatigue Hotspots: Scatter plot cross-referencing Scheduled Duty Hours vs Alert/Notification count to prevent burnout.
- Crew Utilization: Workload percentage ranking charts.
- Data Export: Instant raw CSV workload exports.
Real-time operations synchronized across all active clients:
- WebSockets: Live updates to FIDS boards and Crew Portals via
Socket.io. - SMTP Email Notifications: Securely sends alert emails for manual scheduling changes directly to Crew member inboxes.
- Flip-text animation on status changes.
Empowers crew members with direct schedule control:
- Shift Swabbing: Request shift trades with qualified peers. Includes multi-stage approval workflow.
- Flight Bidding: Place bids on unassigned priority flights.
- Leave Management: Submit and track leave request statuses.
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite 7 + Tailwind CSS v4 |
| UI Interactive | @dnd-kit/core (Drag & Drop), Recharts (Analytics) |
| Fonts/Icons | Inter, Space Mono, Lucide React, Framer Motion |
| Backend | Node.js 22 + Express 5 |
| Real-Time | Socket.io (WebSockets), Nodemailer (SMTP) |
| Database | PostgreSQL 16 + Prisma ORM 5 |
| Auth | JWT (jsonwebtoken) + bcryptjs |
SmartCrew/
βββ backend/
β βββ prisma/
β β βββ schema.prisma # DB schemas (User, Crew, Flight, Schedule, Rule, Bids...)
β β βββ seed.js # Fully boots dummy data for 25+ flights & 15+ crew
β βββ src/
β βββ algorithms/
β β βββ scheduling.js # Core scoring algorithm
β βββ controllers/ # Business logic endpoints
β βββ middleware/ # Auth and Roles
β βββ routes/ # Express routing multiplexer
β βββ services/
β β βββ emailService.js # Nodemailer SMTP logic
β β βββ socketService.js # Live event broadcaster
β β βββ reportingService.js # Prisma Aggregation (Fatigue/Delays)
β β βββ schedulingService.js # Constraints validation
β β βββ flightSyncService.js # Live Aviationstack Tracking Sync
β βββ index.js # Node.js Server Boot
β
βββ frontend/
βββ src/
βββ components/
β βββ Layout.jsx # Radar HUD Wrapper
βββ context/
β βββ AuthContext.jsx # JWT Sync State
β βββ RulesContext.jsx # Live Dynamic Rules State
βββ pages/
β βββ AdminDashboard.jsx # Analytics & System Rules
β βββ SchedulerDashboard.jsx # Drag-and-Drop Assignment
β βββ CrewDashboard.jsx # Duty tracking & Shift Bidding
β βββ LiveFlightBoard.jsx # FIDS board
β βββ ... # Swaps, Users, Conflicts
βββ index.css # Futuristic aviation theme definitions
- Node.js v18+
- PostgreSQL v14+
git clone https://github.com/RaKa8904/SmartCrew.git
cd SmartCrewcd backend
npm installCreate a .env file in the backend/ directory:
DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@localhost:5432/crew_scheduling?schema=public"
JWT_SECRET="your_secure_jwt_secret_here"
PORT=5000
# Optional: For Email Notifications
SMTP_HOST=smtp.gmail.com
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
# Optional: For Live Real-World Flight Data Sync
AVIATIONSTACK_API_KEY=your_api_key_here# Apply all generic migrations
npx prisma migrate dev
# Seed with rich mock flight data, schedules, and test accounts
npx prisma db seedBackend:
npm run dev
# Server starts on http://localhost:5000Frontend:
cd ../frontend
npm install
npm run dev
# App available at http://localhost:5173The login page includes a Quick Access panel β just click a role card to auto-fill credentials.
| Role | Password | |
|---|---|---|
| π‘ Admin | admin@airline.com |
password123 |
| π΅ Scheduler | scheduler@airline.com |
password123 |
| π£ Pilot | pilot1@airline.com |
password123 |
| π’ Cabin Crew | cabin1@airline.com |
password123 |
This project is licensed under the MIT License β see LICENSE for details.
Built with β€οΈ for T.E. AI & DS
SmartCrew Β· Aviation Operations Center Β· 2025β2026