FlowTracer is a comprehensive Django-based application for tracking, tracing, and executing system workflows. It allows you to define complete application flows with components and connections, execute them with custom retry strategies, and recover from failures by retrying specific components.
- Visual Workflow Builder: Create complex application workflows with an intuitive UI
- Component Types: Support for Kafka, Message Queue, Database, Service, and API components
- Connection Types: Define relationships like Kafka-to-Kafka, Kafka-to-MQ, MQ-to-MQ, MQ-to-Kafka, and DB operations
- Customizable Retry Strategies: Define fixed interval, exponential backoff, or custom retry strategies for components
- YAML Generation: Automatically generate YAML files from workflow definitions
- Execution Management: Execute full workflows or retry specific components
- Validation Support: Enable validation during execution with different modes
- Authentication: Built-in user authentication and authorization
- Python 3.8 or higher
- pip (Python package installer)
- git (optional, for cloning the repository)
-
Clone the repository (or download and extract the zip file):
git clone https://github.com/yourusername/flowtracer.git cd flowtracer
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Access the application at http://127.0.0.1:8000/
- Log in: Start by logging in with your credentials
- Create Workflow: Click "Create Workflow" and provide a name and description
- Add Components: Navigate to the Components tab and add application components
- Define Connections: Create connections between components from the Connections tab
- Add Retry Strategies: Configure retry strategies for critical components
- Visualize: View the workflow diagram in the Visual Editor tab
- Generate YAML: Download the YAML definition for use in other systems
- Navigate to Execution: Click "Execute" for your workflow
- Configure Validation: Enable or disable validation during execution
- Start Execution: Click "Execute Workflow" to start the execution
- Monitor Progress: View the component status and execution logs
- Recover from Failures: Retry failed components if needed
- Create a workflow named "Order Processing"
- Add components:
- "OrderTopic" (Kafka component)
- "OrderQueue" (MQ component)
- "OrderService" (Service component)
- Create connections:
- "OrderTopic" to "OrderQueue" (Kafka to MQ connection)
- "OrderQueue" to "OrderService" (Processing connection)
- Add retry strategies to components
- Execute the workflow
- If a component fails, retry it individually
flowtracer/
├── flowtracer/ # Main Django project
├── authentication/ # Authentication app
├── workflow/ # Workflow builder app
│ ├── models.py # Data models for workflows
│ ├── views.py # View functions for UI
│ ├── services/ # Business logic services
│ │ ├── yaml_generator.py # YAML generation service
│ │ └── workflow_executor.py # Workflow execution engine
├── static/ # Static files (CSS, JS)
├── templates/ # HTML templates
├── manage.py # Django management script
└── requirements.txt # Python dependencies
FlowTracer is designed to be integrated with your existing systems. The YAML files generated by the system can be used by your application components to understand the workflow structure. You can extend the connectors in the workflow/services/connectors/
directory to integrate with your specific Kafka, MQ, or database systems.
- Component Types: Add new component types in the
WorkflowComponent
model - Connection Types: Define new connection types in the
WorkflowConnection
model - Connectors: Implement real connectors in the
workflow/services/connectors/
directory - Validation Rules: Extend the validation logic in the executor service
For production deployment, make sure to:
- Set
DEBUG = False
in settings.py - Configure a proper database (PostgreSQL recommended)
- Set up static files serving with whitenoise
- Use a production-ready web server like Gunicorn
- Consider using Docker for containerization
- Set up proper monitoring and logging
Sample Docker configuration:
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "flowtracer.wsgi"]
If you encounter any issues:
- NoReverseMatch Error: Check that all templates correctly handle workflows with empty/null IDs
- Database Issues: Reset migrations if necessary
- Static Files Not Loading: Check settings.py configuration and template references
- Missing Templates: Ensure all template files are in the correct locations
For detailed troubleshooting steps, see the Troubleshooting Guide.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.