Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ… ShootLight β€” Golden Hour Notification PWA

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.

ShootLight License

✨ Features

Phase 1: Core MVP

  • πŸŒ… 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

Phase 2: Enhanced

  • 🌀️ 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

Phase 3: Polish

  • πŸŒ• Moon Photography β€” Moon phases, rise/set times
  • πŸ“€ Export/Import β€” Save locations as JSON
  • πŸŒ™ Dark Mode β€” Easy on the eyes
  • πŸ• 12h/24h Clock β€” Your preference

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/yourusername/shootlight.git
cd shootlight

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:5173 in your browser.

Build for Production

npm run build

The built files will be in dist/.

Preview Production Build

npm run preview

πŸ“± Install as PWA

Desktop (Chrome/Edge)

  1. Click the install icon in the address bar
  2. Select "Install ShootLight"

Android (Chrome)

  1. Open in Chrome
  2. Tap "Add to Home Screen"
  3. Confirm installation

iOS (Safari, 16.4+)

  1. Open in Safari
  2. Tap the Share button
  3. Scroll down and tap "Add to Home Screen"
  4. Note: iOS Safari PWA notifications require adding to home screen first

πŸ—οΈ Tech Stack

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

πŸ“‚ Project Structure

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

πŸ”” Notification Setup

  1. Go to Settings
  2. Toggle Enable Notifications ON
  3. Grant browser permission when prompted
  4. Choose which alerts you want:
    • Golden Hour
    • Blue Hour
    • Sunrise
    • Sunset
  5. Set your preferred lead time (5, 15, 30, or 60 minutes)

iOS Safari Limitation

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.

🌀️ Sky Score Algorithm

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

πŸ—ΊοΈ Map View

  • 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 Photography

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)

πŸ“€ Export/Import Locations

Export

  1. Go to Saved Locations
  2. Tap Export JSON
  3. Save the file

Import

  1. Go to Saved Locations
  2. Tap Import
  3. Paste your JSON data
  4. Confirm

πŸ› οΈ Development

Available Scripts

npm run dev       # Start dev server with hot reload
npm run build     # Build for production
npm run preview   # Preview production build

Adding New Features

  1. Create new components in src/components/
  2. Add pages in src/pages/
  3. Register new routes in src/App.tsx
  4. Update types in src/types/index.ts

πŸ”’ Privacy

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

⚠️ Known Limitations

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/

πŸ“„ License

MIT License. See LICENSE for details.

🀝 Contributing

Contributions welcome! Please open an issue or submit a PR.

πŸ™ Credits

  • suncalc3 by Vladimir Agafonkin β€” Sun/moon calculations
  • Open-Meteo β€” Free weather API
  • Leaflet β€” Interactive maps
  • OpenStreetMap β€” Map tiles

Built with β˜€οΈ for photographers everywhere.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages