A real-time flow development IDE with a modern UI and powerful features.
- Custom flow language with syntax highlighting
- Real-time flow visualization using Mermaid diagrams
- Live metrics and logging
- SQLite database for flow storage
- Server-Sent Events (SSE) for real-time updates
- Modern UI with dark theme
- Hot reload during development
- Docker support for development and testing
- Webhook integration for automated deployments
- Comprehensive test framework for shell scripts
- Docker and Docker Compose
- Or locally:
- Go 1.22 or later
- SQLite3
- Node.js (for Monaco Editor)
- Bash 4+ (for testing framework)
-
Clone the repository:
git clone https://github.com/yourusername/flow-control.git cd flow-control -
Start the development server:
docker compose up dev
-
Run tests:
# Run Go tests docker compose run test # Run shell script tests make test-scripts
-
Run code checks (formatting, linting, and tests):
make check
-
Clean the environment:
# Standard cleanup make clean-env # Force cleanup (if needed) make clean-env-force
-
Deploy to staging:
make setup-staging
-
Verify deployment:
# Health check endpoints curl http://localhost:8080/health curl http://localhost:9000/hooks
The application includes a webhook server for automated deployments:
-
Configuration (
config/hooks.json):{ "id": "deploy", "execute-command": "/app/scripts/deploy.sh", "trigger-rule": { "match": { "type": "value", "value": "staging", "parameter": { "source": "payload", "name": "environment" } } } } -
Trigger deployment:
curl -X POST http://localhost:9000/hooks/deploy \ -H "Content-Type: application/json" \ -d '{"environment": "staging"}'
/cmd
/flowcontrol # Entry point
/internal
/server # HTTP server, SSE, routing
/flow # Flow management
/parser # Custom syntax parser
/store # Database operations
/metrics # Metrics collection
/logger # Logging system
/config # Configuration management
/pkg # Reusable packages
/web
/templates # HTML templates
/static # CSS, JS, etc.
/tests # Integration tests
/scripts
/lib # Shell script libraries
/docker # Docker management
/ports # Port management
/env # Environment utilities
/test # Test framework
All development commands are containerized for consistency:
- Build the project:
make build - Run tests:
make test - Format code:
make fmt - Run linters:
make lint - Run all checks:
make check - Clean build files:
make clean - Generate docs:
make docs - Test shell scripts:
make test-scripts
The pre-commit hook automatically runs all checks in Docker to ensure code quality.
The application can be configured using a JSON configuration file:
{
"server": {
"host": "0.0.0.0",
"port": 8080
},
"database": {
"path": "data/flows.db"
},
"logging": {
"level": "info",
"format": "json",
"file": "/app/logs/flow.log"
}
}Environment variables:
CONFIG_FILE: Path to configuration fileLOG_LEVEL: Logging level (error, warning, info, debug)APP_PORT: Application port (default: 8080)WEBHOOK_PORT: Webhook port (default: 9000)
The API documentation is available through Swagger UI at http://localhost:8080/api/swagger/index.html when the server is running.
-
Go Tests:
make test -
Shell Script Tests:
make test-scripts
-
Integration Tests:
make docker-test
-
Debug Mode:
LOG_LEVEL=debug make <target>
MIT License