Skip to Content
BackendCurrent State

Current State

Snapshot

As of 2026-03-30, the backend is a FastAPI sidecar with in-process background job execution. It exposes the active local workflows for assets, conversion authoring, saved configs, conversions, jobs, outputs, tags, and dashboard rollups.

All durable state lives in the hephaes workspace (workspace.db) plus local filesystem storage. The backend no longer has episode, visualization, output-action, or SQLAlchemy/ORM surfaces.

API Surface

Health

  • GET /health

Assets

MethodRouteDescription
POST/assets/registerRegister asset by file path
POST/assets/uploadUpload a raw file into local backend storage and register it
POST/assets/register-dialogOpen the native file dialog and register selected files
POST/assets/scan-directoryScan a directory for supported asset files
POST/assets/{asset_id}/indexTrigger indexing for one asset
POST/assets/{asset_id}/tagsAttach a tag to an asset
DELETE/assets/{asset_id}/tags/{tag_id}Detach a tag from an asset
POST/assets/reindex-allReindex pending or failed assets
GET/assetsList assets with search, tag, type, status, duration, and start-time filters
GET/assets/{asset_id}Asset detail with indexed metadata, tags, related jobs, and recent conversions

Tags

MethodRouteDescription
GET/tagsList tag catalog with asset counts
POST/tagsCreate a tag

Conversions

MethodRouteDescription
POST/conversionsCreate and execute a conversion from a saved config or spec
GET/conversionsList conversion runs with representation-policy filters
GET/conversions/{conversion_id}Conversion detail with linked job and output files
GET/conversions/capabilitiesCapability metadata for authoring and output contracts
POST/conversions/inspectInspect asset topics through hephaes
POST/conversions/draftGenerate a draft conversion spec and persist draft history
POST/conversions/previewPreview sample conversion rows for a spec

Conversion Configs

MethodRouteDescription
GET/conversion-configsList saved configs
POST/conversion-configsCreate a saved config
GET/conversion-configs/{config_id}Config detail with revisions and migration notes
PATCH/conversion-configs/{config_id}Update a saved config
POST/conversion-configs/{config_id}/duplicateDuplicate a saved config

Saved configs persist spec documents with immutable revision history. Configs migrate on load through hephaes and surface upgrade notes in responses.

Jobs

MethodRouteDescription
GET/jobsList jobs with type/status filters
GET/jobs/{job_id}Job detail with effective representation policy when available

Job types surfaced today: index, convert. Statuses: queued, running, succeeded, failed.

Outputs

MethodRouteDescription
GET/outputsList outputs with filters for format, role, asset, conversion, and availability
GET/outputs/{output_id}Output detail with manifest and artifact metadata
GET/outputs/{output_id}/contentServe output file content directly when available

Output roles include datasets, manifests, reports, and other sidecars.

Dashboard

MethodRouteDescription
GET/dashboard/summaryAggregate counts and freshness timestamps
GET/dashboard/trendsPer-day trend buckets for a 1-90 day window
GET/dashboard/blockersFailed or missing state counts

Persistence Model

The backend has no separate database layer of its own.

It bootstraps and reads a package-owned workspace that stores:

  • registered assets and indexed metadata
  • tags and asset/tag associations
  • durable jobs and conversion runs
  • saved configs and immutable config revisions
  • draft heads and draft revisions
  • output artifacts

Filesystem storage is split between workspace data, staged uploads, generated outputs, and logs.

Tests

17 test modules under tests/ using pytest with httpx cover:

  • asset registration, upload, listing, filtering, and indexing
  • conversion authoring APIs (inspect, draft, preview)
  • saved config persistence, duplication, and migration notes
  • conversion execution and representation-policy handling
  • output artifact listing, detail, content serving, and missing-file refresh behavior
  • dashboard summary, trends, and blockers
  • tags, configuration, sidecar bootstrap, and workspace bootstrapping

Known Limitations

  • conversions run on an in-process background runner; there is no external worker queue, cancellation API, or retry API
  • no replay, visualization, or output-action endpoints are part of the active backend surface
  • some asset list filters such as file size and registration date are still applied client-side in the frontend
  • the frontend type layer still carries a few legacy enum and field names even though the routed backend surface is slimmer
Last updated on