Live Application: https://red-eye-airlines.vercel.app/
A Pomodoro-style study timer reimagined as an airline flight experience. Study sessions become flights between airports around the world, with layovers serving as break intervals. Track your study progress as you "fly" to your destination.
Red Eye Airlines gamifies the Pomodoro technique by transforming study sessions into flight journeys. Instead of traditional timers, you:
Choose your route - Select departure and arrival airports worldwide
Plan your flight - Configure study intervals (30min or 50min segments) with breaks
Select your seat - Pick from a realistic airplane cabin layout
Board and fly - Watch your progress as you travel with real-time flight tracking
Complete your journey - Save completed flights to your profile history
Airport search: 1000+ airports (IATA codes, cities, names)
Suggested routes: Pre-configured flights (SFO→LAX, AMS→VIE, YYZ→SLC)
Path generation: Haversine-based routing with geographic optimization
Direct : No breaks (≤30 min routes only)
30-min : 30min study, 5min break (70%) or 4-7min (30%)
50-min : 50min study, 9-11min break (70%) or 8-14min (30%)
Dynamic layover selection to match interval constraints
3D flip animation with flight details
Random codes: flight number (2 letters + 4 digits), confirmation (6 letters), barcode
Route visualization for multi-segment flights
Cabin: 24 rows × 7 seats (A-G with aisles)
Special rows: Premium (1-5), exit (10, 20), wing (12-19)
Random occupancy (5-18%), amenity zones
Progress bar with segment markers, time remaining, elapsed counter
Segment status with progress %, next segment preview
Timeline view: color-coded segments (completed/current/upcoming)
Pause/resume with localStorage persistence and cross-tab sync
Public directory: profile pics, names, home airports, join dates
Profile pages: flight history, boarding pass viewer, statistics, editing
Flight history: grid view with modals, bulk delete
🏗️ Technical Architecture
Next.js 14 - React framework with App Router
TypeScript - Full type safety throughout
Tailwind CSS - Utility-first styling
Framer Motion - Animations and transitions
Lucide React - Icon library
State Management :
localStorage for flight data (currentFlight) and timer state (flightTimerState)
React hooks (useState, useEffect, useCallback, useMemo)
Custom events for cross-component sync
Automatic state recovery on page refresh
Flight Path Algorithm :
Haversine formula for great-circle distance
Flight time estimation (800 km/h average speed)
Geographic interpolation for layover selection
Detour minimization (max 50% of direct distance)
Segment duration constraints (21-39min for 30min, 41-59min for 50min)
Scoring: duration accuracy and route alignment
Airport Data :
OpenFlights database (1000+ airports)
Caching: 24-hour localStorage + server-side API (/api/airports)
Nominatim geocoding for state/province
Custom name overrides JSON
Supabase - BaaS
Authentication (email/password with username lookup)
PostgreSQL database with RLS policies
Storage bucket for profile pictures
Server-side API routes
Profiles Table :
User auth integration, username (unique), display name
Profile picture URL, home airport code
Auto-updating timestamps (database trigger)
Flights Table :
User association, departure/arrival details
Flight path (JSONB) with complete route segments
Seat assignment, duration, flight/confirmation codes
Completion timestamp
Security & Automation :
RLS policies (public read, user-specific write)
Auto-profile creation on signup
Auto-updating timestamps (database triggers)
Image Processing :
HEIC/HEIF → JPEG conversion
Sharp library (primary) with heic-convert fallback
Supabase Storage with automatic cleanup
📸 Application Screenshots
Study Together : Invite friends to join your flight (1-5 people max)
Real-time seat selection synchronization
Shared flight timer
Group progress tracking
Interactive World Map :
Visual airport selection on globe
Flight path visualization
Real-time airplane position during study sessions
3D Flight Visualization :
Google Maps 3D integration
Animated airplane movement
Terrain and city views
Enhanced Statistics :
Study streak tracking
Total study hours
Most frequented routes
Achievement system
MIT