Skip to main content

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 exposes a Spring Boot REST API that the Angular 17 frontend communicates with exclusively. All warehouse operations — from user authentication to recording beer crate sales — are driven through this API. Every request and response body uses JSON, and the server runs locally at http://localhost:8080 during development. There are no versioned URL prefixes; resources are addressed directly under their group paths.

Base URL

http://localhost:8080
All endpoint paths below are relative to this base URL. In a production deployment, replace this value with your server’s public host and port.

Request Format

Set the Content-Type header to application/json on every request that includes a body (POST, PUT, DELETE with body). GET requests require no headers beyond standard defaults.
Content-Type: application/json

Authentication Model

BodegaX uses session-based authentication rather than bearer tokens. The POST /admin/login endpoint returns a full user object. The Angular frontend stores this object in the browser’s sessionStorage under the key bodegax:
sessionStorage.setItem('bodegax', JSON.stringify(res));
On subsequent requests that need to identify the acting user (such as creating a sale), the frontend reads the stored object and passes the user’s uuid as uuid_admin or uuid_cliente inside the request body. There is no Authorization header; the API itself is not stateful — identity is carried in the body fields.
Because user identity is embedded in request bodies rather than verified server-side tokens, this API is intended for trusted local network environments. Do not expose http://localhost:8080 to the public internet without adding proper token-based authentication.

Resource Groups

The API is organized into four resource groups:
GroupBase PathDescription
Admin / Users/admin/*Login, registration, user management
Products/productos/*Beer product catalog and stock levels
Sales/ventas/*Sale transaction records
Product-Sale Line Items/producto-ventas/*Per-product breakdown within a sale

All Endpoints

MethodPathDescription
POST/admin/loginAuthenticate a user and return their session object
POST/admin/createRegister a new user account
PUT/admin/editUpdate an existing user’s information
DELETE/admin/deleteDelete a user by passing their object as the body
GET/admin/allRetrieve all registered users
GET/productos/allRetrieve all beer products and their current stock
PUT/productos/editUpdate a product’s name, price, or stock count
POST/ventas/createCreate a new sale transaction record
GET/ventas/allRetrieve all sale transaction records
POST/producto-ventas/createAdd a product line item to an existing sale
GET/producto-ventas/allRetrieve all product-level sale line items

API Reference Pages

Authentication

Login, registration, and full user account management via the /admin/* endpoints.

Products

Browse the beer catalog and update stock levels via the /productos/* endpoints.

Sales

Record and retrieve sale transactions and line items via /ventas/* and /producto-ventas/*.

Orders

Understand how client crate requests map to the sales data model and full order lifecycle.

Build docs developers (and LLMs) love