Skip to main content

Quick Start Guide

This guide will get you from zero to tracking your first production order in under 10 minutes.
Already have PROD-SYS installed? Skip to Step 3.

Prerequisites

Before starting, ensure you have:
  • Node.js 18+ installed
  • Basic terminal/command line knowledge
  • 512MB available RAM

Step 1: Clone and Install

1

Clone the repository

git clone https://github.com/Boris-Lazo/trazabilidad-y-calidad-industrial.git
cd trazabilidad-y-calidad-industrial
2

Run the automated setup

chmod +x setup.sh
./setup.sh
This script will:
  • Install all npm dependencies
  • Generate a secure .env file with random JWT secret
  • Set default configuration values
3

Review your environment configuration

Open .env and update these critical fields:
.env
# Change this to a strong admin password
ADMIN_PASSWORD=YourSecurePassword123!

# Server port (default is fine for local testing)
PORT=3000

# Set to production for live deployment
NODE_ENV=development
Security: Change ADMIN_PASSWORD to something secure. This will be used to create your admin account.

Step 2: Start the Server

npm start
You should see output like:
Conectado a la base de datos SQLite [backend/database/mfcalidad.sqlite].
SQLite optimizado: WAL mode, Synchronous NORMAL, Foreign Keys ON.
Servidor industrial corriendo en el puerto 3000 [Mode: development]
Server is running! Keep this terminal window open.

Step 3: Bootstrap the System

On first run, you must create the admin account:
1

Navigate to the bootstrap page

2

Enter your admin password

Use the ADMIN_PASSWORD you set in your .env file.
3

Set your new admin password

Enter a new secure password for ongoing admin access.
4

Confirm bootstrap

Click “Inicializar Sistema”. You’ll see a success message and be redirected to login.
Bootstrap can only be performed once. After completion, the endpoint is permanently disabled for security.

Step 4: Log In and Explore

1

Navigate to login

2

Log in as admin

  • Username: admin
  • Password: Your new admin password from bootstrap
3

View the dashboard

You’ll land on the main dashboard showing shift status and production processes.

Step 5: Open Your First Shift

Production tracking is organized by shifts (turnos). Let’s open one:
1

Check shift status

The dashboard shows the current shift (T1, T2, or T3) and whether a shift log (bitácora) is open.
2

Open a shift log

Click “Abrir Bitácora” to start tracking for the current shift.The system will:
  • Auto-detect the current shift based on time
  • Set the operational date
  • Assign you as the inspector
3

Navigate to a process

Click on any production process (e.g., “Extrusor PP”, “Telares”) to begin recording data.

Step 6: Record Your First Production

1

Start with quality validation

PROD-SYS enforces a quality-first workflow:
  1. Click “Registrar Calidad”
  2. Enter quality parameter values (e.g., width, thickness)
  3. Mark results as “Cumple” (Pass) or “Rechazo” (Reject)
  4. Save quality samples
2

Record production

Once quality is validated:
  1. Click “Registrar Producción”
  2. Select the production order
  3. Enter quantity produced
  4. Add any observations
  5. Save production record
3

View process status

Return to the dashboard. You’ll see your process marked as 🟢 Completo (Complete).

What’s Next?

Create Production Orders

Learn how to create and manage production orders

Quality Control

Understand quality batches and sample tracking

Personnel Setup

Add users and assign roles

API Integration

Integrate PROD-SYS with external systems

Common First-Time Questions

You have two options:
  1. Manual Creation: Navigate to “Órdenes” in the sidebar and click “Nueva Orden”
  2. SAP Import: Use “Importar desde SAP” to batch import orders from an Excel file
See the Production Orders Guide for details.
PROD-SYS uses a three-shift schedule:
  • T1 (Day): 07:00 - 15:00
  • T2 (Afternoon): 15:00 - 23:00
  • T3 (Night): 23:00 - 07:00 (next day)
The system automatically detects the current shift.
No. PROD-SYS enforces data completeness:
  • All active processes must have quality samples
  • All active processes must have production records
  • Processes with activity must have assigned personnel
This ensures traceability and compliance.
  1. Navigate to the “Personal” section
  2. Click “Registrar Personal” to add a person to your organization
  3. Assign a system role (e.g., Operario, Supervisor)
  4. The person can now log in and use the system
See User Management for details.

Development Mode

For Testing Only: Set DISABLE_AUTH_CHECKS=true in your .env to bypass permission checks during development.
Never use this setting in production!

Troubleshooting

”Bootstrap already completed”

Bootstrap can only run once. If you need to reset:
sqlite3 backend/database/mfcalidad.sqlite "UPDATE system_config SET value = '0' WHERE key = 'bootstrap_completed';"
Then restart the server.

”Database is locked”

This usually means another process is accessing the database. Restart the server or check for stale lock files:
rm backend/database/mfcalidad.sqlite-shm
rm backend/database/mfcalidad.sqlite-wal

Port 3000 is in use

Change the port in your .env file:
PORT=3001

Next Steps

Full Installation Guide

Production deployment, Docker, PM2, and more

Core Features

Deep dive into production management features

User Guides

Step-by-step workflows for common tasks

Configuration

Customize PROD-SYS for your operations

Build docs developers (and LLMs) love