This guide will take you from zero to a fully functional Trazea installation with your first inventory item tracked.
Prerequisites
Before you begin, ensure you have:- Node.js 22 or higher installed
- A Supabase account (free tier works fine)
- pnpm package manager (recommended) or npm/yarn
Clone and Install
Clone the Trazea repository and install dependencies:
Installation typically takes 2-3 minutes depending on your internet connection.
Configure Environment Variables
Copy the example environment file and configure your credentials:Open
.env and add your Supabase credentials:.env
Getting Supabase Credentials
- Go to supabase.com and sign in
- Create a new project or select an existing one
- Navigate to Settings → API
- Copy the Project URL to
VITE_SUPABASE_URL - Copy the anon public key to
VITE_SUPABASE_ANON_KEY
Start Development Server
Launch the application in development mode:The app will be available at
http://localhost:5173The development server includes hot module replacement (HMR) for instant updates as you make changes.
Create Your Account
Navigate to
Since this is your first time, you’ll need to create an account:Alternatively, you can log in with Google OAuth:
http://localhost:5173 in your browser. You’ll see the login page.
Since this is your first time, you’ll need to create an account:- Click the registration link (if available) or use Google OAuth
- Enter your email and create a password
- Submit the registration form
Approving Your First User
To approve your account, you’ll need to update the database directly:Configure Your First Location
After logging in, set up your first warehouse location:Locations in Trazea represent physical warehouses or stores where inventory is kept. Each location maintains independent stock levels.
- Navigate to Settings → Locations
- Click Add New Location
- Fill in the location details:
You can create multiple locations and transfer inventory between them using the request system.
Add Your First Spare Part
Now let’s add a spare part to the catalog:
- Go to Catalog → Spare Parts
- Click Create New Part
- Fill in the part details:
Available Part Types
- General - Miscellaneous parts
- Motor - Engine and motor components
- Transmision - Transmission parts
- Frenos - Brake systems
- Suspension - Suspension components
- Electrico - Electrical systems
- Carrocería - Body parts
The
referencia field is the unique identifier for each part. Make it descriptive and consistent.Create Your First Inventory Item
Finally, add this part to your location’s inventory:
- Navigate to Inventory → [Your Location]
- Click Add to Inventory
- Select the spare part you just created
- Configure the inventory details:
Inventory Fields Explained
- stock_actual - Current quantity in warehouse
- cantidad_minima - Minimum stock level before alerts
- posicion - Physical location code in your warehouse
- estado_stock - Automatically calculated:
NORMAL- Stock above minimumBAJO- Stock at or near minimumCRITICO- Stock below minimum or zero
When stock falls below
cantidad_minima, the system automatically generates low stock notifications.Verify Everything Works
Let’s confirm your setup:
- Go to Inventory → [Your Location]
-
You should see your inventory item with:
- Green stock badge (NORMAL status)
- Stock count of 10
- The “NEW” badge (items are marked as new for 5 days)
- Click on the item to open the edit sheet
- Try updating the stock quantity:
- Check Records → Inventory Logs to see the logged change
Audit Trail
Every inventory change is automatically logged with:- User who made the change
- Previous quantity
- New quantity
- Timestamp
- Operation type (manual adjustment, request fulfillment, etc.)
Next Steps
Request Parts Between Locations
Set up your workflow for transferring parts between warehouses with full traceability
Configure User Roles
Set up role-based access control with granular permissions
Set Up Warranties
Enable warranty tracking with photo evidence and status workflows
Physical Counts
Learn how to perform inventory audits and reconcile discrepancies
Common First-Time Issues
Can't log in after registration
Can't log in after registration
New accounts require admin approval. Check the
usuarios table in Supabase and set aprobado = true for your account.Environment variables not loading
Environment variables not loading
Make sure your
.env file is in the project root (same directory as package.json). Variable names must start with VITE_ to be exposed to the frontend.Restart the development server after changing environment variables:Database connection errors
Database connection errors
Verify your Supabase credentials:
- Check that
VITE_SUPABASE_URLuseshttps://protocol - Ensure
VITE_SUPABASE_ANON_KEYis the anon key, not the service_role key - Confirm your Supabase project is active and not paused
Parts not appearing in inventory
Parts not appearing in inventory
Spare parts and inventory items are separate entities:
- First create the spare part in the catalog
- Then add it to inventory for a specific location
Quick Reference: Key Concepts
| Concept | Description | Example |
|---|---|---|
| Repuesto | Master catalog of all spare parts | ”Electric Motor 48V” |
| Inventario | Location-specific stock of a repuesto | 10 motors at Main Warehouse |
| Localizacion | Physical warehouse or store | ”Main Warehouse”, “Branch Store” |
| Solicitud | Request to transfer parts between locations | Transfer 5 motors from Main to Branch |
| Movimiento | Technician’s daily part usage record | Loaded 2 motors for repair order #123 |
| Garantía | Warranty claim for defective parts | Motor failed at 500km |
Development Workflow
Now that you’re set up, here’s a typical development workflow:The project uses Vite for blazing-fast HMR and optimized production builds. Changes to React components will hot-reload instantly.
Architecture Overview
Trazea uses Feature-Sliced Design (FSD) for maintainable, scalable architecture:- UI components (
ui/) - Business logic (
lib/) - Type definitions (
model/) - API calls (
api/)
Learn More About FSD
Explore the Feature-Sliced Design methodology for scalable frontend architecture