How baobabsoluciones/cornflow works
Project type and purpose
• This is a monorepo for “cornflow,” an open-source, optimization-deployment platform.
• It comprises three main deliverables:
a. A server (cornflow-server) exposing a JSON/REST API for problem definitions, solution execution, and result retrieval.
b. A set of Airflow DAGs (cornflow-dags) that orchestrate the execution of optimization problems using different solver libraries.
c. A Python client library and CLI (libs/client) that users integrate into their code or use interactively.
File structure
• Top-level modules:
• cornflow-server/ – the backend monolith (API definitions, ORM models, CLI, migrations, tests)
• cornflow-dags/ – Airflow DAG definitions, per-problem schemas, data, solver wrappers
• libs/client/ – client SDK and command-line tool to consume the server API or trigger DAGs
• docs/ – Sphinx-based documentation, including architecture and deployment guides
• docker-compose*.yml & Github workflows – container orchestration and CI/CD pipelines
• Architectural cues:
• REST endpoints under server/cornflow/endpoints
• Database models under server/cornflow/models + alembic migrations
• JSONSchema definitions in DAG schemas for input/output validation
• Airflow plugins and scripts under airflow_config
README for additional insights
• It stresses JSONSchema-driven, technique-agnostic problem definitions.
• It outlines use cases: local testing, adding new solvers, private server deployment.