This guide walks you through cloning the Aibar SRL App repository, installing dependencies, pointing the app at a backend API, and launching the development server. By the end you will have a fully functional local environment atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lucavallini/aibar-frontend/llms.txt
Use this file to discover all available pages before exploring further.
http://localhost:4200 authenticated against either a local FastAPI instance or the hosted production API.
Prerequisites
Before you begin, make sure the following are available on your machine:- Node.js 18 or later — nodejs.org
- Angular CLI 22 — install globally with
npm install -g @angular/cli@22 - A running Aibar backend — either a local FastAPI server or the hosted instance at
https://aibar-api.onrender.com
If you do not have a local backend available, you can point the development build at the production API by setting
apiUrl to https://aibar-api.onrender.com in src/environments/environment.ts. See Step 3 below.Setup
Clone the repository
Clone the
aibar-frontend repository from GitHub and navigate into the project directory:Install dependencies
Install all Node.js dependencies declared in This installs Angular 22, RxJS 7.8, Vitest 4, Prettier, and the Angular CLI build toolchain.
package.json:Configure the environment
Open Change
src/environments/environment.ts and set apiUrl to the address of your backend. The default points to a local FastAPI server running on port 8000:apiUrl to match wherever your Aibar backend is running. For the hosted API, use https://aibar-api.onrender.com.Start the development server
Launch the Angular development server:Angular CLI compiles the application and serves it at The browser will automatically reload whenever you modify a source file.
http://localhost:4200. The terminal output will confirm the address once compilation succeeds:Log in
Open
http://localhost:4200 in your browser. You will be redirected to /login automatically — unauthenticated users cannot access any other route.Enter your credentials:- Administrador account — grants access to all modules including Auditoría and Usuarios.
- Empleado account — grants access to Viajes, Choferes, Camiones, Multas, and Combustible.
sessionStorage under the key aibar_token and automatically attached to every subsequent HTTP request by the authInterceptor.Running Tests
The project uses Vitest as its test runner, integrated through the@angular/build:unit-test builder. Run the full unit test suite with:
*.spec.ts files in the project. Test results are printed to the terminal; the process exits with a non-zero code if any test fails, making it safe to use in CI pipelines.
Building for Production
To compile an optimized production bundle, run:dist/ directory and are ready to be deployed to any static hosting provider or web server.
The production build automatically uses
src/environments/environments.prod.ts, which sets apiUrl to https://aibar-api.onrender.com. You do not need to change any environment file before running a production build.