Skip to content

Run OpenClaw API on Vercel (same origin) + July 30-day content schedule - #15

Merged
jayteemoney merged 8 commits into
mainfrom
feat/openclaw-on-vercel
Jul 9, 2026
Merged

Run OpenClaw API on Vercel (same origin) + July 30-day content schedule#15
jayteemoney merged 8 commits into
mainfrom
feat/openclaw-on-vercel

Conversation

@jayteemoney

Copy link
Copy Markdown
Owner

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:

Route Serves
/api/streams/[id] full enriched stream (status, claimable, progress, formatted amounts)
/api/streams/sender/[address] · /api/streams/recipient/[address] stream ids per address
/api/daos/[admin] registered workspace
/api/blocks/current chain tip
/api/stats north-star counter (streamsCreated via get-stream-nonce), 60s cache

OPENCLAW_API_URL defaults to same origin; the Railway URL is removed from .env.production. The standalone openclaw-service/ stays untouched for local use or future re-hosting.

Verified against mainnet from the production build: /api/streams/1 payload byte-compatible with the old service, sender/recipient lookups, stats (9 streams), 400/404 validation paths, opaque error refs.

⚠️ Post-merge check: if a NEXT_PUBLIC_OPENCLAW_API_URL env var exists in the Vercel dashboard it overrides this code and must be deleted.

July content schedule (commits 7–8)

CONTENT_SCHEDULE.md rewritten clean: a 30-day plan (Mon Jul 13 → Tue Aug 11) implementing the marketing review — weekly Monday metrics 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, 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 build passes (13 static routes + 6 dynamic API routes)
  • All endpoints exercised live against mainnet from next start

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.
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stackstream Ready Ready Preview, Comment Jul 9, 2026 10:08am

@jayteemoney
jayteemoney merged commit e33b499 into main Jul 9, 2026
2 of 4 checks passed
@jayteemoney
jayteemoney deleted the feat/openclaw-on-vercel branch July 9, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant