Skip to content

A Node.js application for retrieving flight data from Schiphol Airport and reserving flights for users.

License

Notifications You must be signed in to change notification settings

mhshahzad/schiphol-flight-booking-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schiphol Flight Booking App

The Schiphol Flight Booking App is a robust TypeScript-based Node.js application designed to streamline the retrieval of flight data from Schiphol Airport while offering a seamless flight reservation process for users. This project leverages TypeScript for enhanced code maintainability and Node.js for efficient server-side functionality.

Features

  • List Flights:

    • Retrieve a list of all available flights.
    • Optional filtering by specifying date and direction query parameters.
  • Reserve a Flight:

    • Reserve a seat on a specific flight.
    • Handles various responses including success, missing fields, flight not found, seat already reserved, incorrect flight direction, and existing user reservation on the same flight.
  • List Reservations:

    • Retrieve a list of all reservations made.
  • Get User Reservations:

    • Retrieve a list of reservations for a specific user.
  • Get Flight Details for a User:

    • Retrieve flight details for a specific flight requested by a user.

Prerequisites

  • Node.js and npm installed (Node.js v18.1.0 and npm v9.8.1 recommended)
  • PostgreSQL database set up
  • TypeScript compiler (tsc) installed globally (npm install -g typescript)

Installation

  1. Clone this repository: git clone https://github.com/muhammadh-s/schiphol-flight-booking-app.git
  2. Install dependencies: npm install
  3. Create a .env file in the root directory (example provided in .env.example) to configure credentials and app settings
  4. Run the following command to compile TypeScript: npm run build
  5. Start the application: npm start

Usage

Explore various API endpoints for flights, reservations, and users to maximize the capabilities of the Schiphol Flight Booking App. Detailed information is available in the API Documentation.

API Documentation

Refer to the included API Documentation file for comprehensive details on available API endpoints and their functionalities.

License

This project is licensed under the MIT License. See the LICENSE file for more information.