A modern, fast, and user-friendly flight search application built with Next.js 14 for travel agencies to quickly find and compare flights for their clients.
👉 https://flight-search.vercel.app/
- Real-time Flight Search — Search flights by departure/arrival airports and travel dates
- Round-trip Support — Search for outbound and return flights simultaneously
- Flight Comparison — View multiple flight options with pricing and duration details
- Airline Information — Display airline logos and names for easy identification
- URL-based Search — Share search results via URL parameters
- Responsive Design — Works seamlessly on desktop, tablet, and mobile devices
- Modern UI — Clean, dark-themed interface optimized for professional use
- Node.js 18.x or higher
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd flight-search
-
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
flight-search/
├── app/
│ ├── api/
│ │ └── save/
│ │ └── route.ts # API route for download data
│ ├── search/
│ │ └── page.tsx # Flight search page
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout component
│ └── page.tsx # Home page
├── lib/ # Utility functions
├── public/ # Static assets
├── tailwind.config.ts # Tailwind CSS configuration
├── next.config.js # Next.js configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Project dependencies
| Command | Description |
|---|---|
npm run dev |
Start development server on port 3000 |
npm run build |
Build the application for production |
npm run start |
Start the production server |
npm run lint |
Run ESLint for code quality checks |
- Navigate to the Search page
- Enter the Departure Airport Code (e.g.,
BCNfor Barcelona) - Enter the Arrival Airport Code (e.g.,
VVIfor Viru Viru) - Select your Departure Date
- Select your Return Date
- Click Search to find available flights
You can also search directly via URL:
/search?DepartureAirportCode=BCN&ArrivalAirportCode=VVI&DepartureDate=2024-12-15T00:00:00.000Z&ReturnDate=2024-12-25T00:00:00.000Z
| Parameter | Description | Example |
|---|---|---|
DepartureAirportCode |
3-letter IATA airport code | BCN |
ArrivalAirportCode |
3-letter IATA airport code | VVI |
DepartureDate |
ISO 8601 date string | 2024-12-15T00:00:00.000Z |
ReturnDate |
ISO 8601 date string | 2024-12-25T00:00:00.000Z |
Each flight result includes:
| Field | Description |
|---|---|
AirlineName |
Name of the operating airline |
AirlineLogoAddress |
URL to airline's logo image |
TotalAmount |
Total price in USD |
OutboundFlightsDuration |
Duration of outbound flight |
InboundFlightsDuration |
Duration of return flight |
Stops |
Number of stops/layovers |
ItineraryId |
Unique identifier for the itinerary |
Modify the color scheme in tailwind.config.ts:
colors: {
primary: '#your-color',
'card-bg': '#your-card-color',
}The flight search API is configured in app/search/page.tsx. Update the apiUrl to connect to your preferred flight data provider.
This application uses the NM Flight API for demonstration purposes:
https://nmflightapi.azurewebsites.net/api/flight/
For production use, integrate with your preferred GDS (Global Distribution System) or flight aggregator API such as:
- Amadeus
- Sabre
- Travelport
- Skyscanner
npm install -g vercel
vercelFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]npm run build
npm start- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or support, please open an issue in the GitHub repository.
Made with ❤️ for Travel Agencies