Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/MateoNavarroMN/Balsamoa-Backend/llms.txt

Use this file to discover all available pages before exploring further.

Balsamoa Backend is the server-side engine for the Balsamoa clothing store. It exposes a versioned REST API (/api/v1/) for managing products, images, inventory variants (size + color), and catalog lookups, while also serving a static storefront and a built-in admin panel. The database layer runs on PostgreSQL via Supabase with a connection pool and SSL.

Quickstart

Clone, configure, and run the server locally in under five minutes.

API Reference

Explore all endpoints — products, images, sizes, colors, and the public store.

Architecture

Understand the module structure, database schema, and admin panel design.

Deployment

Deploy to Vercel and connect a Supabase PostgreSQL database.

What’s included

Product CRUD

Full create, read, update, and delete for products with transactional safety and logical soft-delete support.

Variants & Inventory

Each product supports multiple size/color variant combinations, each with independent stock tracking.

Image Management

Upload product images via multipart form (up to 5 MB, JPEG/PNG/WebP/GIF) and delete them by ID.

Public Store API

Read-only endpoints for the storefront return sanitized product data with censored stock labels.

Admin Panel

A self-contained HTML admin panel served at /admin for managing the catalog without a separate frontend.

Supabase + PostgreSQL

Backed by a PostgreSQL database on Supabase with a connection pool, SSL, and a catalog view for efficient queries.

Get running in 3 steps

1

Clone and install dependencies

git clone https://github.com/MateoNavarroMN/Balsamoa-Backend.git
cd Balsamoa-Backend
pnpm install
2

Configure environment variables

Copy the example env file and fill in your Supabase connection string:
cp inicializar/.env.example .env
Set DATABASE_URL to your Supabase connection string (use port 6543 for the pooler).
3

Initialize the database and start the server

Run the provided SQL file against your Supabase database, then start the dev server:
pnpm dev
The server starts at http://localhost:3003 and the admin panel at http://localhost:3003/admin.
See the Quickstart for a complete walkthrough including database initialization, and the Configuration page for all supported environment variables.

Build docs developers (and LLMs) love