This document describes how to run the frontend. For information on best practices related to development, see the best practices document.
The app uses TypeScript and React. For development, Node v24.x needs to be installed. Installation instructions can be found here.
The application reads environment variables from the .env file in the frontend folder.
See Flotilla readme.
As a starting point, make a copy of the .env.example file and rename it to .env.
To install the application, navigate to the frontend folder and run the following command:
pnpm install --frozen-lockfile
To start the app, run the following command in the root folder:
pnpm dev
This command runs the app in development mode. Open http://localhost:3001 to view it in the browser.
The page will reload if you make edits. You will also be able to see any lint errors in the console.
To run the frontend in Docker, run the following command in the root folder of Flotilla:
docker compose up --build frontend
Authentication is implemented for the frontend following the official Microsoft tutorial on OAuth2 flow in React.
We use Prettier for formatting. To test the formatting locally, run:
pnpm prettier_check
We recommend installing the Prettier extension for VS Code
and setting the format on save option for VS Code to true.
You can do this by going to File -> Preferences -> Settings and then searching for "Format On Save" and ticking the box.
The application reads custom environment variables from the .env file on startup. The variables need to be prefixed with VITE_ to be included in the application.
These are parsed and defined in config.ts.
To run locally towards the databases, follow the steps below:
- Change
UseInMemoryDatabasetofalseinappsettings.Localand setASPNETCORE_ENVIRONMENTto the correct environment inlaunchSettings.json. - Update
VITE_BACKEND_API_SCOPEin the.envfile located in thefrontendfolder.