Skip to content

docs(quickstart): document how to verify a fresh Celo Composer app runs, and correct what it generates - #2332

Merged
palango merged 8 commits into
mainfrom
GigaHierz/quickstart-expected-result-reply
Sep 30, 2026
Merged

palango merged 8 commits into
mainfrom
GigaHierz/quickstart-expected-result-reply

Conversation

@GigaHierz

@GigaHierz GigaHierz commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

The hole, and the fix

build-on-celo/quickstart.mdx walked a reader through npx @celo/celo-composer@latest create
and pnpm dev, then stopped. No success signal, no mention of the one environment variable the
generated 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:

  1. The documented structure is wrong. The page showed packages/ui and packages/utils.
    The scaffold generates no packages/ workspace at all — only apps/web and apps/contracts.
  2. The wallet setup was undocumented. apps/web/.env.template declares
    NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, and apps/web/src/components/wallet-provider.tsx:18
    falls back to the literal string 'YOUR_PROJECT_ID' when it is unset. The page never told
    anyone to copy the template or where to get an ID.
  3. A default project does not render. 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 dev output copied from a run (not a plausible-looking invention), adds
## Verify the app runs, adds a ## Troubleshooting section that teaches reading the dev server
output, 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, ## Resources as the
two-column table, ## Related closing 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.mdx sent Composer readers to
https://celo-composer.gitbook.io/docs/, which no longer serves a public site — it now redirects
to 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
jsx fence to bash per 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

  • Verified against the published CLI. npx @celo/celo-composer@latest now resolves to
    2.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 defects
    that made 2.4.13 return a 500 are gone: navbar.tsx now imports and uses WalletConnectButton
    consistently, and no Module not found appears in the dev log.
  • Troubleshooting carries no version-specific workaround, deliberately. It covers how to read
    a dev server failure and where to report it, which stays true across releases rather than going
    stale on the next publish.
  • Step 3 of ## Verify the app runs is still unproven. Clicking Connect Wallet and
    approving needs a real wallet; I verified the button renders, not the connection handshake.
  • One environment, one template. Verified on macOS, Node v20.19.4, pnpm 10.34.5,
    @celo/celo-composer@latest as resolved on 2026-09-24, template basic, wallet provider
    rainbowkit, contracts hardhat, Next.js 14.2.35. The other three templates
    (farcaster-miniapp, minipay, ai-chat), the thirdweb provider, Foundry, Windows and
    Linux were not run. Their sections are unchanged in substance from the previous page.
  • The CLI's own dependency install was not exercised. My create run hit a 401 from a
    registry configured on this machine, so I installed separately afterwards — i.e. the
    --skip-install path. The auto-install success path is unverified here, which is also why the
    "Failed to install dependencies" troubleshooting entry exists.
  • No prose claim on this page is covered by a test, because none can be: repo CI is
    mintlify broken-links + scripts/check-orphans.sh. Link resolution is covered (see mutation
    count); accuracy of the sentences rests on the run log, not on CI.

Judgement calls

  • Troubleshooting covers the durable failure mode, not the current one. The first draft
    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.
  • Kept thirdweb to 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.
  • Documented the wallet project ID only, not CELO_RPC_URL, which is declared in
    .env.template but read nowhere under apps/web/src. Documenting it would have implied it does
    something.
  • Verify step says "open the URL the dev server printed", not "open localhost:3000". Observed:
    with 3000 taken, Next.js silently serves 3001. Reversal cost: one sentence.
  • No product change bundled, and docs.json is untouched — no page added, moved, renamed or
    deleted, 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-composer main already carries both
fixes (f8c5286, e3df30e, August 2026). What is missing is a release — @latest still
resolves 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.mdx or tooling/dev-environments/index.mdx
. No shared files, no
merge order needed.

Verification evidence

Repo CI checks, on this head:

$ mint broken-links
success no broken links found

$ bash scripts/check-orphans.sh
No orphan pages found.

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:

$ perl -i -pe 's{/build-on-celo/network-overview}{/build-on-celo/network-overview-MUTANT}' build-on-celo/quickstart.mdx
$ mint broken-links
found 1 broken links in 1 files

build-on-celo/quickstart.mdx
 ⎿  /build-on-celo/network-overview-MUTANT

Reverted; mint broken-links green again.

The claims in the page, through the seam that produces them (a scaffolded project, not a unit):

$ npx @celo/celo-composer@latest create verify-app --yes
🎉 Your Celo project is ready!

$ ls verify-app/apps          # claim 1: no packages/ workspace exists
contracts  web
$ ls verify-app               # root contents as documented
README.md  apps  package.json  pnpm-workspace.yaml  tsconfig.json  turbo.json

# claim 2: the frontend template declares the wallet project ID, and the code
# falls back to a placeholder when it is unset
$ grep -n WALLETCONNECT verify-app/apps/web/src/components/wallet-provider.tsx
18:      projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || 'YOUR_PROJECT_ID',

$ pnpm dev                    # the block quoted in "Run the app", verbatim
web:dev:   ▲ Next.js 14.2.35
web:dev:   - Local:        http://localhost:3000
web:dev:  ✓ Starting...
web:dev:  ✓ Ready in 3.7s

$ pnpm dev                    # the block quoted in "Port 3000 is already in use"
web:dev:  ⚠ Port 3000 is in use, trying 3001 instead.
web:dev:   - Local:        http://localhost:3001

Published CLI vs. main — which is why the residual section says what it says:

# published @celo/celo-composer@2.4.13, the one `npx ... @latest` installs
$ curl -s -o /dev/null -w '%{http_code}' http://localhost:3000
500
web:dev: Module not found: Can't resolve '@x402/evm/upto/client'
web:dev:  ⨯ ReferenceError: WalletConnectButton is not defined

# CLI built from celo-org/celo-composer main (b1eeba3), same flags
$ node /tmp/celo-composer/dist/index.js create main-app --yes && pnpm install && pnpm dev
$ curl -s -o /dev/null -w '%{http_code}' http://localhost:3000
200
web:dev:  GET / 200 in 9290ms
$ grep -c 'Connect Wallet' h.html
1

Template diff confirming it is a release gap, not a code gap — same version number, different
contents:

$ grep -n connect-button package/templates/base/apps/web/src/components/navbar.tsx.hbs   # npm 2.4.13
15:import { ConnectButton } from "@/components/connect-button"
$ grep -n connect-button templates/base/apps/web/src/components/navbar.tsx.hbs           # main
15:import { WalletConnectButton } from "@/components/connect-button"

Browser pass on this head (mint dev, Playwright):

  • Routes visited: /build-on-celo/quickstart and /tooling/dev-environments (the two changed
    surfaces), 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)").
  • Actions: accessibility snapshot of main — all 20 headings render at the right level and the
    on-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.template all present in order).
  • Console errors: 0 (29 warnings, all pre-existing preview noise).
  • Failed same-origin requests: 0. The only two failures are cross-origin
    fonts.googleapis.com (ERR_BLOCKED_BY_ORB), present on every page of the local preview.
  • Screenshots (desktop 1280 and phone 412×915, full page) attached below.

No UI/wallet/provider code in this diff and no payment path — no on-chain transaction was run.

Remaining ops steps

  • Blocker: get 2.4.14 onto npm. It is tagged, but the publish failed (celo-composer run
    35998862466); the fix is ci(publish): grant id-token: write for provenance publish celo-composer#473, still open. npm view @celo/celo-composer version returns 2.4.13 (published 2025-12-18).
  • Once published: re-run create → pnpm install → pnpm dev → curl against the
    published 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 @latest still 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

GigaHierz and others added 2 commits September 24, 2026 10:34
…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>
@GigaHierz
GigaHierz requested review from a team as code owners September 24, 2026 09:55
@GigaHierz
GigaHierz requested a review from palango September 24, 2026 23:17

@palango palango left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The command sequence breaks at the second cd (inline).
  2. The Verify steps fail on what @latest installs today. npm still serves 2.4.13, whose generated navbar.tsx renders <WalletConnectButton /> but imports only ConnectButton, 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.
  3. Main adds a fifth template, -t x402 ("x402 Paid API"), and rejects unknown -t values. Since the page describes the next release, please add it to "Choose a template" and to the --template row 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-on-celo/quickstart.mdx Outdated
```

## 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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...".

Comment thread build-on-celo/quickstart.mdx Outdated
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-on-celo/quickstart.mdx Outdated
### 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: celo-org/celo-composer#471 moves the base template to Next 15, so I'd drop the major version here.

Comment thread build-on-celo/quickstart.mdx Outdated

Turborepo runs the `dev` task in each workspace. The web app reports the address it is serving:

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-on-celo/quickstart.mdx Outdated
### Farcaster miniapp

A specialized template for building Farcaster Miniapps with Farcaster SDK and Frame development support.
Adds the Farcaster SDK and Frame development support.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: main's template uses @farcaster/miniapp-sdk, so "Adds the Farcaster Mini App SDK" rather than "Frame".

GigaHierz and others added 2 commits September 25, 2026 11:34
- 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>
@GigaHierz

Copy link
Copy Markdown
Contributor Author

All three blocking points and every nit are in. Keeping this held, as you asked — see the bottom.

1. The cd sequence — fixed

You were right that it breaks. Fixed by not cd-ing at all, so the reader stays where create left them and the cd my-celo-app in Run the app still works:

cp my-celo-app/apps/web/.env.template my-celo-app/apps/web/.env

3. The x402 template — added

Confirmed on main: templates/ holds ai, base, contracts, farcaster-miniapp, minipay, wallets, x402. Added as a fifth section under Choose a template and to the --template row. Since the CLI rejects unknown -t values, omitting it would have been an outright error for anyone trying it.

Nits — all applied, two with a correction

  • Farcaster: confirmed @farcaster/miniapp-sdk (templates/base/apps/web/package.json.hbs, "@farcaster/miniapp-sdk": "^0.3.0"). Now "Adds the Farcaster Mini App SDK", no "Frame".
  • Next major: dropped. Note main is still on "next": "^14.0.0" — updated celo sage images #471 hasn't merged — so I dropped the number rather than writing 15, since we don't document unshipped work.
  • contracts:*: now "If you selected Hardhat or Foundry, …".
  • Wallet provider: scoped to the basic template, with MiniPay/Farcaster/AI-chat called out.
  • Captured output: trimmed to the - Local: line and both fences tagged text.
  • Your question about whether connection fails outright — it does not, and the page was wrong. Only WalletConnect paths break without a project ID; a browser-extension wallet connects over its own injected provider. Reworded. Also added NEXT_PUBLIC_THIRDWEB_CLIENT_ID, verified in templates/base/apps/web/.env.template.hbs.

2. Held — and the blocker is worse than "not yet published"

I checked npm directly:

$ curl -s https://registry.npmjs.org/@celo/celo-composer | jq '."dist-tags".latest'
"2.4.13"
last 5 versions: 2.4.6, 2.4.10, 2.4.11, 2.4.12, 2.4.13   (2.4.13 published 2025-12-18)

So 2.4.14 still is not there, and the fix for the failed publish (celo-org/celo-composer#473) is still open. I have not re-run create/install/dev/curl, because running them against 2.4.13 would just reproduce the 500 — the captured output stays as-is until there is a published package worth capturing.

I have removed the stale "cut a release" line from the PR body.

This should not merge until npm view @celo/celo-composer version returns 2.4.14 or later. At that point I will re-run the full flow against the published package, update the captured output, and re-request review. Happy for you to leave the changes-requested in place as the gate rather than approving now.

@palango palango left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-on-celo/quickstart.mdx Outdated
### 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-on-celo/quickstart.mdx Outdated
- **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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

GigaHierz and others added 2 commits September 28, 2026 12:26
…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>
@GigaHierz

Copy link
Copy Markdown
Contributor Author

Both inline nits are in. Still gated on the release — nothing to approve yet.

x402 template description

Checked templates/x402/ on main: it holds X402_SETUP.md.hbs and apps/api (src/index.ts, src/buyer.ts, src/x402.ts), added on top of the base app rather than replacing it. You were right that "An API that charges per request" read as though the template were only an API. Now:

Keeps the basic web app and adds an apps/api workspace with an x402-paid endpoint and a buyer script that pays it in USDC.

Per-template wallet behaviour

Confirmed in src/utils/templates.ts:

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 minipay reads oddly: it is in both REQUIRES_WALLET and SHIPS_OWN_WALLET, and forcedWalletProvider checks REQUIRES_WALLET first, so it resolves to rainbowkit rather than none. The file has a comment making the same point ("minipay is in here and still gets a real provider value"). "MiniPay always uses RainbowKit" is therefore correct, and correct for a non-obvious reason.

Still blocked

$ curl -s https://registry.npmjs.org/@celo/celo-composer | jq -r '."dist-tags".latest'
2.4.13          # published 2025-12-18; last 4 versions are 2.4.10-2.4.13

2.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 create → install → dev → curl and refresh the output the moment it lands.

$ npx mintlify@4.2.920 validate                        -> build validation passed
$ npx mintlify@4.2.920 broken-links --check-redirects  -> no broken links found
$ bash scripts/check-orphans.sh                        -> No orphan pages found

@GigaHierz

Copy link
Copy Markdown
Contributor Author

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.

$ curl -s https://registry.npmjs.org/@celo/celo-composer | jq -r '."dist-tags".latest'
2.4.13

Why the merge did not publish anything

publish.yml triggers on tags only:

on:
  push:
    tags:
      - 'v*'

The merge of #473 was a push to main, so it ran CI and nothing else — there is no Publish to NPM run after it.

Why re-running the failed job will not work either

The v2.4.14 tag points at 01b8ac1b, and the fix commit e8c9f322 is one commit ahead of it:

$ gh api repos/celo-org/celo-composer/compare/01b8ac1b...e8c9f322
status: ahead, ahead_by: 1, behind_by: 0

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: write

versus main today:

permissions:
  contents: write  # create the GitHub Release
  id-token: write  # npm publish --provenance mints an OIDC token

So a re-run of run 35998862466 would fail with the same provenance/OIDC error.

What actually unblocks this

Someone on celo-composer needs to re-point the tag at a commit that contains e8c9f322 — either delete and re-push v2.4.14, or cut v2.4.15. Either one fires publish.yml with the corrected permissions.

This PR stays gated until npm view @celo/celo-composer version returns 2.4.14 or later. Once it does I will re-run create → pnpm install → pnpm dev → curl against the published package and refresh the captured output. Everything else on this PR is already done and green.

@GigaHierz

Copy link
Copy Markdown
Contributor Author

Update: re-cut the v2.4.14 tag onto the commit carrying #473. The provenance problem is fixed; a second, separate problem is now exposed.

What the re-tag achieved

tag v2.4.14: 01b8ac1b -> e8c9f322   (the commit that adds id-token: write)

The publish workflow fired (run 36565929904) and got much further:

npm notice publish Signed provenance statement with source and build information from GitHub Actions
npm notice publish Provenance statement published to transparency log: search.sigstore.dev/?logIndex=2999250812

So #473 was a genuine fix — provenance signing works now, which it never has before.

The new blocker: the npm credential

npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/@celo%2fcelo-composer

This 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 GET on the same path returns 200 and the package is public, so the only thing a PUT can be failing on is the token.

Why it surfaced only now: the NPM_TOKEN secret was last updated 2025-12-18, minutes after 2.4.13 was published by hand. CI has not published since August 2025, so today is the first time that token has ever been used — and it does not work. Most likely expired (npm granular tokens cap at 90 days) or revoked.

That is outside this repo and outside what I can fix.

What this means for this PR

Still gated, and the gate has not moved — npx @celo/celo-composer@latest still resolves to 2.4.13, so re-capturing the output now would document a package nobody can install.

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 create → pnpm install → pnpm dev → curl and refresh the captured output the moment it lands.

@GigaHierz

Copy link
Copy Markdown
Contributor Author

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.

$ npx @celo/celo-composer@latest --version
2.4.14

I re-ran the whole flow rather than only the failing part.

The 500 is gone

$ npx @celo/celo-composer@latest create verify-app --yes
🎉 Your Celo project is ready!

$ pnpm install && pnpm dev
web:dev:   ▲ Next.js 14.2.35
web:dev:   - Local:        http://localhost:3000

$ curl -s -o home.html -w '%{http_code}' http://localhost:3000
200
$ grep -c 'Connect Wallet' home.html
1

No Module not found and no ReferenceError in the dev log. The root cause is visibly fixed in the generated output — navbar.tsx now imports and uses WalletConnectButton:

14:import { WalletConnectButton } from "@/components/connect-button"
59:                  <WalletConnectButton />
94:            <WalletConnectButton />

That was the import/usage mismatch behind the 2.4.13 failure.

Every claim on the page, re-checked

$ ls apps                      -> contracts  web
$ ls -d packages               -> no packages/ workspace   (claim 1 holds)
$ ls                           -> README.md apps package.json pnpm-workspace.yaml tsconfig.json turbo.json

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID  PRESENT
apps/web/src/components/wallet-provider.tsx:18:
  projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || 'YOUR_PROJECT_ID'

The port-in-use block reproduces verbatim — I started a second instance against an occupied 3000:

web:dev:  ⚠ Port 3000 is in use, trying 3001 instead.
web:dev:   - Local:        http://localhost:3001

And the thirdweb sentence I added last round, scaffolded with --wallet-provider thirdweb:

NEXT_PUBLIC_THIRDWEB_CLIENT_ID        PRESENT
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID  MISSING
apps/web/src/lib/client.ts:12: const clientId = process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID;

The two are mutually exclusive per provider, so "set NEXT_PUBLIC_THIRDWEB_CLIENT_ID instead" is precisely right rather than loosely right.

No page changes

Every 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

v2.4.14 was tagged before the workflow fix landed, so I re-pointed the tag at the commit carrying it. That got provenance signing working but exposed a second, unrelated problem: the NPM_TOKEN secret had never been exercised by CI and no longer authenticated. That has been resolved, and 2.4.14 published from Actions rather than a personal account — which also means future releases do not depend on one person's credentials.

Ready for review.

@GigaHierz
GigaHierz requested a review from palango September 29, 2026 13:27

@palango palango left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@palango
palango merged commit 1c8eb57 into main Sep 30, 2026
5 checks passed
@palango
palango deleted the GigaHierz/quickstart-expected-result-reply branch September 30, 2026 08:20
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.

2 participants