Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndresLopezCorrales/Goods-Inventory/llms.txt

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

This guide walks you through running the complete Goods Inventory stack on your local machine. By the end you will have the Flask API serving data from a local MySQL database and the React dev server rendering the inventory UI in your browser.
Prerequisites — make sure the following are available before you begin:
  • Node.js ≥ 18 (includes npm)
  • Python ≥ 3.9 with pip
  • MySQL running locally and accessible with a user that can create databases
1

Clone the repository

Download the project from GitHub and enter the root directory:
git clone https://github.com/AndresLopezCorrales/Goods-Inventory.git
cd Goods-Inventory
2

Set up the Flask backend

Move into the server directory and install the Python dependencies listed in requirements.txt:
cd server-flask
pip install -r requirements.txt
Next, create a .env file in the server-flask/ directory. main.py uses python-dotenv to load these variables at startup, so the file must exist before you run the server:
server-flask/.env
NAME=root
PASSWORD=your_mysql_password
SERVER=localhost
DATABASE=inventario_csti
JWT_SECRET_KEY=your_secret_key_here
JWT_EXPIRES_DAYS=1
Replace your_mysql_password with your actual MySQL password, and set JWT_SECRET_KEY to any long, random string — it signs the admin authentication tokens.With the environment configured, start the development server:
python main.py
On the very first run, SQLAlchemy creates the inventario_csti database and all tables automatically. The startup routine then imports seed data from two bundled Excel files — app/data/areas.xls (locations and responsibles) and app/data/articulos.xls (items) — so the database is pre-populated and ready to query immediately.
3

Set up the React frontend

Open a new terminal, navigate to the client directory, and install the JavaScript dependencies:
cd ../client-react
npm install
Create a .env file in client-react/ that points the frontend at your local Flask server:
client-react/.env
VITE_API_URL=http://localhost:5000
Vite exposes this value to the application as import.meta.env.VITE_API_URL. The src/config/api.js file re-exports it as API_URL, which every component imports when making fetch calls to the Flask backend.Start the Vite development server:
npm run dev
4

Open the app

The React dev server listens on http://localhost:5173 by default. Open that URL in your browser.You will land on the public home page. Type a name into the search box to find a responsible person, then click through to see their assigned locations and the items stored at each one. The frontend is talking live to your Flask backend — any data imported from the Excel seed files will appear here.
Accessing the admin panel — navigate to /admin in the browser (i.e., http://localhost:5173/admin). Log in using credentials from the admin table in your MySQL database. Once authenticated, the admin dashboard lets you search across the full inventory, inspect all responsibles and locations, and review the complete revision history.

Build docs developers (and LLMs) love