Skip to content

[dashboards] open-brain-dashboard-next: add Cloudflare Workers deploy support#248

Open
tswicegood wants to merge 3 commits intoNateBJones-Projects:mainfrom
tswicegood:contrib/tswicegood/dashboard-cloudflare-deploy
Open

[dashboards] open-brain-dashboard-next: add Cloudflare Workers deploy support#248
tswicegood wants to merge 3 commits intoNateBJones-Projects:mainfrom
tswicegood:contrib/tswicegood/dashboard-cloudflare-deploy

Conversation

@tswicegood
Copy link
Copy Markdown

@tswicegood tswicegood commented Apr 27, 2026

Contribution Type

  • Dashboard (/dashboards)

Note

Companion PR: #239 — the open-brain-rest Cloudflare Worker. Together these two PRs deliver the all-Cloudflare deploy story: the REST gateway as a Worker, this dashboard as another Worker, sharing the same MCP_ACCESS_KEY. Either ships independently — the Worker can back a Vercel-hosted dashboard, and this dashboard works with any open-brain-rest-shaped backend.

Note

Stacked on #247. This PR includes the Next 16.2.4 patch bump from #247 as a merge commit, since the @opennextjs/cloudflare adapter requires next>=16.2.3. Reviewing #247 first will collapse the dependency churn here. If #247 lands first, this PR's diff cleans up to just the Cloudflare-specific changes.

What does this do?

Adds the @opennextjs/cloudflare adapter so the dashboard can deploy to Cloudflare Workers, alongside the existing Vercel deploy path. This keeps the whole second-brain stack on a single platform when paired with the open-brain-rest Worker (#239).

The older @cloudflare/next-on-pages adapter caps at Next 15.5.x and doesn't support this dashboard's Next 16, so OpenNext is the only Cloudflare path that works without a major-version downgrade.

This is purely additive. The Vercel deploy path is unchanged.

Changes

  • @opennextjs/cloudflare and wrangler as dev deps
  • open-next.config.ts and wrangler.jsonc — the two config files OpenNext needs at the project root. Worker name defaults to ob-dashboard; deployers can rename in wrangler.jsonc
  • README.md: new "Step 5 (alternative): Deploy to Cloudflare Workers" subsection alongside the existing Vercel one, with the build commands and the build-time vs. runtime distinction for NEXT_PUBLIC_API_URL (build-time, baked into bundle) vs. SESSION_SECRET (runtime, set via wrangler secret put)
  • .gitignore: exclude .open-next/ and .wrangler/ build artifacts

Tested end-to-end

I deployed this against my own Open Brain — Cloudflare Worker for the REST gateway (#239), this dashboard adapter on top, login + Browse + Search + Capture all working through the deployed Worker.

Requirements

Checklist

  • I've read CONTRIBUTING.md
  • No credentials, API keys, or secrets are included
  • I tested this on my own Open Brain instance (deployed live to Cloudflare Workers, exercised core dashboard pages end-to-end)

tswicegood and others added 3 commits April 27, 2026 10:05
Patch bump within Next 16.x (16.2.1 → 16.2.4, plus matching
eslint-config-next). No behavior or API changes — Vercel and any other
Node host continue to deploy unchanged.

This unblocks downstream tooling that requires next>=16.2.3 (e.g. the
@opennextjs/cloudflare adapter) without forcing a major-version
upgrade or a --legacy-peer-deps workaround.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…wicegood/dashboard-cloudflare-deploy

Pulls in the next 16.2.4 patch bump as a prerequisite for the
@opennextjs/cloudflare deploy support that follows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… support

Adds the @opennextjs/cloudflare adapter so the dashboard can deploy to
Cloudflare Workers alongside the open-brain-rest gateway, keeping the
whole second-brain stack on a single platform. The older
@cloudflare/next-on-pages adapter caps at Next 15.5.x and doesn't
support this dashboard's Next 16, so OpenNext is the only path that
works without a major-version downgrade.

Builds on the next 16.2.4 patch bump merged from
contrib/tswicegood/dashboard-next-bump (which clears OpenNext's
next>=16.2.3 peer dep on its own).

Changes:
- @opennextjs/cloudflare and wrangler as dev deps.
- open-next.config.ts and wrangler.jsonc — the two config files
  OpenNext needs at the project root. Worker name defaults to
  ob-dashboard; deployers can rename in wrangler.jsonc.
- README: new "Deploy to Cloudflare Workers" subsection alongside
  the existing Vercel one, including the build-time vs. runtime
  distinction for NEXT_PUBLIC_API_URL vs. SESSION_SECRET (catching
  that was the difference between a working deploy and a half-
  configured one).
- .gitignore: exclude .open-next/ and .wrangler/ build artifacts.

Vercel deploy path is unchanged; this is purely additive.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the dashboard Contribution: frontend template label Apr 27, 2026
@tswicegood tswicegood marked this pull request as ready for review April 27, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Contribution: frontend template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant