How noorthistime/sunblock works
SunBlock is a Next.js weather dashboard. Users choose or search for a location, then view current conditions, a forecast, and interactive map layers with a time scrubber. The graph highlights the page-to-hook workflow and map composition. README capabilities include radar playback, temperature interpolation, wind flow, and satellite overlays. API-handler internals and some hook wiring were not excerpted, so those relationships are omitted or marked unverified.
Main entry points: page.tsx Dashboard page · WeatherMap.tsx Interactive weather map · useWeather.ts Weather state hook · weather.ts Weather data types
Components 18
Dashboard UI
- Dashboard page
app/page.tsx - Search and controls
components/Header.tsx - Current conditions
components/WeatherCard.tsx - Forecast cards
components/ForecastOverlay.tsx - Progress indicator
components/DottedProgress.tsx
Weather Data
- Weather state hook
hooks/useWeather.ts - Weather API handler
app/api/weather/route.ts - Location search handler
app/api/search/route.ts
Map Visualizations
- Map loader
components/MapWrapper.tsx - Interactive weather map
components/WeatherMap.tsx - Radar timeline
components/PrecipitationTimeline.tsx - Lightning overlay
components/LightningLayer.tsx - Lightning strike generation
hooks/useLightningStrikes.ts
Weather Domain
- Weather data types
types/weather.ts - Weather code display mapping
utils/weatherCodes.ts
Other components
- Dashboard visitor
- Open-Meteo
- RainViewer
Connections 21
- Dashboard visitor → Dashboard page: opens
README.md - Dashboard page → Weather state hook: uses state
app/page.tsx - Dashboard page → Search and controls: renders
app/page.tsx - Dashboard page → Current conditions: renders
app/page.tsx - Dashboard page → Forecast cards: renders
app/page.tsx - Dashboard page → Map loader: renders
app/page.tsx - Dashboard page → Progress indicator: renders
app/page.tsx - Weather state hook → Weather API handler: requests weather
- Weather state hook → Location search handler: requests search
- Weather API handler → Open-Meteo: fetches weather
- Location search handler → Open-Meteo: geocodes
- Map loader → Interactive weather map: loads
components/MapWrapper.tsx - Interactive weather map → Radar timeline: renders
components/WeatherMap.tsx - Interactive weather map → Lightning overlay: renders
components/WeatherMap.tsx - Interactive weather map → Lightning strike generation: uses strikes
components/WeatherMap.tsx - Interactive weather map → RainViewer: loads radar frames
- Interactive weather map → Weather data types: uses data types
components/WeatherMap.tsx - Weather state hook → Weather data types: uses data types
hooks/useWeather.ts - Current conditions → Weather code display mapping: formats conditions
components/WeatherCard.tsx - Forecast cards → Weather code display mapping: formats conditions
components/ForecastOverlay.tsx - Lightning strike generation → Weather data types: uses point type
hooks/useLightningStrikes.ts