This page walks you through every step needed to get BodegaX running on your local machine — from cloning the repository to seeing the dashboard load in your browser. The frontend (Angular 17) and the backend (Spring Boot) are maintained in separate repositories and must each be started independently. The Angular dev server runs on port 4200, and the Spring Boot API server runs on port 8080. Both must be running simultaneously for the application to function.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Edwin950821/BodegaX/llms.txt
Use this file to discover all available pages before exploring further.
Clone the Frontend Repository
Clone the BodegaX Angular frontend from GitHub and navigate into the project root:The repository root contains
package.json, angular.json, tsconfig.json, and the src/ directory. The Angular project name inside angular.json is BodegaX-angular, and the build output path is dist/bodega-x-angular/.Install Node.js Dependencies
Install all frontend dependencies declared in This command downloads and installs every package listed under Verify the Angular CLI is available after install:You should see Angular CLI version 17.x alongside Node.js and TypeScript ~5.2.2 listed in the output.
package.json:dependencies and devDependencies, including Angular 17 (@angular/core ^17.0.0), Angular Material (@angular/material ^17.3.8 and @angular/cdk ^17.3.8), RxJS (~7.8.0), jsPDF (^2.5.2), jspdf-autotable (^3.8.4), zone.js (~0.14.2), and all CLI tooling. The node_modules/ directory will be created in the project root.The project ships with a
.vscode/tasks.json that pre-configures an npm: start task (which runs ng serve) and an npm: test task. If you use Visual Studio Code, you can start the development server directly from the Terminal → Run Task menu without typing any commands.Set Up the Spring Boot Backend
The Spring Boot backend lives in a separate repository from the Angular frontend. Clone it and configure the database connection before proceeding.Configure Replace
src/main/resources/application.properties (or application.yml) in the backend project with your PostgreSQL credentials:bodegax, your_db_username, and your_db_password with your actual PostgreSQL database name and credentials. The backend listens on port 8080 by default; the Angular source code has this port hardcoded in every HTTP call.Initialize the PostgreSQL Database
Create an empty database for BodegaX before starting the backend for the first time:
- Hibernate Auto-Create (Recommended for Dev)
- Manual Migration Scripts
Set
spring.jpa.hibernate.ddl-auto=create in application.properties for the very first run. Hibernate will inspect all @Entity classes and generate the schema automatically. After the first successful start, change this value to update to prevent the schema from being dropped and recreated on every restart.Start the Spring Boot Backend
From the backend project root, start the Spring Boot application using Maven:Spring Boot will start the embedded Tomcat server. Watch the console for a line similar to:The REST API is now available at
http://localhost:8080. You can confirm it is running by sending a test request:Start the Angular Development Server
With the backend running, start the Angular frontend from the The Angular CLI compiles the application in development mode (Open your browser and navigate to:The app will automatically reload whenever you save changes to any source file under
BodegaX/ project root:optimization: false, sourceMap: true as configured in angular.json) and starts a local dev server. When you see:src/. There is no need to restart the server during active development.Building for production instead
Building for production instead
To generate an optimized production build rather than running the dev server:The Angular CLI runs with the
production configuration by default (as set by "defaultConfiguration": "production" in angular.json). This enables:- Full bundle optimization and tree-shaking
- Output hashing for cache-busting (
outputHashing: all) - Bundle budget enforcement (warning at 500 KB, error at 1 MB for initial bundle)
dist/bodega-x-angular/. This directory contains the static files (index.html, hashed JS/CSS bundles, favicon.ico, and assets/) that you serve in production.Create the First Admin User
BodegaX uses role-based access control with two roles: admin and client. The database starts empty, so you must create the first administrator account before logging in through the UI.The registration endpoint is After the user is created, you can log in through the UI at
POST http://localhost:8080/admin/create. Use Postman, curl, or any REST client to send the following request:http://localhost:4200. The login component sends credentials to POST http://localhost:8080/admin/login, receives back the user object (including role), and stores the session in sessionStorage under the key bodegax.Alternatively: seed the database directly
Alternatively: seed the database directly
You can insert an admin user directly into PostgreSQL if the REST endpoint is not yet reachable:Check the backend entity and service classes to confirm the exact column names and whether passwords are stored as bcrypt hashes before inserting directly.
Running Tests
BodegaX includes a Karma + Jasmine unit test suite for the Angular frontend. Tests run in a headless Chrome instance usingkarma-chrome-launcher.
tsconfig.spec.json and loads zone.js/testing as an additional polyfill. Test results are printed to the terminal and also available in the Karma HTML reporter opened in your browser.
Ports and Services Summary
| Service | URL | Notes |
|---|---|---|
| Angular Dev Server | http://localhost:4200 | Started with ng serve |
| Spring Boot API | http://localhost:8080 | Started with mvn spring-boot:run |
| PostgreSQL | localhost:5432 | Default port; configured in application.properties |
If port 4200 or 8080 is already in use on your machine, the respective server will fail to start. Use
ng serve --port 4201 to change the Angular port, or set server.port=8081 in application.properties to change the backend port. If you change the backend port, you must also update every hardcoded http://localhost:8080 URL in the Angular component source files.