This Flask application provides a web-based dashboard and API for viewing and serving files generated by the A.U.R.O.R.A. (Autonomous User-Responsive Orchestrator for Rapid Application development) orchestrator.
- Interactive Dashboard: Beautiful web UI showing project statistics, generated files, design system, and message bus
- Dynamic File Serving: View generated frontend/backend files without writing them to disk
- RESTful API: JSON endpoints for programmatic access to project state and files
- Real-time Updates: Displays current project state from aurora_orchestrator
pip install flask>=3.0.0python flask_app.pyThe server will start on http://localhost:5000 by default.
FLASK_HOST: Host address to bind to (default:0.0.0.0)FLASK_PORT: Port number to listen on (default:5000)FLASK_DEBUG: Enable debug mode (default:False)
Example:
FLASK_PORT=8080 FLASK_DEBUG=true python flask_app.py/- Main dashboard with project overview/files/<path>- View individual generated files with syntax highlighting
-
GET /api/state- Returns the complete PROJECT_STATE as JSON{ "tasks": {...}, "codebase": {...}, "design_system": {...}, "message_bus": [...] } -
GET /api/files- Returns all generated files with their content{ "files": { "frontend/src/components/LandingPage.jsx": "...", "legal/terms_of_service.md": "..." }, "count": 2 } -
POST /api/run-orchestrator- Runs the aurora_orchestrator to generate new files{ "success": true, "message": "Orchestrator completed successfully", "stats": { "completed": 6, "files": 2, "messages": 6 } }
The Flask app integrates seamlessly with aurora_orchestrator.py:
- Imports orchestrator components: Uses
PROJECT_STATE,CONFIG, and other orchestrator modules - Automatic initialization: Runs the orchestrator on first launch if no files exist
- Dynamic serving: Serves files directly from
PROJECT_STATE["codebase"]["files"]dictionary - Live updates: Reflects changes to PROJECT_STATE immediately
from aurora_orchestrator import AuroraOrchestrator, SimulationSettings
from flask_app import app
# Run orchestrator
settings = SimulationSettings()
orchestrator = AuroraOrchestrator(settings)
orchestrator.generate_initial_tasks()
orchestrator.main_loop()
# Start Flask server
app.run(host='0.0.0.0', port=5000)- Dashboard Template: Beautiful, responsive HTML/CSS interface
- File Viewer: Syntax-highlighted code viewer for generated files
- API Layer: RESTful endpoints for programmatic access
- State Integration: Direct access to aurora_orchestrator PROJECT_STATE
aurora_orchestrator.py
↓
PROJECT_STATE (in-memory dictionary)
↓
flask_app.py (reads PROJECT_STATE)
↓
Web Dashboard / API Endpoints
Run the test suite:
pytest tests/test_flask_integration.py -vTests cover:
- Dashboard rendering
- API endpoints
- File viewing
- Error handling
- Project state integration
@app.route('/your-route')
def your_handler():
# Access PROJECT_STATE
data = PROJECT_STATE['codebase']['files']
return jsonify(data)The dashboard uses inline HTML templates. Modify DASHBOARD_TEMPLATE in flask_app.py to customize the UI.
For production deployment:
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 flask_app:app# Change the port
FLASK_PORT=8080 python flask_app.pyIf the dashboard shows no files, the orchestrator hasn't run yet. Either:
- Restart the Flask app (it auto-runs the orchestrator)
- Call the
/api/run-orchestratorendpoint - Manually run
python aurora_orchestrator.py
Ensure aurora_orchestrator.py is in the same directory as flask_app.py.
[Same as parent project]

