A flight assistant for the developer's frequent travel. Track recurring routes, compare travel patterns, and find the cheapest weeks to fly.
FlyFreq fetches one-way flight prices from Google Flights (via SerpApi), pairs them into round-trips across multiple weekly patterns, and renders everything in a clean dark-mode dashboard.
Two built-in profiles:
- Commute — PHX ↔ Bay Area (SFO/SJC), 2-night patterns (Mon–Wed, Tue–Thu, Wed–Fri, Sun–Tue)
- Home — PHX ↔ UK (LHR/MAN), holiday trips (4 nights to 3 weeks)
Dashboard features:
- Sparkline price chart across 26 weeks with nonstop overlay
- Filter by airport, stops, departure/return time, and trip length
- All flight options shown per week (not just the cheapest)
- Click any route to open Google Flights for that leg
- Profile switcher with contextual descriptions
# 1. Clone
git clone https://github.com/craftkeg/flyfreq.git
cd flyfreq
# 2. Add your SerpApi key
echo "SERPAPI_KEY=your_key_here" > .env
# 3. Run
node freqfly.jsThe dashboard opens automatically in your browser.
freqfly.js → flights_data.js → freqfly.html
(Node fetcher) (generated data) (viewer)
freqfly.jshits SerpApi for each route × pattern × week, caches responses for 24h in.freqfly_cache/- Writes all results to
flights_data.jsaswindow.FREQFLY_DATA freqfly.htmlreads that data and renders the dashboard — no server needed, just open the file
Edit the PROFILES array in freqfly.js to add your own routes and patterns:
const PROFILES = [
{
name: 'Commute',
desc: 'PHX → Bay Area weekly round-trips · cheapest by calendar week',
routes: [['PHX', 'SFO'], ['PHX', 'SJC']],
patterns: [
{ out: 0, ret: 2, nights: 2, label: 'Mon–Wed' }, // 0 = Monday
{ out: 6, ret: 1, nights: 2, label: 'Sun–Tue' }, // 6 = Sunday
],
},
]out— departure day offset from Monday (0=Mon, 6=Sun)nights— trip durationWEEKS_AHEAD— how many weeks to scan (default: 26)
- Node 18+ (uses built-in
fetch) - SerpApi key — get one here (free tier: 100 searches/month)
MIT