Skip to content

zlnsk/flights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flights

Natural-language flight search. Type a query like "cheap flights from Warsaw to Italy in September" and the app parses it with an LLM (via OpenRouter), then searches round-trip offers on Amadeus across multiple origin/destination/date combinations.

How it works

  1. Query parsing — OpenRouter (model: openrouter/auto) extracts origins, destinations, date range and trip duration from free-form text.
  2. Date expansion — the server generates Thu/Fri/Sat departures paired with Thu-Sun returns across the requested window.
  3. Flight search — Amadeus Self-Service API is queried (capped at 80 round-trip searches) and results are streamed back via SSE, sorted by total price.

Requirements

Setup

npm install
cp ecosystem.config.example ecosystem.config.js
# edit ecosystem.config.js and fill in your credentials

Environment variables

  • AMADEUS_CLIENT_ID / AMADEUS_CLIENT_SECRET — Amadeus API credentials
  • OPENROUTER_API_KEY — OpenRouter API key
  • APP_URL — public URL of the deployed app (sent as OpenRouter HTTP-Referer)

The app also integrates with an optional shared OTP auth module; remove the expressAuth middleware in server.js if you do not need login.

Run

node server.js            # development
pm2 start ecosystem.config.js  # production

Listens on port 3010 under base path /Flights.

License

MIT

About

Natural language cheap flight search — describe your trip, get the best round-trip options across multiple airports and dates via Amadeus API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors