- Java 14
- Spring Boot
- Spring JPA
- JavaFX
- Spring Security
Model includes classes:
- Flight - information about each individual flight - contains arrival and departure times, source and destination locations, flight carrier and base flight price
- Client - information about each individual client - their first and last name and email
- Order - information about order - to which client it belongs - it is also connected to tickets so that you can see which tickets belong to the order
- Ticket - information about the ticket - to which passenger it belongs, from which order as well as some basic information such as final (possibly discounted) cost and seat
- Passenger - information about passenger - their first and last name(as client can buy tickets for other family members)
- Location - information about location airport - city, country and airport id
- Carrier - information about carrier - carriers name
Software is split into separate applications. Backend based on Spring that publishes REST endpoints, and frontend with UI that consumes API.
- Open Command line in /backend and type gradle bootRun, then in /frontend type gradle run
User interface currently includes main page, add carrier page and add user page -> they are supposed to be for superuser(admin) only, but currently logging in is not implemented in m1
Page so client can login/register to access app
On the left side we can see logo and buttons to access multiple other panels. (some of the functionalities weren't implemented yet)
Clicking the button opens panel on the right side, left side stays intact.
As we can see main page for client is very similar to admin, however it lacks functions that client doesn't need and shouldn't have like adding users, locations etc.
The add user panel allows admin to add users to database, before sending request to database it checks wheter first and last names are empty and checks regex for email.
We can see that the email input is wrong. If everything is okay the request to database is sent.
The add carrier panel allows us to add carriers to database.
We have a list with all of the carriers and adding carrier is as simple as writing carrier name and confirming it.
Ability to add the location to database, we can also see all of the locations avalible.
The flights panel allows us to see all the flights and allows us to add flight to the database
As we can see we could add flight with the new Carrier we have added above
The flights panel allows us to see all the flights and reserve a flight we want
Booked Flight panel allows us to reserve chosen flight for multiple people at once, if there was a reservation for us already at colliding date - we cannot reserve
Recommended flights can show us up to 20 recommended flights, they are based on
- soon to departure flights
- favorite carrier
- most popular client destination place
- most popular client departure place
- some of the cheaper flights
We can search flights based on departure and arrival location and time and also on price
After search we can see the changes
We can select 2 dates to get carrier stats in the given time-frame. Stats include income as well as total flights that carrier made.
A panel where we can see all of our tickets we have booked
We used mail confirmation to
- confirm purchase of tickets:
-remind about flights:
We used Spring Security to implement Authentication and Authorization. Each user has role in the system (USER or ADMIN). We used following piece of code in WebSecurityConfig class to check has user permission to send request at specific endpoint:
When the new request come, Spring Security check conditions. Here we can see endpoint like "/api/client/admin" or "/api/flight", which need ADMIN ROLE to be obtained. ".anyRequest().authenticated()" part is used to authenticate user. We can also specify endpoint which not need authorisation for example: "antMatchers(HttpMethod.POST, "/api/client").permitAll()" allow each user to register. To authorise user we use Basic Authorisation. We always send email and password in request header. From definition Rest Api need to be stateless, cannot remember the session, it is why we decided to use Base Auth to authorise and authenticate. Very important class is ClientDetailsService which implements UserDetailsService interface. It is interface defined in the Spring Sercurity Library. Interface force to implement method to get user by his name (email in our case). Spring security use this class to obtain user details object.
ClientDetails is class which implements UserDetails (also interaface from Spring Security). This class allow Spring security to obtain authorisation roles as well as password, user name and another things needed for authorise and authenticate User.
Here we have a registration endpoint in the ClientController class. After registration at the application start page, We set user role to ROLE_USER. To create admin we have to log in as admin and then create one.
This endpoint allows admins to create new admins and users. Admin send Client in the request body and we just add new one.
This endpoint allow to check user role. It is used to split view for admin and user parts.
- MVC - seperate representation of information from the way it is presented and accepted from the user in view part(gui)
- DAO - uses Spring Repository class methods and transforms them into more practical methods used in endpoint code
- IOC - provided by Spring, used for most classes
- Composite - used in search of flights - we have composite search strategy
We distributed tasks among ourselves using JIRA so that we could keep track on our progress and try to distribute them more evenly
- start of frontend project - Wiktor Kamiński
- generified REST client - Wiktor Kamiński
- make GUI for main component - Wiktor Kamiński
- AddCarrier and AddUser GUIs - Wiktor Kamiński
- controller functionalities to change between scenes - Karol Koptyra
- HomeController - Karol Koptyra
- AddCarrierController - Karol Koptyra
- AddUserComponent - Karol Koptyra
- generified REST client - Wiktor Kamiński
- login/register page - Karol Koptyra
- listing all flights - Karol Koptyra, Wiktor Kamiński
- adding flights - Wiktor Kamiński
- REST controller has authentication - Karol Koptyra, Wiktor Kamiński
- new layout - Wiktor Kamiński
- search flights panel - Karol Koptyra
- search flights logic - Karol Koptyra
- add location controller - Karol Koptyra
- add roles field to create admins at admin view - Radosław Kopeć
- split views on admin and users parts - Radosław Kopeć
- add authorization (obtaining user role) - Radosław Kopeć
- generify add controllers - Paweł Miziołek
- fix reservation bugs(doubled flights, collision problems) - Karol Koptyra
- bookFlights Panel - Wiktor Kamiński
- change FlightsPanel depending on user/admin role - Karol Koptyra
- create recommendedFlights panel - Karol Koptyra
- create logic about recommending flights - Karol Koptyra
- create carrier stats panel - Wiktor Kamiński
- add table for addLocation, addCarrier panel - Karol Koptyra
- add YourTickets panel for client - Radosław Kopeć
- start of backend project - Paweł Miziołek
- data model - Paweł Miziołek
- add Destination to data model - Radosław Kopeć
- obtain SQL database - Radosław Kopeć
- add Hibernate - Radosław Kopeć
- generating sample data - Paweł Miziołek
- create user endpoint - Radosław Kopeć
- create Spring repositories with JPA - Radosław Kopeć
- established data base connection - Radosław Kopeć
- adding services - Paweł Miziołek
- generify endpoint code - Paweł Miziołek
- implementation of SQLite - Paweł Miziołek
- user authentication simpleauth - Paweł Miziołek
- carrier endpoint - Paweł Miziołek
- generify REST + add remaining endpoints - Paweł Miziołek
- Add authorisation and roles - Radosław Kopeć
- Add endpoint to create admins - Radosław Kopeć
- Add permisions for the client ( on which endpoint can user send request) - Radosław Kopeć
- Repair bug with double encoding while register user - Radosław Kopeć, Karol Koptyra
- Add endpoint to create Order with Flight,Tickets,User and Passengers passed into json - Radosław Kopeć
- Adding count of allowed places to the flight when is taking from the REST API - Radosław Kopeć
- Added GET endpoint /api/flight/collision which check collision between given flight and user's flights - Radosław Kopeć
- create mail notification about orders - Paweł Miziołek
- create mail reminders about upcoming flights - Paweł Miziołek
- add logic to return tickets for client - Radosław Kopeć
- documentation in readme - Karol Koptyra
- fixes in documentation - everyone in team
- add authorisation,authentication and registration endpoints documentation - Radosław Kopeć