This project is a microservice application for managing flight data, including details on aircraft, airports, airlines, and historical aviation events for a specific date. It uses modern Java backend technologies to offer high flexibility and scalability.
- Java 17: The primary programming language for implementing all services.
- Spring Boot 2.7.4: The backbone of the microservice architecture with supporting modules:
- Spring Data JPA for working with the MySQL database.
- Spring Web for creating RESTful API endpoints.
- MySQL and MongoDB: MySQL is used for storing data about aircraft and companies, while MongoDB stores airport information.
- Kafka: Asynchronous communication between services for exchanging data across different microservices (flight-service, airport-service, plane-service, company-service, and aviation-events-service).
- Eureka Server: For registering and discovering microservices.
- Spring Cloud Gateway: Gateway server for centralized management of access to various services.
- MapStruct: Used for object mapping within the code.
- Flyway: Used for initializing data in the MySQL database at application startup.
- Swagger (Springfox and Springdoc): API documentation for each microservice.
- Unit Testing: JUnit 5 was used for test management, and Mockito was used for mocking dependencies.
- Jsoup: Used for parsing HTML content and extracting historical events for a given date.
- Jackson: For JSON data serialization and deserialization, with additional
@JsonFormatconfigurations for date formats. - Email: Mailtrap is used for testing email functionality. Inbox link: https://mailtrap.io/inboxes/3047360/messages/4541834293
- Lombok: Reduces boilerplate code in DTO classes by automatically generating getters and setters.
- Plane Service: Collects and stores information about aircraft, including average plane speed, in a MySQL database.
- Airport Service: Contains airport information, implemented with MongoDB, and allows for country-based searching. Data is integrated from an existing third-party API.
- Company Service: Stores details about airlines and uses MySQL. It communicates asynchronously with the plane service to retrieve the company fleet’s aircraft.
- Flight Service: Manages flight data and includes asynchronous calls to aviation-event-service to fetch historical events on the flight date, plane-service for aircraft data, company-service for company data, airport-service for departure and arrival airport information, and report-service to generate a PDF report on the created flight.
- Aviation Event Service: Parses HTML from a specified website to obtain relevant aviation events for a particular date and sends information to a Kafka topic.
- Report Service: Asynchronously collects the necessary data from the flight-service to create a Jasper report for the desired flight.
- Asynchronous Communication: Utilizes Kafka for efficient data exchange between various microservices.
- Caffeine Cache: Optimizes performance and reduces database load.
- Data Validation: Implemented format validation for dates in the FlightRequest DTO to prevent errors from incorrect dates.
- Logging and Monitoring: Through Slf4j logging and Spring Boot Actuator to monitor service status.
- Automated API Documentation: Swagger allows easy viewing and testing of all API endpoints.
- Reporting: Generates customized reports on flights using JasperReports, including details on passengers, aircraft, airlines, and relevant historical events.
This project is a robust example of a microservice application focusing on performance, scalability, and ease of maintenance. Using modern technologies and best practices, the application is built to work with complex aviation industry data and provides a stable foundation for further development and customization according to specific business needs.