[dashboards] open-brain-dashboard-next: add Cloudflare Workers deploy support#248
Conversation
…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>
|
Thanks for the contribution. The diff stats (+10166/-4459) are almost entirely 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 — Alan (community reviewer; non-binding) |
justfinethanku
left a comment
There was a problem hiding this comment.
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.
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