create-signet-app
v0.1.0
Published
Scaffold a Vite + React + Tailwind app wired to Signet.
Readme
create-signet-app
Scaffold a Vite + React 19 + TypeScript + Tailwind v4 app wired to
@nimit9/signet-tokens, @nimit9/signet-ui and @nimit9/signet-lib.
bun run packages/create-signet-app/src/index.ts apps/my-app --theme cinematic
cd apps/my-app && bun install && bun dev--theme takes editorial or cinematic (default editorial).
Why
The audit found this exact setup rebuilt by hand 13 times across 23 products, and the five-package eslint config copied as a block into exactly 8 of 23 repos — the identical count for all five packages is the signature of copy-paste, not configuration.
What you get
dev/build/preview/lint/typecheck— the script names already used across the existing repos, so muscle memory carries overtsconfig.jsonwith app/node project references, strict, path alias@/*- eslint flat config, fixed (see below)
src/app.cssimporting the chosen thememain.tsxwithThemeProvider, aQueryClienton Signet defaults, and a single-redirect 401 handlerindex.htmlwith a blocking script that applies the stored theme before first paint — React mounts too late, and without it there is a visible flashsrc/lib/api.tswith a configuredcreateApiClient
Two bugs this fixes in the copied setup
import.meta.env did not typecheck. The copied tsconfig.app.json omits
"types": ["vite/client"], so tsc -b fails on any use of an env var.
The eslint config is broken against current versions. The config in the
existing repos uses reactHooks.configs.flat.recommended, which was removed in
eslint-plugin-react-hooks 5.2. Installing fresh gives:
TypeError: Cannot read properties of undefined (reading 'recommended')The template uses reactHooks.configs["recommended-latest"]. Existing repos
only still work because their lockfiles pin older versions — copying their
config into anything new produces a crash.
Test
bun run test scaffolds a real app, installs, builds and lints it, then asserts
the chosen theme reached the production CSS bundle (.text-sm{font-size:1rem}
and .rounded-lg{border-radius:.1875rem} for cinematic, not editorial's
0.8125rem / .75rem). Both bugs above were caught by that test on its first
run.
Limitation
Dependencies are declared workspace:*, so a scaffolded app must live inside
the Signet monorepo (apps/*). Publishing the packages to a registry would lift
that; until then, scaffold into apps/.
