docs(quickstart): document how to verify a fresh Celo Composer app runs, and correct what it generates - #2332
Conversation
…ns, and correct what it generates The page ended at `pnpm dev` with no success signal, never mentioned the wallet environment variable the frontend needs, and described a generated project structure that does not exist. Verified by running `npx @celo/celo-composer@latest create --yes`, `pnpm install` and `pnpm dev` and reading the generated files: - The dev server output in the page is copied from a real run. - `apps/web/.env.template` requires `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID`; `wallet-provider.tsx` falls back to the literal `YOUR_PROJECT_ID`. - The scaffold generates no `packages/` workspace; the documented `packages/ui` and `packages/utils` were wrong. Troubleshooting covers how to read a dev server failure and where to report one, not the specific defects of any single template version — those belong upstream in celo-composer. Also brings the page in line with AGENTS.md: no inflated adjectives, task-named sentence-case headings, `## Resources` as a table, `## Related` closing the page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ead GitBook `celo-composer.gitbook.io/docs/` no longer serves a public site — it redirects to a GitBook admin URL, so a reader lands on an app page instead of documentation. Replaces it with the canonical quickstart in this repo, and corrects the shell snippet above it from a `jsx` fence to `bash`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
palango
left a comment
There was a problem hiding this comment.
This is a clear improvement. Checked against the published 2.4.13 package and celo-composer main, the flags, defaults, prompts, layout, .env.template variables and chains (celo, celoSepolia) all hold. Three things need changing before it goes in:
- The command sequence breaks at the second
cd(inline). - The Verify steps fail on what
@latestinstalls today. npm still serves 2.4.13, whose generatednavbar.tsxrenders<WalletConnectButton />but imports onlyConnectButton, so/returns a 500. v2.4.14 is tagged, but its npm publish failed (celo-composer run 35998862466); the fix is celo-org/celo-composer#473, still open. Please hold this until 2.4.14 is on npm, then re-run create, install, dev and curl against the published package and update the captured output. The "cut a release" step in the PR body is out of date too. - Main adds a fifth template,
-t x402("x402 Paid API"), and rejects unknown-tvalues. Since the page describes the next release, please add it to "Choose a template" and to the--templaterow of the options table (line 105), or say why it's left out.
The rest are nits.
| ## Run the app | ||
|
|
||
| ```bash | ||
| cd my-celo-app |
There was a problem hiding this comment.
After cd my-celo-app/apps/web in "Configure wallet connection", this cd my-celo-app fails with "no such file or directory". Either avoid the first cd (cp my-celo-app/apps/web/.env.template my-celo-app/apps/web/.env) or use cd ../.. here.
| web:dev: ✓ Ready in 3.7s | ||
| ``` | ||
|
|
||
| ## Verify the app runs |
There was a problem hiding this comment.
These steps describe main, not what @latest (2.4.13) generates: every reader following the page today gets a 500 at step 2. See the review summary; let's hold this until 2.4.14 is published.
| ``` | ||
|
|
||
| ## Next Steps | ||
| The root `package.json` also exposes the contract tasks through Turborepo: `pnpm contracts:compile`, `pnpm contracts:test` and `pnpm contracts:deploy:celo-sepolia`. |
There was a problem hiding this comment.
Nit: the contracts:* scripts only exist when a contracts framework is picked (only Hardhat in 2.4.13; main adds them for Foundry). Suggest "If you selected Hardhat or Foundry, the root package.json...".
| cp .env.template .env | ||
| ``` | ||
|
|
||
| Set `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` to a project ID from [Reown](/tooling/libraries-sdks/reown) (formerly WalletConnect). Without it the RainbowKit config falls back to the placeholder string `YOUR_PROJECT_ID` and wallet connection fails. |
There was a problem hiding this comment.
Nit: this covers RainbowKit only. Could you scope it ("With the default RainbowKit provider...") and add a line for thirdweb (NEXT_PUBLIC_THIRDWEB_CLIENT_ID)? Also, does connection fail outright, or only for WalletConnect/mobile wallets? Browser-extension wallets usually connect without a project ID.
| ### Basic web app (default) | ||
|
|
||
| A standard Next.js 14+ web application with modern UI, perfect for most app projects. | ||
| A Next.js 14 web application with the App Router, Tailwind CSS and shadcn/ui components. |
There was a problem hiding this comment.
Nit: celo-org/celo-composer#471 moves the base template to Next 15, so I'd drop the major version here.
|
|
||
| Turborepo runs the `dev` task in each workspace. The web app reports the address it is serving: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Nit: the pinned Next.js 14.2.35 and Ready in 3.7s will drift. Trim this to the - Local: http://localhost:3000 line, which is what the reader compares against, and tag the fence text (same for the fence at line 168).
| ``` | ||
|
|
||
| ## Wallet Providers | ||
| ## Choose a wallet provider |
There was a problem hiding this comment.
Nit: worth one sentence that this choice only applies to the basic template. MiniPay always uses RainbowKit, and the Farcaster and AI chat templates bring their own.
| ### Farcaster miniapp | ||
|
|
||
| A specialized template for building Farcaster Miniapps with Farcaster SDK and Frame development support. | ||
| Adds the Farcaster SDK and Frame development support. |
There was a problem hiding this comment.
Nit: main's template uses @farcaster/miniapp-sdk, so "Adds the Farcaster Mini App SDK" rather than "Frame".
- The wallet-connection step cd'd into apps/web, so the following cd my-celo-app in Run the app failed. Uses a single cp with full relative paths instead, leaving the reader where create put them. - Adds the x402 paid-API template, which main has as a fifth choice and which the CLI rejects if missing from -t. - Scopes the wallet-provider choice: MiniPay always uses RainbowKit, and the Farcaster and AI chat templates bring their own. - Scopes the wallet project ID to RainbowKit, names the thirdweb variable (NEXT_PUBLIC_THIRDWEB_CLIENT_ID, in templates/base .env.template), and corrects the failure mode: only WalletConnect paths break without it, a browser-extension wallet connects over its injected provider. - Scopes contracts:* to having picked a contracts framework. - Farcaster template adds @farcaster/miniapp-sdk, not Frame support. - Drops the pinned Next major and trims the captured dev-server output to the Local line the reader actually compares against; both fences tagged text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
All three blocking points and every nit are in. Keeping this held, as you asked — see the bottom. 1. The
|
palango
left a comment
There was a problem hiding this comment.
Checked 758f3e2. The cd fix, the x402 addition and all the nits are in and correct. As you suggested, I'm leaving my changes-requested in place as the gate: npm still has 2.4.13 as latest and celo-composer#473 is still open. Once 2.4.14 is published and the output is re-captured, I'll approve.
I left two small inline points on the new text.
| ### x402 paid API | ||
|
|
||
| Choose a wallet provider to handle user authentication and transaction signing: | ||
| An API that charges per request with [x402](/build-on-celo/build-with-ai/x402), settled in stablecoins. |
There was a problem hiding this comment.
Nit: on celo-composer main, -t x402 keeps the base web app and adds an apps/api workspace next to it: a Hono seller whose POST /paid answers 402, a buyer script, and X402_SETUP.md (src/plopfile.ts, the x402 addMany step). It settles in USDC on Celo Sepolia by default. Suggest something like "Adds an apps/api workspace with an x402-paid endpoint and a buyer script that pays it in USDC." As written it reads as if the template is only an API.
| - **None**: Skip wallet integration if you want to integrate your own solution | ||
| ## Choose a wallet provider | ||
|
|
||
| The wallet provider handles wallet connection and transaction signing in the frontend. This choice applies to the basic template — MiniPay always uses RainbowKit, and the Farcaster and AI chat templates bring their own setup. |
There was a problem hiding this comment.
Nit: per src/utils/templates.ts on main, ai-chat and x402 have no wallet UI at all (SHIPS_NO_WALLET, provider forced to none), and only farcaster-miniapp ships its own. So "the AI chat template brings its own setup" is wrong, and x402 is missing. Suggest: "MiniPay always uses RainbowKit, the Farcaster template ships its own wallet setup, and the AI chat and x402 templates have no wallet UI."
…ehaviour
Both checked against celo-composer main:
- templates/x402 keeps the base web app and adds apps/api (src/index.ts,
src/buyer.ts, src/x402.ts) plus X402_SETUP.md, so describing it as "an
API" read as though the template were only an API.
- src/utils/templates.ts has SHIPS_NO_WALLET = ["ai-chat", "x402"], so the
AI chat template does not bring its own wallet setup - it has none, and
x402 was missing from the sentence entirely. minipay is separate again:
REQUIRES_WALLET = { minipay: "rainbowkit" }, so it is forced to
RainbowKit rather than shipping its own, which the sentence already had
right.
Still gated on @celo/celo-composer 2.4.14 reaching npm; latest is 2.4.13.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Both inline nits are in. Still gated on the release — nothing to approve yet. x402 template descriptionChecked
Per-template wallet behaviourConfirmed in export const REQUIRES_WALLET: Record<string, string> = { "minipay": "rainbowkit" };
export const SHIPS_OWN_WALLET = ["farcaster-miniapp", "minipay"];
export const SHIPS_NO_WALLET = ["ai-chat", "x402"];So the old sentence was wrong on AI chat — it has no wallet UI rather than its own — and omitted x402. Took your wording verbatim. Worth recording why Still blocked2.4.14 is still not on npm and celo-composer#473 is still open. The captured output stays as-is until there is a published package worth capturing. Agreed your changes-requested is the right gate — leave it in place, and I will re-run |
|
celo-org/celo-composer#473 merged today at 11:34 UTC. That is necessary but not sufficient — 2.4.14 is still not on npm, and merging #473 alone will not put it there. Why the merge did not publish anything
on:
push:
tags:
- 'v*'The merge of #473 was a push to Why re-running the failed job will not work eitherThe A re-run checks out the workflow as it existed at the triggering ref, and at that tag the file still reads: # publish.yml @ v2.4.14 (01b8ac1b)
permissions:
contents: write # <- no id-token: writeversus main today: permissions:
contents: write # create the GitHub Release
id-token: write # npm publish --provenance mints an OIDC tokenSo a re-run of run What actually unblocks thisSomeone on celo-composer needs to re-point the tag at a commit that contains This PR stays gated until |
|
Update: re-cut the What the re-tag achievedThe publish workflow fired (run 36565929904) and got much further: So #473 was a genuine fix — provenance signing works now, which it never has before. The new blocker: the npm credentialThis is an auth failure, not a missing package. npm returns 404 rather than 403 on an unauthorised write so it cannot be used to probe for private packages. An anonymous Why it surfaced only now: the That is outside this repo and outside what I can fix. What this means for this PRStill gated, and the gate has not moved — One thing is better than before: no new release needs cutting. The tag now points at the right commit, so once the credential is restored, re-running the failed run above publishes 2.4.14 with no further changes. I am watching npm and will re-run |
|
Unblocked and re-verified against the published package. 2.4.14 is on npm as of 13:10 UTC today, published by GitHub Actions with provenance attestations. I re-ran the whole flow rather than only the failing part. The 500 is goneNo That was the import/usage mismatch behind the 2.4.13 failure. Every claim on the page, re-checkedThe port-in-use block reproduces verbatim — I started a second instance against an occupied 3000: And the thirdweb sentence I added last round, scaffolded with The two are mutually exclusive per provider, so "set No page changesEvery captured block already matched 2.4.14's output, so the diff is unchanged from what you last reviewed. Only the PR body moved: the residual-risk section claiming steps 2–3 do not hold on the published CLI is obsolete and has been replaced with the verification above. One residual remains, narrowed: step 3 — clicking Connect Wallet and approving — needs a real wallet. I verified the button renders, not the handshake. For the record, on the release
Ready for review. |
palango
left a comment
There was a problem hiding this comment.
Checked c1f184b and the published 2.4.14 tarball. The x402 description and the per-template wallet sentence now match src/utils/templates.ts, 2.4.14 is latest on npm (2026-09-29 13:10 UTC, with provenance), and its navbar imports and renders WalletConnectButton, so the 500 from 2.4.13 is gone. The merge from main brings nothing into the PR beyond the two files. Approving.
Non-blocking nits for a follow-up if you like: ai-chat is copied as a standalone app rather than the apps/web monorepo, so the structure, .env and run sections don't apply to it as written; the contracts default is none, not hardhat, for farcaster-miniapp, ai-chat and x402; and after the cp the WalletConnect variable holds your_project_id_here, so the YOUR_PROJECT_ID fallback only applies when it is unset.
The hole, and the fix
build-on-celo/quickstart.mdxwalked a reader throughnpx @celo/celo-composer@latest createand
pnpm dev, then stopped. No success signal, no mention of the one environment variable thegenerated frontend needs, and a "Generated Project Structure" block describing directories the
CLI does not create.
I ran the flow before writing about it —
create --yes→pnpm install→pnpm dev→curl—and three of the page's claims did not survive contact:
packages/uiandpackages/utils.The scaffold generates no
packages/workspace at all — onlyapps/webandapps/contracts.apps/web/.env.templatedeclaresNEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, andapps/web/src/components/wallet-provider.tsx:18falls back to the literal string
'YOUR_PROJECT_ID'when it is unset. The page never toldanyone to copy the template or where to get an ID.
GET /returns 500 — see the residual section.So the page now: names the reader in the first sentence, adds
## Configure wallet connection,shows the real
pnpm devoutput copied from a run (not a plausible-looking invention), adds## Verify the app runs, adds a## Troubleshootingsection that teaches reading the dev serveroutput, and corrects the structure block. It also takes the AGENTS.md pass the page was overdue: no inflated adjectives
("A powerful CLI tool"), task-named sentence-case headings instead of the banned
Quick Start / Installation / Usage / Next Steps / Tech Stack set,
## Resourcesas thetwo-column table,
## Relatedclosing the page.The trade-off that picked the design: a documented URL that is wrong fails silently, terminal
output the reader can compare against fails loudly. Every code block here is either a command
the reader types or output I captured, and the verify step tells them to open the URL the server
printed rather than the one this page guessed.
Second file, bundled at the maintainer's request rather than split into its own issue:
tooling/dev-environments/index.mdxsent Composer readers tohttps://celo-composer.gitbook.io/docs/, which no longer serves a public site — it now redirectsto a GitBook admin URL (
app.gitbook.com/o/.../sites/...), so the reader lands on an app page.It points at the quickstart in this repo instead, and the shell snippet above it moves from a
jsxfence tobashper AGENTS.md §5. Checked the repo's two other GitBook links(
build-with-ai/mcp/celina.mdx) — both still resolve to real doc sites, left alone.What this does NOT do / residual risk
npx @celo/celo-composer@latestnow resolves to2.4.14 (published 2026-09-29 by GitHub Actions, with provenance attestations). A fresh
scaffold returns HTTP 200 on
/with the Connect Wallet button rendered. The two defectsthat made 2.4.13 return a 500 are gone:
navbar.tsxnow imports and usesWalletConnectButtonconsistently, and no
Module not foundappears in the dev log.a dev server failure and where to report it, which stays true across releases rather than going
stale on the next publish.
## Verify the app runsis still unproven. Clicking Connect Wallet andapproving needs a real wallet; I verified the button renders, not the connection handshake.
@celo/celo-composer@latestas resolved on 2026-09-24, templatebasic, wallet providerrainbowkit, contractshardhat, Next.js 14.2.35. The other three templates(
farcaster-miniapp,minipay,ai-chat), thethirdwebprovider, Foundry, Windows andLinux were not run. Their sections are unchanged in substance from the previous page.
createrun hit a 401 from aregistry configured on this machine, so I installed separately afterwards — i.e. the
--skip-installpath. The auto-install success path is unverified here, which is also why the"Failed to install dependencies" troubleshooting entry exists.
mintlify broken-links+scripts/check-orphans.sh. Link resolution is covered (see mutationcount); accuracy of the sentences rests on the run log, not on CI.
Judgement calls
carried the exact patch for today's 500. Once it turned out both defects are already fixed
upstream and merely unreleased, documenting the workaround would have meant shipping
instructions that go stale on the next
npm publish. What stays — read the dev server output,not the browser; a file you did not edit means report it upstream — holds regardless of version.
thirdwebto one line and did not expand it, per the de-promotion decision in task: De-promote thirdweb — keep one tool page at parity with other tools, drop code examples and recommendations #2255.CELO_RPC_URL, which is declared in.env.templatebut read nowhere underapps/web/src. Documenting it would have implied it doessomething.
with 3000 taken, Next.js silently serves 3001. Reversal cost: one sentence.
docs.jsonis untouched — no page added, moved, renamed ordeleted, so no redirect entry is needed. The one scope addition is the second file above, added
on request rather than filed separately.
Issues
No issue — found while verifying a reader-reported gap, fixed in the same pass. The restructure
children were checked: #2263 is agent-payments scoped and none of its boxes are met here; #2259
is the Build-tab move, which this does not touch.
The upstream defect needs no issue and no PR:
celo-org/celo-composermain already carries bothfixes (
f8c5286,e3df30e, August 2026). What is missing is a release —@lateststillresolves to 2.4.13 from 2025-12-18, 106 commits behind main.
Closes #
Refs #
Stacking / conflicts
Branched off
origin/main(784daebd), independent of my other open PRs. Checked all 9 open PRs(#2331, #2329, #2328, #2327, #2317, #2316, #2304, #2300, #2297) — none touches either
build-on-celo/quickstart.mdxortooling/dev-environments/index.mdx. No shared files, nomerge order needed.
Verification evidence
Repo CI checks, on this head:
Mutation count: 1. Replacing one internal link with a non-existent target turns the link check
red and names this file — so the check does cover this diff:
Reverted;
mint broken-linksgreen again.The claims in the page, through the seam that produces them (a scaffolded project, not a unit):
Published CLI vs. main — which is why the residual section says what it says:
Template diff confirming it is a release gap, not a code gap — same version number, different
contents:
Browser pass on this head (
mint dev, Playwright):/build-on-celo/quickstartand/tooling/dev-environments(the two changedsurfaces), plus every link this diff adds —
/build-on-celo/network-overview(200, "Network Information"),/build-on-celo/build-on-minipay/overview(200, "Build for MiniPay"),/tooling/dev-environments/hardhat(200, "Deploy on Celo with Hardhat"),/build-on-celo/build-with-farcaster(200, "Build with Farcaster"),/tooling/libraries-sdks/reown(200, "Reown (prev. known as WalletConnect)").main— all 20 headings render at the right level and theon-this-page nav lists 13 entries; clicked the in-body Reown link; rendered-HTML check that the
fenced block nested inside a bullet in Troubleshooting survives MDX (17
<pre>blocks;@x402/core,@x402/extensions,async-storage,.env.templateall present in order).fonts.googleapis.com(ERR_BLOCKED_BY_ORB), present on every page of the local preview.No UI/wallet/provider code in this diff and no payment path — no on-chain transaction was run.
Remaining ops steps
35998862466); the fix is ci(publish): grant id-token: write for provenance publish celo-composer#473, still open.
npm view @celo/celo-composer versionreturns2.4.13(published 2025-12-18).create→pnpm install→pnpm dev→curlagainst thepublished package and refresh the captured output in this PR and on the page.
This PR should not merge until both are done. Until then the Verify steps describe what
2.4.14 produces, while
npx @lateststill installs 2.4.13, which returns a 500 on/.Questions for the maintainer
None open. Three were raised and answered before this PR was opened: land now rather than wait on
the Composer release (accepting the window described under residual risk); no separate board issue
for a drive-by fix; and fix the dead GitBook link here rather than split it out.
🤖 Generated with Claude Code