/airline-reservation

Airline Reservation system using Java Spring Boot + MongoDB + Auth0 + Docker (JDK 17)

Primary LanguageHTML

Airline Reservation System

GitHub Workflow Status Libraries.io dependency status for GitHub repo GitHub issues DeepSource GitHub Website Uptime Robot ratio (30 days)

GitHub Repo stars GitHub forks

Airline reservation system is a full-stack Java application. Technologies that use to project;

  • Java/MVN + Spring boot + MVC Architecture
  • HTML, Tailwind CSS, JS
  • Spring Security, Auth0
  • Intellij IDEA, VS Code
  • MongoDB
  • Docker
  • Git/GitHub

Setup

To run the app,

  • Clone this repo to your local machine using
git clone https://github.com/MadushaS/airline-reservation.git
  • Connect database
  1. install mongodb on your system
  2. Start the server, run mongosh on command-line
  3. create a databese
  4. get connection string of your database.
  5. put connection string infront of spring.data.mongodb.uri in src/resources/application.properties
  • Run AirlineReservationApplication.java in src/main/java/AirlineReservationApplication.java

Spring Boot 2 Login - MVC

This sample demonstrates:

  • Adding authentication with Auth0 to a Spring Boot 2 MVC application
  • Accessing profile information of the authenticated user
  • Only allowing authenticated users to access certain resources

Configuration

Auth0 Dashboard

  1. On the Auth0 Dashboard create a new Application of type Regular Web Application.
  2. On the Settings tab of your application, add the URL http://localhost:3000/login/oauth2/code/auth0 to the Allowed Callback URLs field.
  3. On the Settings tab of your application, add the URL http://localhost:3000/ to the Allowed Logout URLs field.
  4. Save the changes to your application settings. Don't close this page; you'll need some of the settings when configuring the application below.

Application configuration

Copy src/main/resources/application.yml. to src/main/resources/application.yml:

cp src/main/resources/application.yml.example src/main/resources/application.yml

Set the application values in the src/main/resources/application.yml file to the values of your Auth0 application.

client-id: {YOUR-CLIENT-ID}
client-secret: {YOUR-CLIENT-SECRET}
issuer-uri: https://{YOUR AUTH0 DOMAIN}/

Running the sample

Open a terminal, go to the project root directory and run the following command:

Linux or MacOS:

./gradlew bootRun

Windows:

gradlew.bat bootRun 

The application will be accessible at http://localhost:3000.

Running the sample with docker

In order to run the example with Docker you need to have docker installed.

You also need to set the client values as explained previously.

Execute the command to run Docker for your environment:

Linux or MacOS:

sh exec.sh

Windows:

.\exec.ps1

The application will be accessible at http://localhost:3000.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Authors

👤 Madusha Sandaruwan

👤 Yasindu Sanjeewa

👤 Sachin Mihiranga

👤 Omali Fernando

👤 Pivindi Nimanga

👤 Dulana Dewmin