Skip to main content

FastAPI REST server + bundled React web UI for ControlBridge

Reason this release was yanked:

deprecated

Project description

controlbridge-api

FastAPI REST server and bundled React web UI for ControlBridge, the open-source GRC tool.

This package is not typically installed directly. The preferred way is via the [gui] extra on the meta-package:

uv tool install "controlbridge[gui]"
# or
pip install "controlbridge[gui]"

Then run:

controlbridge serve
# -> FastAPI + React UI at http://127.0.0.1:8000

What's inside

  • FastAPI app (controlbridge_api.app:app) — REST endpoints mirroring every CLI capability.
  • SPA — React/Vite/shadcn/ui frontend, bundled as static assets inside the wheel under controlbridge_api/static/.
  • SSE streaming — long-running LLM calls (risk generate, explain) stream progress to the browser without blocking.

REST surface

Every endpoint is typed with Pydantic models reused from controlbridge-core. All endpoints bind to 127.0.0.1 by default; --host 0.0.0.0 emits a security warning.

Method Path Purpose
GET /api/health Health probe
GET /api/version ControlBridge version info
GET /api/doctor Diagnostic summary
POST /api/doctor/check-air-gap Air-gap validator
GET /api/config Read controlbridge.yaml
PUT /api/config Write controlbridge.yaml
GET /api/frameworks List all 82 bundled catalogs
GET /api/frameworks/{id} Framework detail
GET /api/frameworks/{id}/controls/{control_id} Single control
POST /api/gap/analyze Run GapAnalyzer, save to gap store
GET /api/gap/reports List saved reports
GET /api/gap/reports/{key} Load a saved report
POST /api/gap/diff Compute diff between two reports
POST /api/risk/generate SSE: per-gap risk statement generation
POST /api/explain/{framework}/{control_id} Plain-English control explanation
POST /api/init/wizard Generate starter YAML files
GET /api/llm-status LLM provider configuration state

Air-gapped mode

Running controlbridge serve --offline wires the air-gap guard into every /api/* call. LLM features gracefully degrade with a pointer to Ollama. See docs/air-gapped.md.

Development

# From the repo root:
uv sync --all-packages
cd packages/controlbridge-ui && npm install && npm run dev  # Vite dev server at :5173
# In another terminal:
controlbridge serve --dev  # FastAPI at :8000 proxies /api/* to itself, / to Vite :5173

License

Apache-2.0 — see LICENSE.

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

controlbridge_api-0.4.1.tar.gz (412.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

controlbridge_api-0.4.1-py3-none-any.whl (422.9 kB view details)

Uploaded Python 3

File details

Details for the file controlbridge_api-0.4.1.tar.gz.

File metadata

  • Download URL: controlbridge_api-0.4.1.tar.gz
  • Upload date:
  • Size: 412.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for controlbridge_api-0.4.1.tar.gz
Algorithm Hash digest
SHA256 47b6cc1d4f9d21ff41b4a559c08bf0b60cb3d3f6be8d53cf0ffc84a3d832684b
MD5 8850beeecf10b1347c0000cde2faeaa2
BLAKE2b-256 386bf8e2db0a76ed4fc235c7800193ff5e4ffe64cd9a3ddfbd4454e1bbc2769f

See more details on using hashes here.

File details

Details for the file controlbridge_api-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for controlbridge_api-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ca86ce272e8b330836b6f6ead06e30d0ab41a7178e020ea823a29c950124b12
MD5 5d90f8a12c9232abd91e7dbb040d3506
BLAKE2b-256 bfb03e2ecf25abb3e7a87378ced1f2b78c30000260efa8299e12312c91213f41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page