I'll build a polished surf-travel analytics dashboard. Let me first check the entry file, then set up dependencies and base styles.
Dependencies installed. Now the HTML shell (title, fonts) and the Tailwind v4 theme with class-based dark mode.
Base styles done. Now the data engine — 12 world-class breaks across 4 regions, 220 days of realistic, seeded surf telemetry, plus all the aggregation helpers the dashboard views will share.
Now the core UI primitives — header with dark-mode toggle, the sticky filter bar, animated KPI cards with sparklines, and a reusable chart card shell.
Now the visualizations — dual-axis timeline chart, per-spot bar chart, condition donut — plus the sortable/filterable data table.
All views built. Now the App shell that wires filters → derived data → every view, with the dark-mode state, an insight hero, and the responsive layout.
One tiny cleanup in the header (stray class), then let's build.
Build passes, but I caught a runtime bug on review: the bar-chart tooltip reads payload.raw, which doesn't exist — the datum is the SpotSummary itself. Fixing it.
The build is clean. Swellscope — a surf-travel analytics dashboard — is ready.
What's inside
Live data engine (src/data/surfData.ts)
- 12 real-world breaks (Pipeline, Nazaré, Uluwatu, Pavones…) across 4 regions, each with 220 days of deterministic, seasonally-modeled telemetry: wave height, swell period, wind speed/direction, water temp, crowd level, and a composite 0–100 surf score — complete with storm spikes, weekend crowd surges, and layered swell noise so every chart feels alive.
Views (all update live from the same filter state)
- 5 KPI cards — wave height, swell period, water temp, offshore-wind %, surf score. Animated count-up values, hand-rolled SVG sparklines, and trend badges comparing the selected window against the prior equal-length window.
- Swell timeline — dual-axis composed chart (area for wave height, line for swell period) with a rich glass tooltip and gradient fill.
- Session quality donut — Epic/Good/Fair/Poor mix with hover tooltips, center "good-or-better" readout, and an interactive legend.
- Break comparison bars — avg wave height per spot, colored by score, with detailed hover cards.
- Spot intelligence table — 9 sortable columns with asc/desc indicators, live text search, per-row deltas vs. the previous window, crowd meters, score pills, and a "Top pick" trophy row with layout-animated reordering.
Controls
- Sticky filter bar with a 7/14/30/90-day segmented control (spring-animated pill) and multi-select region chips — every KPI, chart, and table row recomputes instantly.
- Dark mode toggle with animated sun/moon morph, full dark palette across all charts, tooltips, and scrollbars.
Design — Space Grotesk/Inter typography, glassmorphic sticky layers, gradient insight hero with drifting blobs that names the best break in your window, staggered reveal animations, and a fully responsive layout (5-up KPIs → 2-up, stacked charts, horizontal table scroll on mobile).
Files built: index.html, src/index.css, src/data/surfData.ts, src/components/Header.tsx, src/components/FilterBar.tsx, src/components/KpiCard.tsx, src/components/ChartCard.tsx, src/components/charts/TimelineChart.tsx, src/components/charts/SpotBar.tsx, src/components/charts/Donut.tsx, src/components/SpotTable.tsx, src/App.tsx