This repository contains the source code for the WebUI of FlyFast.
For the source code of the backend, head over to FlightSearch. This will be necessary to make any backend calls but is not required for viewing the WebUI.
To view the full source code and to run the whole application through Docker, head over to FlyFast.
- React 19 with TypeScript (strict mode)
- Vite 6 (build tool and dev server)
- Vitest 3 (test runner)
- Mantine 8 (UI components)
- React Router 7 (routing)
- OpenTelemetry (tracing)
- Git (Optional)
- A Docker host, for example Docker Desktop (Optional)
- Node.js 22.14.0 (Required)
- FlightSearch (Required only for backend calls)
- Clone/download this repository.
git clone https://github.com/Aternity/FlyFast-WebUI.git - Using the terminal, change the directory to the folder of this project.
cd FlyFast-WebUI - You can either start the application using Node.js or Docker.
-
Install the dependencies required to run this application:
npm install -
Set the environment variables for the application. Copy .env.example to
.envand fill in the values.VITE_FLIGHT_SEARCH— the Flight Search URL (default port8080), used if you are running FlightSearch.VITE_OPENTELEMETRY_ENDPOINT— the APM Collector URL (default port55681), used if you are running the Aternity APM Collector.
Environment variables are accessed in source code via
import.meta.env.VITE_*. -
Select one of the following scripts that best suits your purpose.
- Build the Docker image:
docker build . -t flyfast-webui - Run the container:
docker run --rm -p 80:80 -e VITE_FLIGHT_SEARCH=http://localhost:8080 -e VITE_OPENTELEMETRY_ENDPOINT=http://localhost:55681 flyfast-webui - Open http://localhost:80 to view it in your browser.
In the project directory, you can run:
Runs the app in development mode using Vite.
Open http://localhost:5173 to view it in your browser.
The page hot-reloads when you make changes.
Runs the Vitest test suite once and reports results.
Runs Vitest in watch mode, re-running affected tests on file changes.
Opens the Vitest browser UI for interactive test inspection.
Builds the app for production into the dist/ folder.
The build is minified and filenames include content hashes.
Serves the production build from dist/ locally for inspection before deployment.
Runs TypeScript validation without emitting build artifacts.
Runs the complete test suite with coverage gate enforcement (80% minimum coverage on statements, branches, functions, and lines). This is used in CI/CD pipelines.
FlyFast-WebUI maintains comprehensive test coverage with a focus on critical business logic and user workflows:
- Coverage Target: 80% minimum on all metrics (statements, branches, functions, lines)
- Current Coverage: 94% statements, 85% branches, 86% functions, 94% lines
- Test Approach:
- Unit tests for services, utilities, and component logic
- Integration tests for multi-component workflows (search → results → checkout)
- Per-file test coverage for all pages and components
- Mocked Mantine provider and React Router for isolated component testing
To run tests:
- Run all tests:
npm test - Watch mode:
npm run test:watch - Interactive UI:
npm run test:ui - With coverage:
npm run test:ci
Test files are co-located with source code using the .test.tsx and .test.ts naming convention.
The Dockerfile uses a multi-stage build:
- Build stage: Node 22 Alpine — installs dependencies and runs
vite build(output indist/) - Runtime stage: NGINX 1.27 Alpine — serves the static assets; injects
VITE_*environment variables at container startup viaenvsubst
Build image:
docker build -t flyfast-webui .Run container:
docker run --rm -p 80:80 -e VITE_FLIGHT_SEARCH=http://localhost:8080 -e VITE_OPENTELEMETRY_ENDPOINT=http://localhost:55681 flyfast-webuiCopyright (c) 2022 Riverbed Technology, Inc.
The contents provided here are licensed under the terms and conditions of the MIT License accompanying the software ("License"). The scripts are distributed "AS IS" as set forth in the License. The script also include certain third party code. All such third party code is also distributed "AS IS" and is licensed by the respective copyright holders under the applicable terms and conditions (including, without limitation, warranty and liability disclaimers) identified in the license notices accompanying the software.