- Created boxes_crates table with 8-digit auto-generated box numbers - Added manage_boxes route and full CRUD operations - Implemented box status tracking (open/closed) - Added location assignment functionality - Integrated QZ Tray printing with barcode labels - Created manage_boxes.html with table, preview, and print features - Added 'Manage Boxes/Crates' card to warehouse main page - Boxes can be created without location and assigned later - Includes delete functionality for admin/management roles - Added box statistics display
Quality Recticel Application
Production-ready Flask application for quality management and traceability.
📋 Current Status (November 29, 2025)
✅ Production Environment
- Deployment: Docker containerized with docker-compose
- Web Server: Gunicorn WSGI server (8 workers)
- Database: MariaDB 11.3
- Python: 3.10-slim
- Status: Running and healthy on port 8781
🎨 Recent UI/UX Improvements
Maintenance Card
- ✅ Dark mode support with CSS custom properties
- ✅ System storage information display (logs, database, backups)
- ✅ Database table management with drop functionality
- ✅ Improved visual hierarchy and spacing
Backup Management
- ✅ Quick action buttons (Full Backup, Data-Only, Refresh)
- ✅ Per-table backup and restore functionality
- ✅ Collapsible table operations section
- ✅ Split layout: Schedule creation (1/3) + Active schedules (2/3)
- ✅ Modern card-based interface
🔧 Technical Fixes
- ✅ Fixed database config loading to use
mariadbPython module - ✅ Corrected SQL syntax for reserved keyword
rows - ✅ All endpoints use proper config keys (
server_domain,username,database_name) - ✅ Storage paths configured for Docker environment (
/srv/quality_app/logs,/srv/quality_app/backups) - ✅ Resolved duplicate Flask route function names
📂 Project Structure
/srv/quality_app/
├── py_app/ # Python application
│ ├── app/ # Flask application package
│ │ ├── __init__.py # App factory
│ │ ├── routes.py # Route handlers (5200+ lines)
│ │ ├── models.py # Database models
│ │ ├── database_backup.py # Backup management
│ │ └── templates/ # Jinja2 templates
│ │ └── settings.html # Settings & maintenance UI
│ ├── static/ # CSS, JS, images
│ ├── instance/ # Instance-specific config
│ ├── requirements.txt # Python dependencies
│ └── wsgi.py # WSGI entry point
├── backups/ # Database backups
├── logs/ # Application logs
├── documentation/ # Project documentation
├── docker-compose.yml # Container orchestration
├── Dockerfile # Multi-stage build
└── docker-entrypoint.sh # Container initialization
🗄️ Database
- Engine: MariaDB 11.3
- Host: db (Docker network)
- Port: 3306
- Database: trasabilitate
- Size monitoring: Real-time via information_schema
- Backup support: Full, data-only, per-table
🔐 Security & Access Control
- Role-based access: superadmin, admin, warehouse_manager, worker, etc.
- Session management: Flask sessions
- Database operations: Limited to superadmin/admin roles
- Table operations: Admin-plus decorator protection
🚀 Deployment
Start Application
cd /srv/quality_app
docker compose up -d
Stop Application
docker compose down
View Logs
docker logs quality-app --tail 100 -f
Rebuild After Changes
docker compose down
docker compose build
docker compose up -d
📊 API Endpoints (Maintenance)
Storage Information
GET /api/maintenance/storage-info- Get logs/database/backups sizes
Database Tables
GET /api/maintenance/database-tables- List all tables with statsPOST /api/maintenance/drop-table- Drop a database table (dangerous)
Per-Table Backups
POST /api/backup/table- Backup single tableGET /api/backup/table-backups- List table-specific backupsPOST /api/restore/table- Restore single table from backup
🔍 Monitoring
- Health Check: Docker health checks via curl
- Container Status:
docker compose ps - Application Logs:
/srv/quality_app/logs/(access.log, error.log) - Database Status: Included in storage info
📝 Recent Changes
Commit: 41f9caa - Improve maintenance & backup UI with per-table operations
- Enhanced maintenance card with dark mode
- Added system storage monitoring
- Implemented per-table database operations
- Restructured backup UI with better organization
- Fixed database connectivity and SQL syntax issues
🔄 Git Repository
- Branch:
docker_updates - Remote: https://gitea.moto-adv.com/ske087/quality_app.git
- Status: Up to date with origin
🐛 Known Issues
None currently reported.
📚 Documentation
Additional documentation available in /srv/quality_app/documentation/:
- Backup system guide
- Database structure
- Docker deployment
- Restore procedures
👥 Development Team
- Active Branch: docker_updates
- Last Updated: November 29, 2025
- Deployment: Production environment
For more detailed information, see the documentation folder or contact the development team.
Description
Languages
HTML
38.7%
Python
31.2%
JavaScript
13.5%
Visual Basic .NET
9.3%
CSS
4.7%
Other
2.6%