Skip to content

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

Merged
justfinethanku merged 3 commits into
NateBJones-Projects:mainfrom
tswicegood:contrib/tswicegood/dashboard-cloudflare-deploy
Jun 8, 2026
Merged

[dashboards] open-brain-dashboard-next: add Cloudflare Workers deploy support#248
justfinethanku merged 3 commits into
NateBJones-Projects:mainfrom
tswicegood:contrib/tswicegood/dashboard-cloudflare-deploy

Conversation

@tswicegood

@tswicegood tswicegood commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

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 2 commits April 27, 2026 10:05
…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
@alanshurafa alanshurafa added area: dashboard Review area: dashboard/frontend review: ready-for-maintainer Community reviewer recommends maintainer review alan-reviewed Reviewed by Alan Shurafa in Community Reviewer role labels May 20, 2026
@alanshurafa

Copy link
Copy Markdown
Collaborator

Thanks for the contribution. The diff stats (+10166/-4459) are almost entirely package-lock.json regeneration — the actual change is small and additive: open-next.config.ts, wrangler.jsonc, package.json deps, and .gitignore / README updates to support deploying the dashboard to Cloudflare Workers via OpenNext.

It is an additive deploy-target option (the dashboard's existing Vercel path is unaffected), and it pairs with #239 for the all-Cloudflare story, though it can stand alone against any open-brain-rest-shaped backend. Two things for the maintainer: it pulls in the OpenNext toolchain as new dependencies, and Cloudflare is a deploy target beyond the Vercel/Netlify the dashboards category currently names — worth a conscious call. Recommend maintainer review.

— Alan (community reviewer; non-binding)

@justfinethanku justfinethanku left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer review: additive Cloudflare Workers/OpenNext deploy target for the existing dashboard contribution. README credit convention is already present on the dashboard README; branch updated against current main and fresh checks pass.

@justfinethanku justfinethanku merged commit 351da6c into NateBJones-Projects:main Jun 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alan-reviewed Reviewed by Alan Shurafa in Community Reviewer role area: dashboard Review area: dashboard/frontend dashboard Contribution: frontend template review: ready-for-maintainer Community reviewer recommends maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants