A real-time crowd-aware itinerary planner that helps visitors maximize their time at amusement parks by minimizing wait times.
ParkPal Preview HTML CSS JavaScript
Amusement parks suffer from uneven crowd distribution β popular rides attract massive queues while other attractions stay empty. Visitors often waste 50β70% of their park time waiting in lines, missing rides entirely. ParkPal solves this by building an optimized, time-slotted itinerary based on live crowd data fed in by park operators.
| Feature | Description |
|---|---|
| πΊ Smart Itinerary | Greedy scheduling algorithm routes visitors through low-crowd rides first |
| π Live Crowd Data | Ride operators update occupancy in real-time via the Operator Panel |
| β± Wait Estimation | Dynamic wait time model based on crowd score |
| π Heatmap | Hourly crowd forecast across the full park day |
| π€ Share Plan | Native share sheet (or clipboard fallback) |
| βΏ Accessible | ARIA roles, keyboard navigation, prefers-reduced-motion support |
| πΆ Offline-friendly | Zero external API calls β loads on slow park Wi-Fi |
parkpal/
βββ index.html # App shell & semantic markup
βββ css/
β βββ reset.css # Modern CSS reset
β βββ variables.css # Design tokens (colors, spacing, radius...)
β βββ layout.css # App shell, header, step nav, page structure
β βββ components.css # All UI components (cards, buttons, timeline...)
β βββ animations.css # Keyframes & utility animation classes
βββ js/
β βββ utils.js # Pure functions (time conversion, crowd math)
β βββ planner.js # Core scheduling algorithm
β βββ ui.js # All DOM rendering β no business logic
β βββ admin.js # Operator panel (modal, slider, save)
β βββ background.js # Canvas particle background
β βββ app.js # Root controller β state & event wiring
βββ data/
βββ rides.js # Ride definitions + live crowd state
Design principles:
- Separation of concerns β data, logic, rendering are fully decoupled
- Module pattern β each file exposes a single IIFE namespace
- Event delegation β single listener on the grid container vs one per card
- No framework dependency β vanilla JS, ships as a single folder
planner.js implements a greedy scheduling approach:
- Filter the visitor's selected rides
- Sort by ascending crowd score (lowest wait β do first)
- Slot rides sequentially with walk buffers (
5 min) between each - Skip any ride that would overrun the departure time
- Insert 15-minute rest breaks every 3 rides
Wait time model:
| Crowd Score | Formula |
|---|---|
| 0 β 39 (Low) | crowd Γγ°γ€ 0.35 min |
| 40 β 69 (Moderate) | 10 + (crowd β 40) Γγ°γ€ 0.6 min |
| 70 β 100 (High) | 28 + (crowd β 70) Γγ°γ€ 1.0 min |
No build step required. Open index.html in any modern browser:
git clone https://github.com/harshitha-809/smart-queue-optimizer.git cd parkpal open index.html # macOS # or start index.html # Windows # or serve with any static server: npx serve .
The data/rides.js file is the only integration point. To connect a live backend:
// Replace static data in data/rides.js with a fetch call: async function loadRides() { const res = await fetch('https://your-api.com/rides/live'); window.RIDES_DATA = await res.json(); }
Suggested stack: Firebase Realtime Database (operators update crowd %, visitors see changes instantly via WebSocket).
- QR code entry with pre-assigned visitor ID
- Backend integration (Firebase / REST)
- Park map with walking directions between rides
- Push notifications: "Head to Thunder Coaster now β queue just dropped!"
- Historical crowd analytics dashboard for park managers
- Multi-language support
Pull requests are welcome. For major changes, please open an issue first.
- Fork the repo
- Create your branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m 'Add my feature' - Push and open a PR
MIT β see LICENSE for details.
Built as a solution to real crowd management problems in high-traffic entertainment venues.