Web-based GUI for Cogniflow with FastAPI backend and React frontend
Project description
CogniFlow Web
cf_web is the web application package for CogniFlow. It provides:
- a FastAPI backend (
src/cf_web) exposing ontology/pipeline APIs - a React + TypeScript frontend (
frontend) for ontology exploration and pipeline editing - a CLI entrypoint (
cogniflow-web) to launch the app
Published distribution name:
pip install cf-web
Installed launcher surface:
cogniflow-web
The backend reads semantics through cf_ontology and its DuckDB quads stores.
Architecture
- Backend framework: FastAPI + Uvicorn
- Frontend framework: React + Vite
- Semantics source:
cf_ontology.OntologyManager(quads-backed) - Service split:
ontology_explorer_service.pyfor ontology explorer payloadspipeline_creator_service.pyfor step DTOs used by the editorpipeline_service.pyfor pipeline list/load/save/validate operations
Install
From repository root (recommended in a virtual environment):
python -m pip install -e "sandcastle/cf_web[test]"
Install with pipeline runtime support:
python -m pip install -e "sandcastle/cf_web[test,pipeline]"
If you want frontend production assets served by FastAPI, build the frontend first:
.\scripts\build_cf_web_frontend.ps1
Run
Option 1: direct app launcher
cogniflow-web
Disable browser auto-open:
cogniflow-web --no-browser
Option 2: unified CLI
cf web start
or
cf web start --no-browser
Backend API
Key routes:
GET /api/healthGET /api/ontology/graphGET /api/ontology/datasetGET /api/ontology/dashboardGET /api/ontology/stepsGET /api/ontology/steps/{step_id}GET /api/pipelines/GET /api/pipelines/{pipeline_id}?rev={n}POST /api/pipelines/savePOST /api/pipelines/validate
Configuration
cf_web reads these environment variables:
CF_WEB_HOST(default:127.0.0.1)CF_WEB_PORT(default:8000)CF_WEB_RELOAD(1enables reload, default:0)CF_WEB_DEBUG(1enables debug flag, default:0)CF_WORKSPACE_DIR(default:~/.cogniflow/workspace)CF_SEMANTICS_DIR(default:<workspace>/semantics)
By default the launcher sets:
CF_ENABLE_STEP_PACKAGES=1
so installed step packages are ingested/discovered for UI usage.
Development Notes
- Frontend source of truth is under
frontend/src. - Built frontend files are emitted to
src/cf_web/staticby Vite. - The publish workflow packages the checked-in
src/cf_web/staticbundle and does not run a frontend build step. - Backend services use a shared
OntologyManagerprovider (manager_provider.py) to avoid repeated manager instantiation.
Publishing
cf_web is published with the dedicated Windows workflow:
- Workflow:
.github/workflows/cf_web_windows_publish.yml - Package directory:
sandcastle/cf_web - Published distribution:
cf-web - PyPI tag:
cf-web-v<version> - TestPyPI tag:
cf-web-v<version>-test
Local preflight:
powershell -ExecutionPolicy Bypass -File scripts/mimic_windows_python_publish_workflow.ps1 `
-WorkflowFile .github/workflows/cf_web_windows_publish.yml `
-PackageDir sandcastle/cf_web `
-PythonExe py `
-PythonVersion 3.14
Queue a dry-run dispatch:
powershell -ExecutionPolicy Bypass -File scripts/queue_windows_python_publish_workflow.ps1 `
-WorkflowFile .github/workflows/cf_web_windows_publish.yml `
-PackageDir sandcastle/cf_web `
-PublishTarget testpypi `
-Ref main `
-RequireLocalPass `
-DryRun
Troubleshooting
GET /favicon.ico 404: ensure favicon exists insrc/cf_web/static/favicon.icoand frontend was rebuilt.- App opens but says frontend build missing: run
.\scripts\build_cf_web_frontend.ps1. - No steps visible in UI: ensure step packages are installed and
CF_ENABLE_STEP_PACKAGES=1(default via launcher).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cf_web-0.2.3.tar.gz.
File metadata
- Download URL: cf_web-0.2.3.tar.gz
- Upload date:
- Size: 131.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbcc5d84a8dfb82020008ecae6b6031eacbc2c89e193a38bcd3811b34221d039
|
|
| MD5 |
b0445c3fd7c9823cc3adc3594e2c4ace
|
|
| BLAKE2b-256 |
93a1470a1219813d8ffdbe65e770077007616953bcbcf1050738b1c48cc2cbb0
|
File details
Details for the file cf_web-0.2.3-py3-none-any.whl.
File metadata
- Download URL: cf_web-0.2.3-py3-none-any.whl
- Upload date:
- Size: 135.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2efe1f277d348659f832a7f76ba0c7bb55cdc3bcc34329ba0e705334e904d633
|
|
| MD5 |
103749b4826e13c254df2c318a7f6670
|
|
| BLAKE2b-256 |
c9bcdd41d07d0d144676a57619ad835ebd6b32bab3a0256a6da6c10b61f777a6
|