Feat/create bsv app scaffolder#262
Open
kjartan221 wants to merge 16 commits into
Open
Conversation
… template projects
…nect. UI path improvements
…egmented controls for backend
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
chore(create-bsv-app): align @types/node with workspace, add lockfile entries Bump @types/node from ^25.9.1 to ^26.0.0 to match the rest of the monorepo (21 sibling packages use ^26.0.0). This lets the workspace lockfile reuse the existing @types/node@26 jest/ts-node graph instead of pulling in a second major version. Regenerate pnpm-lock.yaml so `pnpm install --frozen-lockfile` (used in CI) resolves the new create-bsv-app package: adds the importer entry plus @clack/prompts, @clack/core and sisteransi. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
|
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
Adds a new package,
packages/helpers/create-bsv-app— a CLI that scaffoldsBSV-enabled apps or adds BSV capabilities to an existing project, without the
developer writing key- or transaction-handling code themselves.
The tool delegates base-project creation to official generators (Vite for
React, a lean Express skeleton for the server) and layers in capabilities:
small, role-aware utility files built on the BSV abstraction libs, plus a
generated
AGENTS.mdcontract describing how to use them. A new project runsend-to-end on
npm run devimmediately, with a working wallet connect flow(desktop-first, mobile/relay QR fallback) wired automatically.
Why
Lowers the barrier to starting a BSV app: one command produces a runnable
project with a real wallet flow, instead of hand-wiring auth, contexts, routes,
and server verification. Also gives AI agents a deterministic path via
--file <config.json>.How it works
Every run resolves a single
ProjectConfigand feeds it through one pipeline.Four "doors" produce that config, differing only in how it's gathered:
--frontend,--capabilities, … with--yesto skip prompts--file <config.json>— full config as JSON (best for automation/agents)--ui— local single-use HTML page (127.0.0.1) that scaffolds on GenerateTwo modes:
new(scaffold a fresh project) andadd(add capabilities to anexisting one, inferred from a
bsv-scaffold.jsonmanifest). Every run writesthat manifest so later
addruns re-use the stack.Capabilities included:
wallet-connect(base — connect any BRC-100 wallet),wallet-login(passwordless signed-proof login),signed-requests(per-callrequest authentication).
Scope / impact
packages/helpers/create-bsv-app/**; touches noexisting files. Rebased onto latest
main(no overlap with other work).@clack/prompts), TS + Jest.Testing
pnpm test→ 220 tests, 30 suites, all passingregistry consistency, scaffolding, file placement, and
AGENTS.mdrendering.Notes for reviewers
src/capabilities/+ a registry entry +tests (documented in the package README under "Adding a capability").
client/+server/) produces independent packages, eachwith its own
package.json/lockfile — intentional, so each app deploys alone.