This guide walks you through running the Sistema de Inventario Tecnológico on your local machine from scratch. By the end you will have the Express backend and the React frontend both running, a valid session cookie in hand, and a clear picture of how the two processes communicate. The entire setup should take less than 10 minutes on a machine that already has Node.js and a package manager installed.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielings/Pasantia-Proyecto/llms.txt
Use this file to discover all available pages before exploring further.
Firebase credentials are obtained by creating a service account in the Firebase Console. Navigate to Project Settings → Service accounts → Generate new private key and download the resulting JSON file. The individual fields from that file map directly to the environment variables described in Step 3.
Clone the repository
Clone the project from its remote repository and enter the project root. All subsequent commands are run from within this directory.
Install backend dependencies
Move into the Key backend packages that will be installed:
backend directory and install all Node.js dependencies. The project uses ES Modules ("type": "module") and Express 5, so Node.js 18 or later is required.| Package | Purpose |
|---|---|
express 5.2 | HTTP server and router |
firebase-admin | Firestore access via service account |
jsonwebtoken | JWT signing and verification |
nodemailer | SMTP email for password recovery |
pdfkit | PDF export generation |
xlsx | Excel export generation |
bcrypt / bcryptjs | Password hashing |
mysql2 | MySQL connection for password-reset tokens |
cookie-parser | HTTP-only cookie parsing |
Configure environment variables
Create a Populate the file with all required variables:
.env file inside the backend/ directory. The config/env.js module resolves this file relative to itself and loads it automatically on startup using dotenv.Start the backend
From the You should see output similar to:The server is now listening at
backend/ directory, start the Express server. It binds to port 3001 and prints how many environment variables were loaded.http://localhost:3001. All API routes are mounted under the /api prefix.Install frontend dependencies
Open a second terminal, navigate to the Key frontend packages that will be installed:
frontend/ directory from the project root, and install dependencies.| Package | Purpose |
|---|---|
react 19 / react-dom | UI rendering |
react-router-dom 7 | Client-side routing |
react-hook-form + zod | Form state and validation |
axios | HTTP requests to the Express API |
tailwindcss 4 + @tailwindcss/vite | Utility-first styling |
shadcn / radix-ui | Accessible UI primitives |
react-hot-toast | Toast notifications |
recharts | Dashboard charts |
lucide-react | Icon library |
Start the frontend
Run the Vite development server. It starts on port 5173 and proxies nothing — all API calls from the React app go directly to Vite will print a local URL like
http://localhost:3001.http://localhost:5173. Open it in your browser; you will be redirected to the /login page automatically by the RutaProtegida component in App.jsx.Log in and obtain your session token
With both servers running, authenticate by sending a A successful response looks like:The In the browser, the React frontend handles this automatically — Axios is configured with
POST request to /api/login with a JSON body containing correo and password. On success, the server signs a JWT with JWT_SECRET and writes it as an HTTP-only cookie named acceso_token.-c cookies.txt flag tells curl to save the acceso_token cookie. Pass -b cookies.txt on subsequent requests to authenticate them:withCredentials: true so the cookie is sent on every request.