All checks were successful
Build and Deploy / Build & Push (push) Successful in 2m51s
Park detail pages now show real-time ride open/closed status and wait times sourced from Queue-Times.com (updates every 5 min) when a park is operating. Falls back to the Six Flags schedule API for off-hours or parks without a Queue-Times mapping. - lib/queue-times-map.ts: maps all 24 park IDs to Queue-Times park IDs - lib/scrapers/queuetimes.ts: fetches and parses queue_times.json with 5-minute ISR cache; returns LiveRidesResult with isOpen + waitMinutes - app/park/[id]/page.tsx: tries Queue-Times first; renders LiveRideList with Live badge and per-ride wait times; falls back to RideList for schedule data when live data is unavailable - README: documents two-tier ride status approach Attribution: Queue-Times.com (displayed in UI per their API terms) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
115 lines
4.0 KiB
Markdown
115 lines
4.0 KiB
Markdown
# Six Flags Super Calendar
|
|
|
|
A week-by-week calendar showing operating hours for all Six Flags Entertainment Group theme parks — including the former Cedar Fair parks. Data is scraped from the Six Flags internal API and stored locally in SQLite. Click any park to see its full month calendar and live ride status with current wait times.
|
|
|
|
## Parks
|
|
|
|
24 theme parks across the US, Canada, and Mexico, grouped by region:
|
|
|
|
| Region | Parks |
|
|
|--------|-------|
|
|
| **Northeast** | Great Adventure (NJ), New England (MA), Great Escape (NY), Darien Lake (NY), Dorney Park (PA), Canada's Wonderland (ON) |
|
|
| **Southeast** | Over Georgia, Carowinds (NC), Kings Dominion (VA) |
|
|
| **Midwest** | Great America (IL), St. Louis (MO), Cedar Point (OH), Kings Island (OH), Valleyfair (MN), Worlds of Fun (MO), Michigan's Adventure (MI) |
|
|
| **Texas & South** | Over Texas, Fiesta Texas (TX), Frontier City (OK) |
|
|
| **West & International** | Magic Mountain (CA), Discovery Kingdom (CA), Knott's Berry Farm (CA), California's Great America (CA), Mexico |
|
|
|
|
## Tech Stack
|
|
|
|
- **Next.js 15** — App Router, Server Components, standalone output
|
|
- **Tailwind CSS v4** — `@theme {}` CSS variables, no config file
|
|
- **SQLite** via `better-sqlite3` — persisted in `/app/data/parks.db`
|
|
- **Playwright** — one-time headless browser run to discover each park's internal API ID
|
|
- **Six Flags CloudFront API** — `https://d18car1k0ff81h.cloudfront.net/operating-hours/park/{id}?date=YYYYMM`
|
|
- **Queue-Times.com API** — live ride open/closed status and wait times, updated every 5 minutes
|
|
|
|
## Ride Status
|
|
|
|
The park detail page shows ride open/closed status using a two-tier approach:
|
|
|
|
1. **Live data (Queue-Times.com)** — when a park is operating, ride status and wait times are fetched from the [Queue-Times.com API](https://queue-times.com/en-US/pages/api) and cached for 5 minutes. All 24 parks are mapped. Displays a **Live** badge with per-ride wait times.
|
|
|
|
2. **Schedule fallback (Six Flags API)** — the Six Flags operating-hours API drops the current day from its response once a park opens. When Queue-Times data is unavailable, the app falls back to the nearest upcoming date from the Six Flags schedule API as an approximation.
|
|
|
|
---
|
|
|
|
## Local Development
|
|
|
|
**Prerequisites:** Node.js 22+, npm
|
|
|
|
```bash
|
|
npm install
|
|
npx playwright install chromium
|
|
```
|
|
|
|
### Seed the database
|
|
|
|
Run once to discover each park's internal API ID (opens a headless browser per park):
|
|
|
|
```bash
|
|
npm run discover
|
|
```
|
|
|
|
Scrape operating hours for the full year:
|
|
|
|
```bash
|
|
npm run scrape
|
|
```
|
|
|
|
Force a full re-scrape (ignores the 7-day staleness window):
|
|
|
|
```bash
|
|
npm run scrape:force
|
|
```
|
|
|
|
### Debug a specific park + date
|
|
|
|
Inspect raw API data and parsed output for any park and date:
|
|
|
|
```bash
|
|
npm run debug -- --park kingsisland --date 2026-06-15
|
|
```
|
|
|
|
Output is printed to the terminal and saved to `debug/{parkId}_{date}.txt`.
|
|
|
|
### Run the dev server
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Open [http://localhost:3000](http://localhost:3000). Navigate weeks with the `←` / `→` buttons, or pass `?week=YYYY-MM-DD` directly. Click any park name to open its detail page.
|
|
|
|
---
|
|
|
|
## Deployment
|
|
|
|
The app uses Next.js standalone output. The SQLite database is stored in a Docker volume at `/app/data`.
|
|
|
|
```bash
|
|
docker compose up -d
|
|
```
|
|
|
|
### Seed the database inside the container
|
|
|
|
The production image includes Playwright and Chromium, so discovery and scraping run directly against the container's volume:
|
|
|
|
```bash
|
|
docker compose exec web npm run discover
|
|
docker compose exec web npm run scrape
|
|
```
|
|
|
|
Or as a one-off against the named volume:
|
|
|
|
```bash
|
|
docker run --rm -v sixflagssupercalendar_park_data:/app/data \
|
|
gitea.thewrightserver.net/josh/sixflagssupercalendar:latest \
|
|
npm run scrape
|
|
```
|
|
|
|
---
|
|
|
|
## Data Refresh
|
|
|
|
The scraper skips any park + month combination scraped within the last 7 days. Run `npm run scrape` on a weekly schedule to keep data current. Parks or months not yet in the database show a `—` placeholder; parks with no open days in the displayed week are hidden from the calendar automatically.
|