Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion betterbase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ From the monorepo root:
- `bun install`
- `bun run dev`
- `bun run build`
- `bun run typecheck` (runs `turbo run typecheck --filter '*'`)
- `bun run typecheck` (runs `turbo run typecheck --filter "*"`)

> Note: `templates/base` is not in the root workspace graph (`apps/*`, `packages/*`), so run template checks separately (e.g. `cd templates/base && bun run typecheck`).

Expand All @@ -41,3 +41,14 @@ From `templates/base`:
- `bun run build`
- `bun run start`
- `bun run typecheck`


## CLI Highlights

- `bb auth setup [project-root]` — scaffold BetterAuth tables, middleware, and routes.
- Example: `bun run --cwd packages/cli dev auth setup ../../templates/base`
- `bb generate crud <table-name> [project-root]` — generate CRUD routes for a schema table.
- Example: `bun run --cwd packages/cli dev generate crud users ../../templates/base`

Realtime support is built into the base template via `/ws` and `src/lib/realtime.ts`. Generated CRUD routes broadcast insert/update/delete events to subscribers.
For command details and flags, run `bb --help`, `bb auth --help`, and `bb generate --help`.
175 changes: 175 additions & 0 deletions betterbase/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion betterbase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "turbo run build",
"dev": "turbo run dev --parallel",
"lint": "turbo run lint",
"typecheck": "turbo run typecheck --filter '*'"
"typecheck": "turbo run typecheck --filter \"*\""
},
"devDependencies": {
"turbo": "^2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions betterbase/packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"chalk": "^5.3.0",
"commander": "^12.1.0",
"inquirer": "^10.2.2",
"zod": "^3.23.8",
"typescript": "^5.3.0"
"zod": "^3.23.8"
},
"devDependencies": {
"@types/bun": "^1.3.9"
"@types/bun": "^1.3.9",
"typescript": "^5.8.0"
},
"exports": {
".": "./src/index.ts"
Expand Down
Loading