Application built with Python + Streamlit and PostgreSQL to support the operational and analytical management of a hardware / metalworking company: stock, production, orders, deliveries, pricing & profitability, and invoicing (includes PDF + QR).
Quick documentation:
- INICIO_RAPIDO.md (quick setup)
- SETUP_GUIDE.md (detailed setup)
- 📊 General Dashboard – Business overview with key metrics
- 💰 Pricing Analysis – Profitability, market comparison, top customers
- 📦 Stock Management – Critical stock, inventory value, demand forecasting
- 🚚 Deliveries – Pending deliveries, performance, logistics costs
- ⏱️ Production Control – Stages, start/pause/resume/finish timer, bottlenecks, Gantt charts and efficiency
- 📉 Material Consumption – Planned vs actual consumption, waste and monetary impact (integrated into Orders)
- 💶 Invoicing – Sequential numbering YYYY/0001, items, payments, PDF + QR, aging report and cash flow
- ➕ New Order (Wizard) – Multi-step flow with client/product creation, cost calculation, quote/order creation
- 📋 Orders (Detail) – List/Calendar/Kanban + detailed view (materials, production, invoicing, documents, history)
- Python (3.9+; recommended 3.11+)
- Streamlit
- PostgreSQL
- psycopg2 (driver)
- pandas
- Plotly
- fpdf2 (PDF)
- qrcode + Pillow (QR/images)
- python-dotenv (.env)
Firma/
├── dashboard/
│ └── app.py
├── src/
│ ├── database.py
│ ├── pricing.py
│ ├── inventory.py
│ ├── delivery.py
│ ├── visualizations.py
│ ├── production.py
│ ├── material_tracking.py
│ ├── invoicing.py
│ └── pdf_generator.py
├── sql/
│ ├── schema.sql
│ ├── inserts.sql
│ └── queries.sql
├── scripts/
│ └── apply_schema.py
├── config.py
├── requirements.txt
├── .env
└── README.md
- Download and install PostgreSQL: https://www.postgresql.org/download/windows/
- Set a password for the
postgresuser - Verify installation:
psql --versionpython --versionPython 3.11+ recommended.
psql -U postgres -c "CREATE DATABASE firma;"
psql -U postgres -d firma -f sql\schema.sql
psql -U postgres -d firma -f sql\inserts.sqlpython -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtDB_HOST=localhost
DB_PORT=5432
DB_NAME=firma
DB_USER=postgres
DB_PASSWORD=your_password
streamlit run dashboard\app.pyIncludes suppliers, materials, products, quotes, sales, deliveries and stock movements.
- User authentication
- PDF report exports
- Stock alerts
- Mobile dashboard
- Supplier API integrations
Data Analyst Portfolio Project – 2026