A free, open-source Progressive Web App that helps photographers plan shoots around optimal natural lighting conditions. Uses purely free APIs and client-side calculations β zero paid dependencies.
- π Golden Hour Detection β Accurate morning and evening golden hour times
- π Blue Hour Tracking β Dawn and dusk blue hour windows
- π Geolocation β Auto-detect your location or add manually
- π Today's Light Timeline β Visual timeline of all light phases
- β° Countdown Timer β Live countdown to next golden hour
- π Push Notifications β Get alerted before golden/blue hour starts
- π Saved Locations β Save and manage multiple photography locations
- π± PWA β Works offline, installable on home screen
- π€οΈ Sky Score β AI-powered sky condition rating (0-100)
- πΊοΈ Map View β Leaflet + OpenStreetMap integration
- βοΈ Sun Path Visualization β SVG arc showing sun trajectory
- π¦οΈ Weather Integration β Cloud cover and precipitation via Open-Meteo
- π Moon Photography β Moon phases, rise/set times
- π€ Export/Import β Save locations as JSON
- π Dark Mode β Easy on the eyes
- π 12h/24h Clock β Your preference
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/yourusername/shootlight.git
cd shootlight
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
npm run buildThe built files will be in dist/.
npm run preview- Click the install icon in the address bar
- Select "Install ShootLight"
- Open in Chrome
- Tap "Add to Home Screen"
- Confirm installation
- Open in Safari
- Tap the Share button
- Scroll down and tap "Add to Home Screen"
- Note: iOS Safari PWA notifications require adding to home screen first
| Layer | Technology |
|---|---|
| Framework | React 18 + Vite + TypeScript |
| Styling | Tailwind CSS |
| PWA | vite-plugin-pwa (Workbox) |
| Astronomy | suncalc3 (pure JS, no API key) |
| Weather | Open-Meteo API (free, no key) |
| Local DB | localforage (IndexedDB wrapper) |
| Maps | Leaflet + OpenStreetMap |
| State | React Context + useReducer |
shootlight/
βββ public/
β βββ manifest.json # PWA manifest
β βββ icons/ # App icons
β βββ robots.txt
βββ src/
β βββ components/ # Reusable UI components
β β βββ Timeline.tsx
β β βββ LightCard.tsx
β β βββ SkyScoreBadge.tsx
β β βββ CountdownTimer.tsx
β β βββ SunPathArc.tsx
β β βββ LocationPicker.tsx
β β βββ NotificationToggle.tsx
β β βββ DayForecastStrip.tsx
β βββ pages/ # Page-level components
β β βββ Dashboard.tsx
β β βββ MapView.tsx
β β βββ SavedLocations.tsx
β β βββ Settings.tsx
β βββ hooks/ # Custom React hooks
β β βββ useGeolocation.ts
β β βββ useLightWindows.ts
β β βββ useNotifications.ts
β β βββ useWeather.ts
β β βββ useLocalStorage.ts
β βββ services/ # Business logic
β β βββ sunCalculator.ts
β β βββ weatherApi.ts
β β βββ notificationManager.ts
β β βββ locationStore.ts
β βββ store/ # Global state
β β βββ AppContext.tsx
β β βββ appReducer.ts
β βββ types/ # TypeScript interfaces
β β βββ index.ts
β βββ utils/ # Helper functions
β β βββ skyScore.ts
β β βββ formatters.ts
β β βββ constants.ts
β βββ App.tsx
β βββ main.tsx
β βββ index.css
β βββ sw.ts # Service worker
βββ vite.config.ts
βββ tailwind.config.js
βββ tsconfig.json
βββ package.json
- Go to Settings
- Toggle Enable Notifications ON
- Grant browser permission when prompted
- Choose which alerts you want:
- Golden Hour
- Blue Hour
- Sunrise
- Sunset
- Set your preferred lead time (5, 15, 30, or 60 minutes)
iOS Safari requires you to Add to Home Screen before notifications work. Even then, notification support is limited to iOS 16.4+. If notifications don't work, check the dashboard manually for light times.
The Sky Score (0-100) rates conditions for dramatic photography:
| Score | Rating | Conditions |
|---|---|---|
| 80-100 | π Epic | Post-storm clarity, dramatic clouds |
| 60-79 | π Great | Partial clouds, good color potential |
| 40-59 | βοΈ Decent | Some clouds, could be better |
| 20-39 | π Overcast | Muted light, flat conditions |
| 0-19 | π§οΈ Poor | Heavy clouds, rain likely |
- Tap anywhere on the map to check golden hour times for that location
- Saved locations appear as markers
- Click a marker to switch to that location
- Light data is calculated client-side using suncalc3
Moon data from suncalc3 includes:
- Moonrise and moonset times
- Current phase (New Moon β Full Moon cycle)
- Illumination percentage
- Best times for moon photography (full moon near horizon)
- Go to Saved Locations
- Tap Export JSON
- Save the file
- Go to Saved Locations
- Tap Import
- Paste your JSON data
- Confirm
npm run dev # Start dev server with hot reload
npm run build # Build for production
npm run preview # Preview production build- Create new components in
src/components/ - Add pages in
src/pages/ - Register new routes in
src/App.tsx - Update types in
src/types/index.ts
ShootLight is 100% client-side:
- No tracking, no analytics
- No server, no database
- All data stored locally (IndexedDB + localStorage)
- Weather data fetched directly from Open-Meteo (no API key needed)
- Location stays on your device
| Issue | Workaround |
|---|---|
| iOS Safari notifications limited | Add to Home Screen, use iOS 16.4+ |
| No weather data offline | Last cached data shown |
| Extreme latitude sun times | Polar day/night labels added |
| 1x1 placeholder icons | Replace with your own in public/icons/ |
MIT License. See LICENSE for details.
Contributions welcome! Please open an issue or submit a PR.
- suncalc3 by Vladimir Agafonkin β Sun/moon calculations
- Open-Meteo β Free weather API
- Leaflet β Interactive maps
- OpenStreetMap β Map tiles
Built with βοΈ for photographers everywhere.