Skip to content

Requiet2K/Flight_Search_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Flight Search API

Project Description

Flight Search API is a web application that allows users to search for flights based on various criteria such as departure airport, arrival airport, and departure time. It provides a convenient way to manage flights and find available options for travel.

Technologies Used

  • Java
  • Spring Boot
  • MySQL
  • Spring Security

Project Structure

The project adopts a structured modern architecture designed to provide users with flight search capabilities upon registration and authorization. Here's an overview of the key features and components:

User Authentication and Authorization

  • User Registration: Users must register via the "/api/auth/register" endpoint to gain access to flight search functionalities. The user's password is securely hashed using the bcrypt algorithm during registration.

  • Token-based Authentication: Upon successful login via the "/api/auth/authentication" endpoint, users receive a JSON Web Token (JWT) that grants access to the flight search API. The token has a validity period of 10 minutes, enhancing security.

Flight Search

  • Search Capabilities: Authenticated users can search for flights, including one-way or round-trip options. The system supports various search parameters, providing flexibility for users to find the desired flights.

  • Airport Queries: Users can perform queries on airports, enhancing the search experience.

  • Error Handling: Modern custom exceptions are implemented to gracefully handle scenarios where users input invalid flights or airports.

  • DTOs for Requests: Data Transfer Objects (DTOs) are employed for handling incoming requests, ensuring a clean and organized structure.

Scheduled Jobs

  • Third-Party API Integration: A Scheduled Job mechanism runs every night to fetch flights from a third-party API. For demonstration purposes, a MockController generates custom data, showcasing the integration of external data into the project.

This structured approach ensures a secure, user-friendly, and feature-rich flight search system, catering to the needs of registered and authenticated users.

Swagger API Documentation

  • API Documentation: The project includes Swagger API documentation, providing detailed information about the available endpoints, request parameters, and responses.

About

Spring project for flight searching api. Spring Boot, Spring Security and more technologies are used. Includes Swagger API documentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages