This guide walks you through every step required to run BodegaX locally — from installing system prerequisites to making your first authenticated API call. By the end, you will have both the Angular frontend and the Spring Boot backend running simultaneously, and you will be able to log in as an administrator through the browser.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.
BodegaX is a two-process application. The Angular dev server and the Spring Boot backend must both be running at the same time for the application to function. The frontend at
http://localhost:4200 makes live HTTP calls to the backend at http://localhost:8080 — if either process is stopped, the other will be unable to complete most operations.Prerequisites
Ensure the following tools are installed and available on yourPATH before proceeding.
| Prerequisite | Minimum Version | Purpose |
|---|---|---|
| Node.js | 18+ | Angular build toolchain and package manager |
| Angular CLI | 17+ | ng serve, ng build, and scaffolding commands |
| Java Development Kit | 17+ | Compiling and running the Spring Boot backend |
| Maven or Gradle | Latest stable | Building and running the Spring Boot project |
| PostgreSQL | 14+ | Relational database for all application data |
Setup Steps
Clone both repositories
BodegaX consists of a separate Angular frontend and a Spring Boot backend. Clone both to your local machine.Keep both directories open in separate terminal windows throughout this guide.
Configure the PostgreSQL database
Create a new PostgreSQL database for BodegaX and update the backend’s data source settings to match your local environment.Then open the backend’s
application.properties (or application.yml) and update the connection values:Start the Spring Boot backend
From inside the Spring Boot’s embedded Tomcat server will start on port 8080. Wait until you see a log line similar to the following before moving to the next step:If you prefer Gradle, use:
BodegaX-Backend directory, build and start the backend server using Maven.Install Angular dependencies
Switch to the This installs Angular 17, Angular Material, RxJS, jsPDF, jsPDF-AutoTable, and all dev dependencies. The install typically takes 30–60 seconds on a standard connection.
BodegaX (frontend) directory and install all npm packages declared in package.json.Start the Angular development server
Launch the Angular dev server from within the The CLI compiles the application and starts a live-reload dev server on port 4200. You will see output similar to:
BodegaX directory.Open the application in your browser
Navigate to the following URL in any modern browser (Chrome, Firefox, Edge, or Safari):The
CheckNotLoginGuard on the /login route will detect that no session exists in sessionStorage and render the login screen automatically. If you are already logged in from a previous session in the same browser tab, the same CheckNotLoginGuard will redirect you away from /login straight to the home dashboard.Log in with administrator credentials
The login form submits a A successful response returns a JSON object that the Angular
After the
POST request to the Spring Boot backend’s /admin/login endpoint. You can test this directly with curl before using the UI:AppService writes to sessionStorage under the key bodegax:| Field | Type | Description |
|---|---|---|
uuid | string | Unique session identifier for the authenticated user |
nombre | string | Display name shown in the sidebar and profile header |
role | string | Either "admin" or "user" — controls UI visibility |
id | number | Internal database ID of the user record |
direccion | string | Registered address associated with the user account |
AppService.logIn() method receives the response, it stores this object in sessionStorage['bodegax'], sets the isLogged$ observable to true, updates role$ to "admin", and navigates to the / (root) route, where CheckLoginGuard permits access and the Sales Dispatch dashboard is displayed.If you receive a
401 Unauthorized or an "Credenciales invalidas" dialog in the browser, verify that the backend is running, the database is seeded with at least one admin account, and that the username and password match the record in your PostgreSQL bodegax database.What’s Next
With BodegaX running locally, explore the rest of the documentation to understand how each module works and how the frontend and backend communicate.Architecture
Deep-dive into the three-tier data flow, route guards, and reactive auth state.
Sales Dispatch
Learn how the Despachar Caja workflow moves crates from inventory to client.