This is an air travel management server. In this, we want to build an API (no GUI) mimicking airlines' flight-booking, ticketing, and customer management system. Our server will employ a sophisticated algorithm to suggest a set of "best" sequences of flights to a user, given his start airport, destination airport, and dates of arrival and departure. From this set, the user can pick a sequence and book her/his tickets. In summary, the server will allow its clients to fetch flight and customer information and create/update/delete ticket bookings. We will support multiple clients at the same time and will maintain the data for the flight, ticket, and customer information persistently in our database.
-
Use the Ubuntu Operating System. For ensured reproducibility, use Ubuntu 22.04.
-
Install Java. For ensured reproducibility, use the steps described here: https://linuxhint.com/install-java-ubuntu-22-04/ to install at least version 17.
-
Install Maven. For ensured reproducibility, use the steps described here: https://linuxhint.com/install_apache_maven_ubuntu/ to install the latest version.
-
Clone this repository (say, using
git clone git@github.com:BugzLightyear-Software-Engineering/FlightMan.git
). -
Run
cd FlightMan
. -
Install the Maven Wrapper by running
mvn -N wrapper:wrapper
. This simplifies building and running the server. -
Finally, run the server on your local system using the command:
./mvnw clean install && ./mvnw spring-boot:run
.
As of now, we have a basic server with HTTP authentication for users.
-
To access the server, go to: https://bugzlightyear-flightman.herokuapp.com/api/ (as an alternative, when running the server on your local system, go to http://localhost:8080/api).
-
You will be prompted to enter your username and password. Our server's users will be vast, comprising both other applications as well as end users.
-
For the basic demo, we have authorized users namely, "srishti", "ajay", "abhilash", "miloni", "otito", "peter", and "professor_kaiser", each with their secure passwords.
-
The passwords have been encoded and stored in the server to ensure a nice level of security.
-
Once your authorization is successful, you will see the page "Hello Authorized User!" on your screen.
Please refer to the following link to read our (Swagger) API documentation.
https://bugzlightyear-flightman.herokuapp.com/swagger-ui/index.html
Each of the below entry points are only accessible to authorized users, i.e., users who have entered their username and correct password when prompted.
-
/airports
(i.e., https://bugzlightyear-flightman.herokuapp.com/api/airports): Displays a list of all the airports in the database orHTTP NO_CONTENT
if none are available. -
/bookings
(i.e., https://bugzlightyear-flightman.herokuapp.com/api/bookings): Displays a list of all the bookings in the database for a particular user and if not user is supplied, it displays all the bookings. -
/flights
(i.e., https://bugzlightyear-flightman.herokuapp.com/api/flights): Displays all the flights from a source to a destination airport. If the airports supplied aren't in the database, displaysHTTP NO_CONTENT
. If a source is not supplied, all flights going to that destination are displayed and vice versa. -
/models
(i.e., https://bugzlightyear-flightman.herokuapp.com/api/models): Displays all the flight models in the database orHTTP NO_CONTENT
if none are there. -
/users
(i.e., https://bugzlightyear-flightman.herokuapp.com/api/users): Displays all the users registered in the database orHTTP NO_CONTENT
if none are there.
As of now, we do not have any third-party code in our repository other than the SpringBoot library code
-
Developer pushes code to remote git repository.
-
A GitHub hook informs CircleCI of a push event. CircleCI uses the configuration file in the repository to execute a sequence of actions/stages, essentially invoking the CI pipeline.
-
In the pipeline, after the project is cloned, (1) attempt to build the project using maven, (2) run all the unit tests in the repository using maven and store the unit test results on CircleCI, (3) run code styling checks and store code styling reports on CircleCI, and (4) make a call to SonarCloud (a hosted SonarQube) to perform static code analysis on the project.
-
If all of the above operations pass successfully, we inform Heroku that this commit is suitable to deploy.
-
Heroku then pulls the code from our repository, builds it into a production-ready version, and deploys it on a public domain.
https://github.com/BugzLightyear-Software-Engineering/FlightManAirlineClient
-
In order to run the client pull the code run 'npm run start' and access on localhost:8080 deployment to heroku in progress
-
3rd parties are able to develop thier clients against our server by registering a user and calling the api with thier credentials