A personal flight search application with AI-powered natural language queries, multi-city route optimization, and automated price tracking. Built for the savvy traveler who wants to find the best deals without the noise of commercial flight search engines.
Type naturally like you would talk to a travel agent:
- "Flights from NYC to Tokyo in late March for 2 weeks under $1200"
- "Vuelos a Madrid desde Buenos Aires en febrero" (Spanish supported)
- "Weekend trip to Miami from Chicago around Valentine's Day"
The app understands dates, budgets, trip durations, and cities in multiple languages.
Find cheaper alternatives by splitting your journey through strategic stopover hubs. The app automatically compares:
- Direct flights
- One-stop connections
- Multi-city combinations (separate bookings)
- Scheduled Tasks: Set up recurring searches with cron expressions
- Quick Alerts: One-click price alerts on any flight
- Price History: Visual charts showing price trends over time
- Notifications: Get alerts via email (Resend) or Telegram
Filter results by:
- Price range
- Maximum duration
- Number of stops
- Departure time (morning, afternoon, evening, night)
- Specific airlines
- Download flight details as
.icscalendar events - Copy formatted flight info to clipboard
- Share via native share API on mobile
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router), React 19 |
| Database | PostgreSQL + Prisma 7 |
| Authentication | iron-session (password-based) |
| UI | shadcn/ui + Tailwind CSS v4 |
| Flight Data | Amadeus API |
| AI/NLP | OpenAI gpt-5-nano |
| Resend | |
| Notifications | Telegram Bot |
| Animations | Framer Motion |
- Node.js 18+
- PostgreSQL database
- API keys (see below)
-
Clone the repository
git clone https://github.com/yourusername/personal-travel.git cd personal-travel -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
-
Set up the database
npx prisma generate npx prisma migrate dev
-
Run the development server
npm run dev
-
Open http://localhost:3000 and log in with your password.
Create a .env.local file with the following variables:
# Authentication
AUTH_PASSWORD=your_secure_password
SESSION_SECRET=your_32_character_or_longer_secret
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/personaltravel
# Amadeus Flight API
AMADEUS_CLIENT_ID=your_amadeus_client_id
AMADEUS_CLIENT_SECRET=your_amadeus_client_secret
AMADEUS_ENV=prod # Use "prod" for real flight data
# OpenAI (for natural language processing)
OPENAI_API_KEY=your_openai_api_key# OpenAI model override (defaults to gpt-5-nano)
OPENAI_MODEL=gpt-5-nano
# Email notifications via Resend
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=notifications@yourdomain.com
NOTIFICATION_EMAIL=your_email@example.com
# Telegram notifications
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id- Go to Amadeus for Developers
- Create a free account
- Create a new application in the dashboard
- Copy the API Key and API Secret
- For production data, you'll need to request production access (free tier has test data only)
Note: The test environment returns limited/fake data. Request production access for real flight prices.
- Go to OpenAI Platform
- Create an account and add billing
- Navigate to API Keys in settings
- Create a new secret key
- Copy the key (starts with
sk-)
Cost: The app uses
gpt-5-nanowhich is affordable ($0.25 per 1M input tokens, $2 per 1M output tokens).
- Go to Resend
- Create a free account (100 emails/day free)
- Add and verify your domain (or use the sandbox)
- Create an API key in the dashboard
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts - Copy the bot token
- To get your chat ID:
- Send a message to your new bot
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find your
chat.idin the response
On the home page, type your search in natural language:
Flights from San Francisco to London next month for a week
The AI will parse your query and search for matching flights.
Click "Manual Search" to use the structured form with:
- Airport autocomplete
- Date pickers
- Passenger count
- Cabin class selection
- Flexible dates toggle (±3 days)
- Quick Alert: Click the bell icon on any flight card to set a target price
- Scheduled Task: Go to Tasks > New Task to set up recurring searches with custom schedules
- Save searches you want to compare
- Select up to 3 saved searches using the compare checkbox
- Click "Compare" to see side-by-side results with highlighted best options
src/
├── app/
│ ├── (dashboard)/ # Protected routes
│ │ ├── page.tsx # Home - search interface
│ │ ├── tasks/ # Price tracking tasks
│ │ ├── history/ # Search history
│ │ ├── settings/ # Notification preferences
│ │ └── chat/ # Chat interface
│ ├── api/ # API routes
│ └── login/ # Login page
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── flights/ # Flight search components
│ └── tasks/ # Task management components
└── lib/ # Services and utilities
├── amadeus.ts # Flight search API
├── openai.ts # NLP parsing
├── scheduler.ts # Task execution
└── notifications.ts # Alert delivery
To run scheduled price checks, you have two options:
Set up a cron job or use a service like cron-job.org to hit:
GET /api/cron/run-tasks
Authorization: Bearer YOUR_CRON_SECRET
Add CRON_SECRET to your environment variables for security. If CRON_SECRET is not set, the endpoint will run without a bearer-token check, which is only suitable for local development.
Add to vercel.json:
{
"crons": [{
"path": "/api/cron/run-tasks",
"schedule": "0 */6 * * *"
}]
}# Start dev server
npm run dev
# Run type checking
npm run type-check
# Run linting
npm run lint
# Build for production
npm run build
# View database
npx prisma studioThe app is designed to deploy easily on Vercel:
- Push your code to GitHub
- Import the project in Vercel
- Add all environment variables
- Deploy
For other platforms, ensure you have:
- Node.js 18+ runtime
- PostgreSQL database connection
- Environment variables configured
MIT