Flight offer search application, this web application makes use of Spring Boot and gradle for the backend, ReactJS with Vite for the frontend and a third party API called Amadeus that provides flights information for the application to consume.
- Java 17
- Spring Boot 3.3.4
- Spring Web (REST API)
- Spring WebFlux (Reactive API)
- Gradle (Build and dependency manag
- Springdoc OpenAPI (Swagger UI for API documentation)er)
- JUnit 5 (Unit testing With Spring Boot Starter Test)
- React
- TypeScript
- Vite (build tool & dev server)
- Tailwind CSS
- Vitest (Testing)
- Component Library(Shadcn..)
# Clone repository
https://github.com/AlexJauregui02/BreakableToyII.git# From the root directory, go to the backend folder
% cd backend
# Build the spring boot app
% ./gradlew clean build# From the root directory, go to the frontend folder
% cd frontend
# Install dependencies
% npm installCreate an .env file for storing the necessary variables:
BASE_URL=https://test.api.amadeus.com
CLIENT_ID={CLIENT_ID}
CLIENT_SECRET={CLIENT_SECRET}Create an .env file in the frontend root:
VITE_BACKEND_API_URL="http://{BACKEND_URL}/api"You need to first build the application by running:
% ./gradlew clean buildAfterward, you can run it:
% ./gradlew clean bootRun# Start running the frontend
% npm run startAccess:
- Backend:
http://localhost:8080 - Frontend:
http://localhost:9090
Both the frontend and backend folders include a Dockerfile.
Additionally, there is a root-level docker-compose.yml that builds and runs the containers together.
% docker compose buildAfterward, if you wish to containerize and run the generated images, run:
% docker compose up💡 Note: You will need Docker running on your machine in order to build and run the containers. You can use
Docker Desktop(Windows/macOS) or any other Docker-compatible runtime (e.g. Docker Engine on Linux, Rancher Desktop, Colima, Podman).
# Run unit tests (Junit)
./gradew testTo try the endpoints's available, use the link generated by swagger:
http://localhost:8080/swagger-ui.html
# Run unit tests (Vitest)
npm run test