Scaffolding for nosa projects.
create-nosa is a Bun first project generator. It runs an interactive setup flow, copies a selected static template folder, installs dependencies with Bun when the selected template is complete, initializes git, and prints the next commands.
- Bun
>=1.3.0 - Git
Nix users can optionally run nix develop to enter a shell with Bun and Git.
With Bun:
bun create nosa@latestYou can also run the package directly:
bunx --bun create-nosa@latestOther package runners can invoke the CLI too:
npx create nosa
yarn dlx create nosa
pnpm dlx create nosaThe generated templates include bunfig.toml and use Bun by default. A fresh bun.lock is generated during bun install.
? Project name
my-nosa-app
? Select a template
Start
? Select codebase structure
Simple
Vertical
? Select add-ons
[ ] shadcn/ui
[ ] Drizzle + PostgreSQL
[ ] Better Auth
[ ] Google OAuth
All prompts can be skipped by passing flags:
bun create nosa --name my-app --structure simple --addons shadcn,drizzle| Flag | Values | Description |
|---|---|---|
-n, --name |
any folder name | Project name |
-t, --template |
start |
Template |
-s, --structure |
simple, vertical |
Codebase structure |
-a, --addons |
shadcn, drizzle, betterauth, google-oauth (comma-separated) |
Add-ons |
-h, --help |
Show help |
Any omitted flag falls through to the interactive prompt for that field.
Templates live in src/templates. Each supported combination is intended to be a complete static folder that the CLI can copy directly.
Current option status:
- Template: Start
- Structure: Simple and Vertical
- Add-ons: shadcn/ui (includes TanStack Form), Drizzle + PostgreSQL, Better Auth (auto-includes Drizzle), Google OAuth (auto-includes Better Auth and Drizzle), and their supported combinations
Code is grouped by domain rather than by technical layer. Each feature lives in its own directory so you can own it, evolve it, and eventually throw it away.
src/
auth/ # Authentication domain
billing/ # Billing domain
plans/ # Plan management domain
teams/ # Teams and collaboration domain
data/ # Database access
design-system/ # Shared UI primitives
errors/ # App-level error normalization and boundaries
routes/ # Route definitions (required by TanStack Router)
router.tsx # Router configuration
styles.css # Global styles
Each directory owns its components, hooks, server functions, types, and schemas. Add new verticals by creating a directory at src/. Remove a feature by deleting its directory.
data/, design-system/, and errors/ are app-level verticals: shared infrastructure that can grow with the app, not feature verticals like auth/, billing/, or teams/.
Simple templates keep shared error normalization in src/errors.ts. Vertical templates use src/errors/ because error handling can grow into reusable boundary UI, typed app errors, and reporting while staying separate from feature domains.
Lean TanStack Start template which includes:
- Framework: TanStack Start with React 19
- Styling: Tailwind CSS v4
- Tooling: Oxc with
oxlintandoxfmt - Git Hooks:
simple-git-hooksandnano-staged
shadcn/ui adds:
- UI:
shadcn/uiconfiguration - Components: generated
Button,Sonner, and form field components - Forms: TanStack Form with Zod validation
- Utilities:
cn()withclsxandtailwind-merge - Theme: shadcn Tailwind CSS variables and Roboto font setup
TanStack Form is included when shadcn/ui is selected; it is not a separate add-on.
Drizzle + PostgreSQL adds:
- ORM: Drizzle ORM configured for PostgreSQL
- Driver:
pgthroughdrizzle-orm/node-postgres - Schema: starter
userstable insrc/db/schema.ts - Commands:
db:generate,db:migrate,db:push, anddb:studio
Better Auth adds:
- Auth: Better Auth with database-backed session handling and no sign-in method enabled by default
- Integration: TanStack Start handler at
src/routes/api/auth/$.ts - Server functions: session helpers in
src/lib/auth.functions.ts - Drizzle schema: auto-generated auth tables in
src/db/auth.schema.ts - Dependencies:
better-authwithtanstackStartCookiesplugin
Google OAuth adds:
- Provider: Google social sign-in through Better Auth
- Environment:
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET - Example: a dedicated Google OAuth example