- Create a Java application using Spring and Hibernate
- Provide Stateless JWT authentication
- Provide overview of the flights based on Flight Planning system
This is a web project, which could be characterized as a data gathering application.
The project is based on the principles of SOLID and three-tier software architecture.
Besides, such frameworks as Spring Web, Spring REST, Spring Security, Hibernate have been used to accomplish the task.
Authentication and authorization are also represented as a part of a project in a form of JWT tokens stored in HTTP Only Cookie.
HTTP requests can be sent in JSON format and are stored in a database.
- Java 11
- MySQL
- Hibernate
- Spring (Core, WEB, Security)
- Apache Tomcat (to run app locally)
- JWT Tokens (encrypted) are stored in HTTP Only Cookies
- JSP page to represent the result
- JSON mapping into POJO classes via DozerMapper
- Maven Checkstyle Plugin
Project flow:
- User authentication is done via stateless JWT, encrypted and saved as access token in HTTP Cookie
- Data is taken from Planning System via GraphQL request
- Received JSON is mapped to POJO and placed into static Map
- Map is updated via scheduled service every 15 mins
- Based on selected filters, JSP page is rendered
POST: /register
(to create a user) - ALL Roles (but Airline AccessKey is required for proper results display)
GET: /profile
(to get information about the user and list of availbale aircraft) - ALL Roles
GET: /flights
(to get list of the flights) - ALL Roles. Can be parametrized with:
=> daysRange
- between 0 and 90 days, to filter list for specific date range from today till indicated amount of days.
=> registration
- string format, to filter list for specific aircraft.
=> hasNotes
- boolean, filter list for flights with remarks only.
=> hasFiles
- boolean, filter list for flights with files attached only.
GET: /users
(to get list of available users in the system) - ADMIN Role
GET: /users/by-email
(to get specific user info) - ADMIN Role
{"email":"bob@gmail.com", "password":"bobsPass", "repeatPassword":"bobsPass", "name":"Bob", "surname":"Smith"} POST: /register
- Install and configure Apache Tomcat (recommended version 9.0.50)
- Install and configure and create a schema in MySQL
- Fork and clone this project
- To connect to database in application you need change configuration information
in the file from
/resources/application.properties
to the ones you specified when installing MySQL - DB properties are configured as ENV variables or can be placed into 'application.properties' file:
db.driver= YOUR_DB_DRIVER
db.password= YOUR_DB_PASSWORD
db.url= YOUR_DB_URL
db.username= YOUR_DB_USERNAME
security.cipher.secret-key= SECRET_WORD_FOR_COOKIE_ENCRYPTION
security.jwt.cookie.token= TOKEN_NAME (JWT token will be saved with this name in the Cookie)
security.jwt.token.secret-key= JWT_TOKEN_SECRET_WORD
- Run this project using Tomcat local server
Couple of screenshots below.
Main screen with filter settings:
Profile with the list of the aircraft:
List of the filtered flights: