Welcome to the Flight and Search Microservice of AeroVerve, a cutting-edge flight booking system designed to offer users seamless and efficient flight booking experiences. This microservice is a fundamental component of AeroVerve, responsible for managing flight details, bookings, and related services. Built on a robust architecture, it ensures smooth interactions between users, flights, and booking processes.
The Flight and Search Microservice is a core component of AeroVerve's flight booking system, enabling travelers to seamlessly explore flight options, make bookings, and efficiently manage their travel plans. Powered by advanced technologies, this microservice delivers real-time flight information, a secure booking process, and comprehensive booking management capabilities.
The microservice allows the management of flight data, including creating new flights, retrieving flight details, updating flight information, and deleting flights from the system.
Users can perform flight searches based on filters such as departure and arrival airports, dates, and pricing ranges. This feature empowers users to find flights that match their preferences.
Flight and search data is stored in a MySQL database, ensuring data durability and efficient retrieval. This provides a reliable foundation for managing flight-related information.
The microservice codebase is structured using the Node.js ecosystem, embracing modularity and maintainability. This enables efficient development, testing, and enhancement of features.
The microservice follows an MVC (Model-View-Controller) architecture, ensuring a clear separation of concerns. This enhances code organization, readability, and scalability.
- Node.js (version 20.X.X)
- MySQL database (version 8.X.X)
- npm or yarn package manager
Follow these steps to set up and run the AeroVerve Flight and Search Microservice on your local machine.
- Copy the
.env.example
file in the microservice directory to.env
.
- Inside the
src/config
folder of the microservice, create a new file namedconfig.json
. - Add the database connection details in the
config.json
file, following the provided example.
{
"development": {
"username": "<YOUR_DB_LOGIN_NAME>",
"password": "<YOUR_DB_PASSWORD>",
"database": "<YOUR_DB_NAME>",
"host": "<YOUR_DB_HOST_NAME>",
"dialect": "mysql"
}
}
Replace the placeholders with your actual database credentials and information.
- Open a terminal and navigate to the microservice directory.
cd flight-and-search-service
- Install the dependencies and start the microservice.
npm install
npm start
Certainly! Here are the added endpoints for the Flight and Search Microservice in the Usage
section of your README:
The following are the available endpoints:
-
Create a City
POST /api/v1/city
-
Delete a City
DELETE /api/v1/city/:id
-
Get City by ID
GET /api/v1/city/:id
-
Get All Cities
GET /api/v1/city
-
Update a City
PATCH /api/v1/city/:id
-
Create a Flight
POST /api/v1/flights
-
Get All Flights
GET /api/v1/flights
-
Get Flight by ID
GET /api/v1/flights/:id
-
Update a Flight
PATCH /api/v1/flights/:id
- Create an Airport
POST /api/v1/airports
We welcome contributions to enhance the AeroVerve Flight and Search Microservice. To contribute, please follow these steps:
- Fork this repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push them to your fork.
- Create a pull request with a detailed description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
AeroVerve - Elevating Flight Booking Experiences