OpenWork Local Build Setup (Archived In This Monorepo)

OpenWork is no longer built or versioned from this repo. The source of truth now lives in the separate brainforge-work repository, and Platform’s /openwork route is a hosted handoff to https://work.brainforge.ai by default.


Current state

  • This repo does not own apps/openwork anymore.
  • Root helper scripts for local OpenWork builds were removed.
  • Platform no longer builds embedded OpenWork web assets.
  • If you need to run or ship OpenWork itself, work from brainforge-work instead.

What still matters here

  • NEXT_PUBLIC_OPENWORK_ROLLOUT still controls whether Platform exposes the /openwork entry point.
  • OPENWORK_LABS_URL or NEXT_PUBLIC_OPENWORK_LABS_URL can still override the hosted target URL.
  • Never commit secrets to this repository.

Validation in this repo

Run the scoped Platform check from the repo root:

npm run openwork:ci:integration

The smoke check validates the integration points that still exist in Platform:

  • /openwork redirects to the hosted Work deployment
  • Hosted Work performs its own login flow after redirect; Platform does not bootstrap a hosted Work session
  • Sidebar still links to /openwork
  • Middleware still preserves public /openwork/about access

For OpenWork builds, desktop packaging, Railway deploys, or runtime debugging, use the docs in brainforge-work.


Platform rollout flag (NEXT_PUBLIC_OPENWORK_ROLLOUT)

Use one flag to control OpenWork visibility and access in Platform:

  • NEXT_PUBLIC_OPENWORK_ROLLOUT
  • Accepted values: enabled, disabled (case-insensitive)
  • Missing/empty/invalid values are treated as disabled (fail-safe default)

What is gated

  • Sidebar “OpenWork” menu item
  • /openwork route
  • /openwork/about route (including middleware public-route exception)

Enable rollout

  1. Set NEXT_PUBLIC_OPENWORK_ROLLOUT=enabled in the target environment.
  2. Deploy/restart Platform so the runtime reads the updated env.
  3. Verify:
    • “OpenWork” appears in the sidebar
    • /openwork is reachable for authenticated users
    • /openwork/about is reachable

Roll back rollout

  1. Set NEXT_PUBLIC_OPENWORK_ROLLOUT=disabled (or remove the variable).
  2. Deploy/restart Platform.
  3. Verify:
    • “OpenWork” no longer appears in the sidebar
    • /openwork and /openwork/about are not accessible