create-modern-monorepo
v0.0.7
Published
Scaffold a batteries-included fullstack monorepo — a CRUD **web** app (TanStack Start), **iOS** app (Expo), shared **shadcn/ui** design system, and a realtime **Convex** backend — with one command.
Readme
create-modern-monorepo
Scaffold a batteries-included fullstack monorepo — a CRUD web app (TanStack Start), iOS app (Expo), shared shadcn/ui design system, and a realtime Convex backend — with one command.
bun create modern-monorepo my-app
cd my-app
bun devbun dev runs the web app at http://localhost:3000 and builds + launches the iOS app in
the Simulator. That's it — no accounts required to start (Convex runs as an anonymous local
deployment).
What you answer
Just the project name (taken from the positional argument, or prompted if omitted). Everything else is derived:
| Input | Derives |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| my-app (slug) | directory, root package.json name, .code-workspace, mobile slug/scheme, display name (My App), bundle id (com.myapp, hyphens stripped for Android) |
You're also asked (optionally) for a Resend API key so email sign-in works out of the box — get one free at https://resend.com/api-keys, or press Enter to skip and add it later with:
cd packages/backend && bunx convex env set AUTH_RESEND_KEY <your-key>What it does
- Copies a bundled snapshot of the monorepo template into
./my-app. - Rewrites every identity value: the distinctive tokens (
Tasklit,fullstack-monorepo-template,com.aabuhijleh.mobile) via scoped text replacement, andapp.json'sname/slug/scheme/ bundle id via structured JSON edits. Internal conventions (@workspace/*scope,web/mobilepackage names) are intentionally left intact. git init+ an initial commit.- Runs
setup.sh --no-prebuild: installs deps, writes env files, and provisions Convex (anonymous local deployment + auth signing keys). The iOS native build is deferred to the firstbun dev(whichexpo run:iosperforms automatically).
Pass --skip-setup to scaffold the files only and run ./setup.sh yourself.
Requirements
- Bun
- macOS with Xcode + a Simulator (for the iOS app — see the generated project's README)
Maintainers — publishing
The CLI bundles a template/ directory generated from the repo root at pack time:
bun run build:templatesnapshots the repo (viagit ls-files, so ignored/generated/secret files are excluded) intotemplate/, renaming tracked.gitignore→gitignore(npm strips.gitignorefrom tarballs; the CLI restores it on scaffold) and excluding the scaffolder package itself.prepackrunsbuild:templateautomatically, so:
cd packages/create-modern-monorepo
bun publish # runs prepack -> build:template, then publishestemplate/ is gitignored; an .npmignore (present, intentionally empty of patterns) ensures it
still ships in the tarball, scoped by the files allowlist (src + template).
