A real-time web-based dashboard for managing textile manufacturing orders and supply chain workflows. This system processes order information, tracks production stages, and provides live updates on order status and manufacturing progress.
- Real-time Dashboard: Live updates using WebSocket connections
- Order Management: Track customer orders with detailed item specifications
- Workflow Tracking: Monitor production stages (yarn lot, weaving, dyeing, finishing, quality control, shipping)
- Missing Information Detection: Automatically identify incomplete order details
- Customer Communication: Track email threads and conversation history
- Priority Management: Organize orders by priority levels
- Interactive UI: Modern Bootstrap-based interface with real-time notifications
- Backend: Flask (Python web framework)
- Database: SQLite with SQLAlchemy ORM
- Real-time Communication: Flask-SocketIO
- Frontend: HTML5, Bootstrap 5, JavaScript
- Icons: Font Awesome
workflow_manager/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── reset_db.py # Database init + reset utility
├── generate_sample_data.py # Sample data generator
├── sample_orders.json # Demo order data
├── static/
│ ├── css/
│ │ └── dashboard.css # Custom styles
│ └── js/
│ └── dashboard.js # Frontend JavaScript
├── templates/
│ └── dashboard.html # Main dashboard template
├── instance/
│ └── supply_chain.db # SQLite database
└── python-venv/ # Virtual environment
- Python 3.11 or higher
- pip (Python package installer)
- Modern web browser (Chrome, Firefox, Safari, Edge)
# If using git
git clone https://github.com/Petrinax/workflow_manager.git
cd workflow_manager
# Or download and extract the project files# Create virtual environment
python3 -m venv python-venv
# Activate virtual environment
# On macOS/Linux:
source python-venv/bin/activate
# On Windows:
python-venv\Scripts\activate# Install required Python packages
pip install flask flask-sqlalchemy flask-socketio eventlet# Make sure virtual environment is activated
source python-venv/bin/activate # On macOS/Linux
# python-venv\Scripts\activate # On Windows
# Run the Flask application
python app.pyThe application will start on http://localhost:5000
- Open your web browser
- Navigate to
http://localhost:5000 - You should see the Supply Chain Dashboard with real-time order tracking
The main dashboard displays:
- Order Statistics: Total orders, pending items, active workflows, completion rate
- Recent Orders: List of latest customer orders with status indicators
- Real-time Updates: Live notifications when order status changes
- Workflow Progress: Visual indicators for each production stage
The demo includes sample orders from various textile companies with:
- Different fabric types (Cotton, Wool, Silk, Polyester blends)
- Various colors and quantities
- Multiple production stages
- Different priority levels
- Realistic delivery dates
- Order Details: Click on any order to view detailed information
- Status Updates: Orders automatically progress through workflow stages
- Missing Information: System highlights orders with incomplete data
- Priority Filtering: Filter orders by priority level
- Real-time Notifications: Live updates without page refresh
GET /- Main dashboard pageGET /api/orders- Retrieve all ordersGET /api/orders/<id>- Get specific order detailsPOST /api/orders/<id>/update- Update order informationGET /api/stats- Get dashboard statistics
connect- Client connection establishedorder_updated- Real-time order status updatesnew_order- New order notificationsworkflow_progress- Production stage updates
- Customer information (name, email, destination)
- Delivery dates and priorities
- Order status and conversation history
- Created/updated timestamps
- Product specifications (type, material, color)
- Quantities and units
- Yarn lot numbers for traceability
- Production workflow tracking
- Stage status (pending, in_progress, completed)
- Start and completion timestamps
- Tracks incomplete order information
- Helps identify required customer follow-ups
- Database Errors: Run
python reset_db.pyto recreate the database - Port Conflicts: Change the port in
app.pyif 5000 is in use - Virtual Environment: Ensure the virtual environment is activated
- Missing Dependencies: Reinstall packages with
pip install -r requirements.txt
For development, set Flask environment variables:
export FLASK_ENV=development
export FLASK_DEBUG=True- Ensure code follows Python PEP 8 standards
- Test all features before submitting changes
- Update documentation for new features
- Maintain database compatibility
This project is for demonstration purposes. Please ensure compliance with your organization's policies before use in production environments.
For issues or questions:
- Check the troubleshooting section
- Review the Flask and SQLAlchemy documentation
- Ensure all dependencies are properly installed
- Verify database connectivity and permissions