WorkflowHub Platform is the Phase 1 implementation workspace for the public WorkflowHub registry.
It is no longer treated as a local-only workflow skill package. This repository is where the public platform layer starts:
- workflow discovery
- workflow detail pages
- publishing flow design
- install flow design
- platform schema and data model
- publisher access protection
- deployment and health-check foundations
The repository now includes:
- platform planning docs
- a Phase 1 web skeleton under
apps/web - shared workflow listing types under
packages/workflow-schema - a registry access layer in
apps/web/lib/registry.ts - API routes for workflows, tags, and author profiles under
apps/web/app/api - install APIs and a minimal local CLI for install / list / update flows
- publisher session protection for mutating actions
- GitHub OAuth support for publisher identity
- persistent audit logs for auth and workflow mutations
- health checks and container deploy files
- security headers, robots, sitemap, and legal placeholder pages
- CI workflow for typecheck and build
- workflowhub_prd.md
- workflowhub_technical_spec.md
- workflowhub_information_architecture.md
- workflowhub_database_schema.md
- DEPLOYMENT.md
- SECURITY.md
- DEPLOY_CHECKLIST.md
Phase 1 is the public registry MVP, not a cloud execution engine.
The first implementation should focus on:
- homepage
- discover/search
- workflow detail page
- publish flow shell
- author profile page
- platform data model
- homepage backed by registry helper functions
- discover page with query-string search and filtering
- workflow detail page wired to registry lookup
- author profile page wired to registry lookup
- publish page with a working MVP form and workflow creation API
- API routes for:
GET /api/workflowsGET /api/workflows/[slug]GET /api/tagsGET /api/users/[username]
GET /api/healthGET /api/readyGET /api/versionGET /api/auditGET /api/publisher-sessionPOST /api/workflowsPOST /api/publisher-sessionPUT /api/workflows/[slug]PATCH /api/workflows/[slug]DELETE /api/workflows/[slug]GET /api/install/[slug]GET /api/install/[slug]/[version]POST /api/install/[slug]/[version]
- a minimal CLI:
workflowhub install <slug>workflowhub inspect <slug>workflowhub listworkflowhub remove <slug>workflowhub update <slug>workflowhub update --all
The web app lives in apps/web.
Suggested local commands after installing dependencies:
npm install
docker compose up -d postgres
npm run db:generate
npm run db:migrate
npm run db:seed
npm run devCopy .env.example to .env before running or deploying.
Important variables:
DATABASE_URLWORKFLOWHUB_BASE_URLWORKFLOWHUB_PUBLISH_TOKENWORKFLOWHUB_SESSION_SECRETWORKFLOWHUB_SEED_ON_BOOTGITHUB_CLIENT_IDGITHUB_CLIENT_SECRETWORKFLOWHUB_SKIP_DB_DURING_BUILDWORKFLOWHUB_APP_VERSIONWORKFLOWHUB_RELEASE_SHAWORKFLOWHUB_RATE_LIMIT_STOREWORKFLOWHUB_ERROR_WEBHOOK_URL
Publisher access modes:
- if
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETare set, WorkflowHub uses GitHub sign-in for publisher access - otherwise, if
WORKFLOWHUB_PUBLISH_TOKENis set, WorkflowHub uses token-based publisher access - otherwise, publisher mutations are open
The publish page and publisher dashboard automatically reflect the configured auth mode.
This repo now includes:
Dockerfile.dockerignoredocker-compose.ymldeploy/docker-compose.staging.ymldeploy/docker-compose.production.ymldeploy/Caddyfile.github/workflows/docker-publish.ymlrelease/RELEASE.mdrelease/workflowhub.service.examplerelease/nginx.workflowhub.conf.examplebin/docker-start.shbin/check-env.mjsprisma.config.ts
Quick start:
docker compose up --buildThe deployment path now targets Postgres by default.
The container boot path runs prisma migrate deploy automatically before starting the web app.
The container also validates required environment variables before boot.
For a first demo deployment, you can set WORKFLOWHUB_SEED_ON_BOOT=true.
The build script now sets WORKFLOWHUB_SKIP_DB_DURING_BUILD=true so CI and image builds do not require a live database connection.
Health endpoint:
curl http://127.0.0.1:3001/api/healthReadiness endpoint:
curl http://127.0.0.1:3001/api/readyVersion endpoint:
curl http://127.0.0.1:3001/api/versionRecent audit events for operators:
curl http://127.0.0.1:3001/api/auditError reporting:
- if
WORKFLOWHUB_ERROR_WEBHOOK_URLis configured, server-side failures are mirrored to that external webhook
Rate limiting:
WORKFLOWHUB_RATE_LIMIT_STORE=databaseuses Postgres-backed rate limitingWORKFLOWHUB_RATE_LIMIT_STORE=memoryfalls back to process memory for local development
Container publishing:
- a GHCR image publish workflow now lives in
.github/workflows/docker-publish.yml
Run the CLI directly from this repo:
npm run cli -- install pr-review-risk-first --base-url http://127.0.0.1:3001
npm run cli -- inspect pr-review-risk-first --base-url http://127.0.0.1:3001
npm run cli -- list
npm run cli -- remove pr-review-risk-first
npm run cli -- update --all --base-url http://127.0.0.1:3001Default install location:
$WORKFLOWHUB_INSTALL_DIR- otherwise
$CODEX_HOME/workflowhub/workflows - otherwise
~/.workflowhub/workflows
Each install writes:
<slug>.jsoninto the workflow directory- manifest / README / receipt files under
.workflowhub/installs/<slug>/
The root scripts now start the app from apps/web, which avoids the .next asset resolution problems we hit when using next ... apps/web from the repository root.
- The registry now reads through Prisma-backed helpers in
apps/web/lib/registry.ts. - Local development and deployment now target Postgres via
prisma/schema.prisma. - The current setup is suitable for a lightweight single-instance launch or private beta.
- The publish path now supports GitHub OAuth, token fallback, persistent audit logs, and CI build verification.
- The deployment path now includes startup env validation, a non-root multi-stage Docker image, and explicit readiness checks.
- Requests now carry
X-Request-Id, and health/readiness/version responses expose release metadata for debugging. - The platform now includes a lightweight staging/production deployment pack, database-backed rate limiting, and optional external error-webhook reporting.
- The next production upgrades after this are full third-party monitoring, managed secret storage, and richer multi-tenant moderation workflows.