[dashboards] open-brain-dashboard-next: add Cloudflare Workers deploy support#248
Open
tswicegood wants to merge 3 commits intoNateBJones-Projects:mainfrom
Open
Conversation
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>
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution Type
/dashboards)Note
Companion PR: #239 — the
open-brain-restCloudflare Worker. Together these two PRs deliver the all-Cloudflare deploy story: the REST gateway as a Worker, this dashboard as another Worker, sharing the sameMCP_ACCESS_KEY. Either ships independently — the Worker can back a Vercel-hosted dashboard, and this dashboard works with anyopen-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/cloudflareadapter requiresnext>=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/cloudflareadapter 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 theopen-brain-restWorker (#239).The older
@cloudflare/next-on-pagesadapter 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/cloudflareandwrangleras dev depsopen-next.config.tsandwrangler.jsonc— the two config files OpenNext needs at the project root. Worker name defaults toob-dashboard; deployers can rename inwrangler.jsoncREADME.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 forNEXT_PUBLIC_API_URL(build-time, baked into bundle) vs.SESSION_SECRET(runtime, set viawrangler secret put).gitignore: exclude.open-next/and.wrangler/build artifactsTested 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
wranglerCLI authenticated (wrangler login)open-brain-restREST API gateway, e.g. the Cloudflare Worker from [integrations] open-brain-rest — Cloudflare Worker REST gateway for the Next.js dashboard #239Checklist