Run OpenClaw API on Vercel (same origin) + July 30-day content schedule - #15
Merged
Conversation
Port the standalone service's read-only Stacks client (get-stream, claimable/streamed/remaining/refundable, sender/recipient lookups, stream nonce, DAO reads, block height), formatting helpers, request validation patterns, and the opaque error-ref handler into a single server-only module. Response shapes stay identical to the Express service so the widget needs no changes.
GET /api/streams/[id] returns the full enriched stream (status label, claimable, streamed, remaining, refundable, progress, formatted amounts); /api/streams/sender/[address] and /api/streams/recipient/[address] return the stream ids an address touches. Input validated up front, 404 JSON when nothing exists.
GET /api/daos/[admin] returns the registered DAO for an admin address with a formatted total-deposited figure, mirroring the standalone service's response.
GET /api/blocks/current proxies the Hiro /v2/info tip height, powering the widget's Block tab.
GET /api/stats serves streamsCreated (the contract's get-stream-nonce), workspacesRegistered, and block height with a 60s cache per warm instance. This is the public counter behind the weekly metrics posts: stackstream.xyz/api/stats.
OPENCLAW_API_URL now defaults to empty string (same origin), so the widget talks to this app's own route handlers with no CORS and no second deployment. The lapsed Railway URL is removed from .env.production; set NEXT_PUBLIC_OPENCLAW_API_URL only to target an external service again.
Replace the June schedule (kept in git history) with a clean 30-day plan, Mon Jul 13 to Tue Aug 11, implementing the marketing review: Monday metrics posts pulled live from stackstream.xyz/api/stats with a public 40-stream target and an honest result day, a CTA link closing every public post, corrected settlement language throughout, the demo video as the Jul 15 anchor with its cuts reused across the month, and all four segments covered pending the team's focus decision. Weekly rhythm: metrics, idea, proof, objection, spotlight, human note, educate.
OUTREACH_MESSAGES_JUL2026.md joins the other local-only operational docs in .gitignore.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Two things, in 8 focused commits:
OpenClaw API migrated off Railway, into this app (commits 1–6)
The Railway subscription lapsed, taking the production backend offline ("Application not found" on every route). Instead of renewing, the API the widget consumes now runs as Next.js route handlers in this same deployment — $0 extra hosting, same-origin (no CORS), one less service to operate:
/api/streams/[id]/api/streams/sender/[address]·/api/streams/recipient/[address]/api/daos/[admin]/api/blocks/current/api/statsget-stream-nonce), 60s cacheOPENCLAW_API_URLdefaults to same origin; the Railway URL is removed from.env.production. The standaloneopenclaw-service/stays untouched for local use or future re-hosting.Verified against mainnet from the production build:
/api/streams/1payload byte-compatible with the old service, sender/recipient lookups, stats (9 streams), 400/404 validation paths, opaque error refs.NEXT_PUBLIC_OPENCLAW_API_URLenv var exists in the Vercel dashboard it overrides this code and must be deleted.July content schedule (commits 7–8)
CONTENT_SCHEDULE.mdrewritten clean: a 30-day plan (Mon Jul 13 → Tue Aug 11) implementing the marketing review — weekly Monday metrics fromstackstream.xyz/api/statswith a public 40-stream target and an honest result day, a CTA link closing every public post, corrected settlement language, the demo video as the Jul 15 anchor, all four segments covered pending the team's focus decision. June content remains in git history.Verify
npm run buildpasses (13 static routes + 6 dynamic API routes)next start