Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/15aozzz/Lab-Nova-Salud/llms.txt

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

This guide walks you through a complete local setup — from cloning the repository to logging in with the test admin account. The whole process takes about ten minutes assuming Node.js and MySQL are already installed.

Prerequisites

  • Node.js v18 or highernodejs.org
  • MySQL v8.0 or higherdev.mysql.com
  • MySQL Workbench or any MySQL client capable of executing .sql files
1

Clone the repository

git clone https://github.com/15aozzz/Lab-Nova-Salud.git
cd Lab-Nova-Salud
2

Import the database

Open MySQL Workbench (or your preferred MySQL client) and execute the file at the root of the repository:
boticanovasalud_final.sql
This script creates the BoticaNovaSalud_Final database and populates it with:
  • All tables (products, clients, sales, users, receipts, and more)
  • Master data — categories, presentations, laboratories, and pricing tiers
  • Sample products and test user accounts
  • Stored procedures used by every API endpoint
  • Triggers that validate available stock before a sale and automatically deduct it after
Every backend API call invokes a stored procedure. The SQL file must be imported before starting the server, or all requests will fail.
3

Set up and start the backend

Install dependencies from the backend/ directory:
cd backend
npm install
Copy the environment template and fill in your MySQL credentials:
cp .env.example .env
Start the server:
npm start
Confirm it is running by opening http://localhost:3000/api/health in your browser. You should see:
{ "status": "ok", "message": "Backend Nova Salud funcionando correctamente" }
4

Set up and start the frontend

Open a new terminal, then install dependencies from the fn/ directory:
cd fn
npm install
Create the frontend environment file:
fn/.env
VITE_API_URL=http://localhost:3000/api
Start the Vite development server:
npm run dev
5

Verify the setup

Open http://localhost:5173 in your browser. You should see the Botica Nova Salud login page.Log in with the seeded admin account:
FieldValue
Usernameadmin
Passwordadmin123
A successful login redirects you to the dashboard, where you will see KPI cards, the weekly sales chart, and low-stock alerts generated from the sample data.
Change the default admin and cajero1 passwords before deploying to any environment accessible outside your local machine. These credentials are embedded in the SQL seed data and are publicly known.

Build docs developers (and LLMs) love