jake da9f8a8b69 refactor: extract package-json builders into @stanza/registry and surface synthesized files in web preview
- Move `mergeInstallFields`, `rootPackageJson`, `appPackageJsonBase`, and `slotPackageJsonBase` out of `codemod-runner.ts` / `init.ts` and into a new `packages/registry/src/package-json.ts` module; all consumers now import from `@stanza/registry` — the CLI no longer hand-rolls inline object literals for workspace roots or app packages, and the bun/npm "read-parse-mutate-write workspaces" dance collapses into the single `rootPackageJson()` call that emits `workspaces` for non-pnpm managers
- Add `synthesizePackageJsons(resolved, resolvedAddons, { name })` which produces a `path → PackageJson` map for every `package.json` the codemod runner would write (root, app, each slot package); `builder-state.functions.ts` calls it and appends the results to `previewFiles` so the web builder tree shows merged deps/scripts as they'll actually appear on disk — previously package.json files were entirely absent from the preview
- Command bar `<pre>` in `project-setup.tsx` and `try-it.tsx` gets `h-8 flex items-center no-scrollbar` so the command text aligns with the copy button and hides the scrollbar gutter; `CopyButton` drops the `className="h-auto!"` override that was fighting the button's own size token
- Builder grid columns gain `min-w-0` to prevent flex children from overflowing their track on narrow viewports
2026-05-21 17:00:28 -04:00
2026-05-20 11:52:53 -04:00
2026-05-20 11:52:53 -04:00
2026-05-20 11:52:53 -04:00

Stanza

Modular monorepo template CLI — shadcn for full-stack TypeScript stacks.

pnpm create stanza my-app

Pick a framework, ORM, database, auth provider, styling — get a clean monorepo with idiomatic code, vendored into your repo. Add modules later with stanza add.

Generated projects keep slot boundaries explicit: auth, db, and orm install into their own internal workspace packages (packages/auth/, packages/db/, named @<your-app>/auth, @<your-app>/db), and your app consumes them via workspace:* deps. Swapping an auth provider replaces the contents of packages/auth/ without touching your app's imports.

What's inside

apps/
  cli/            # @stanza/cli — the CLI binary
  web/            # https://stanza.tools (TanStack Start)
packages/
  registry/       # shared schema, slot/peer/capability resolver
  codemods/       # ts-morph helpers for region-aware patching
  create-stanza/  # `pnpm create stanza` shim
registry/
  modules/        # first-party modules (framework, orm, db, auth, styling)

Status

Work in progress. See CLAUDE.md, TODO.md, and REGISTRY.md for current state.

License

MIT — see LICENSE.

S
Description
🥁 shadcn for infrastructure.
https://stanza.tools
Readme MIT
3.7 MiB
Languages
TypeScript 91.5%
MDX 6.1%
CSS 2.2%
JavaScript 0.2%