Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5c45267
Use Bun workspace runner for root typecheck
ZiadKhaled999 Feb 18, 2026
d074f1a
Address follow-up review fixes for Bun pin, migrations, and pagination
ZiadKhaled999 Feb 19, 2026
eae08a2
Align init scaffold users/health handling with template behavior
ZiadKhaled999 Feb 19, 2026
04d459e
Merge pull request #1 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
3462a96
Implement bb migrate preview/production workflow
ZiadKhaled999 Feb 19, 2026
3abe18c
Address review feedback for migrate and scaffold generation
ZiadKhaled999 Feb 19, 2026
7b62198
Merge branch 'main' into codex/verify-and-fix-code-findings-and-nitpi…
ZiadKhaled999 Feb 19, 2026
2a79fad
Merge pull request #2 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
574fbba
Add TypeScript schema scanner for Drizzle schema extraction
ZiadKhaled999 Feb 19, 2026
c2b1a2f
Merge pull request #3 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
4dca006
Add route/context scanners and dev context generation command
ZiadKhaled999 Feb 19, 2026
0c15551
Address review fixes for scanners, dev watch, and pagination
ZiadKhaled999 Feb 19, 2026
6063952
Merge branch 'main' into codex/verify-and-fix-code-findings-and-nitpi…
ZiadKhaled999 Feb 19, 2026
5bd53ce
Merge pull request #4 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
fc5278f
Add bb auth setup command with BetterAuth scaffolding
ZiadKhaled999 Feb 19, 2026
f087f76
Merge branch 'main' into codex/verify-and-fix-code-findings-and-nitpi…
ZiadKhaled999 Feb 19, 2026
d7aa5b0
Merge pull request #5 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
a25d5ce
Add bb generate crud command for typed route scaffolding
ZiadKhaled999 Feb 19, 2026
cde53bc
Merge branch 'main' into codex/verify-and-fix-code-findings-and-nitpi…
ZiadKhaled999 Feb 19, 2026
aca8e8d
Merge pull request #6 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
5f5c40c
Add Bun WebSocket realtime server and CRUD broadcasts
ZiadKhaled999 Feb 19, 2026
2e57e16
Address review findings across auth, realtime, migrate, and tooling
ZiadKhaled999 Feb 19, 2026
0d2856f
Merge branch 'main' into codex/verify-and-fix-code-findings-and-nitpi…
ZiadKhaled999 Feb 19, 2026
5b7d377
Merge pull request #7 from ZiadKhaled999/codex/verify-and-fix-code-fi…
ZiadKhaled999 Feb 19, 2026
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
7 changes: 5 additions & 2 deletions betterbase/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ node_modules
.turbo
dist
.next
*.sqlite3
*.sqlite
*.db
*.tsbuildinfo
.betterbase-context.json

.vscode/
.idea/

.env
.env.*
.env.local
.env.test
!.env.example

*.log
Expand Down
14 changes: 14 additions & 0 deletions betterbase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,25 @@ Initial BetterBase monorepo scaffold with a concrete base template.
- Workspace orchestration: **Turborepo**
- Language: **TypeScript**


## Monorepo Commands

From the monorepo root:

- `bun install`
- `bun run dev`
- `bun run build`
- `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`).

## Base Template Commands

From `templates/base`:

- `bun run dev`
- `bun run db:generate`
- `bun run db:push`
- `bun run build`
- `bun run start`
- `bun run typecheck`
11 changes: 9 additions & 2 deletions betterbase/apps/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
"types": ["bun"]
"types": [
"bun"
]
},
"include": ["src", "test"]
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"test/**/*.ts",
"test/**/*.tsx"
]
Comment on lines +10 to +15
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find all tsconfig files in the repository
fd -e json "tsconfig" --type f

Repository: weroperking/Betterbase

Length of output: 207


🏁 Script executed:

# Read the base tsconfig.json
cat -n betterbase/tsconfig.base.json

# Read the apps/cli/tsconfig.json under review
cat -n betterbase/apps/cli/tsconfig.json

Repository: weroperking/Betterbase

Length of output: 840


Add "jsx" compiler option to the base config.

The "strict": true option is properly set in tsconfig.base.json and correctly inherited. However, since this config already includes .tsx files in the glob patterns (lines 12, 14), a "jsx" compiler option must be explicitly defined. Currently, neither the base config nor this file defines it. Add "jsx": "react" (or the appropriate JSX mode for your setup) to betterbase/tsconfig.base.json to properly handle TypeScript's JSX transformation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@betterbase/apps/cli/tsconfig.json` around lines 10 - 15, Add the "jsx"
compiler option to the base TypeScript config: open tsconfig.base.json and under
"compilerOptions" add "jsx": "react" (or "react-jsx" if using the new JSX
transform) so .tsx files included by the globs are compiled correctly; ensure
the option is placed at the same level as "strict" and saved so this CLI
tsconfig inherits it.

}
4 changes: 2 additions & 2 deletions betterbase/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "betterbase",
"private": true,
"packageManager": "bun@1.1.38",
"packageManager": "bun@1.3.9",
"workspaces": [
"apps/*",
"packages/*"
Expand All @@ -10,7 +10,7 @@
"build": "turbo run build",
"dev": "turbo run dev --parallel",
"lint": "turbo run lint",
"typecheck": "turbo run typecheck"
"typecheck": "turbo run typecheck --filter '*'"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

--filter '*' with POSIX single-quotes breaks on Windows cmd.exe.

On Unix/macOS, the shell strips the single quotes and Turbo receives --filter * correctly. On Windows with cmd.exe (the default shell used by bun run on Windows), single quotes are not quoting characters — Turbo would receive --filter '*' as a literal argument including the quote characters, which would either match nothing or error.

If Windows developer support is a goal, use double-escaped double quotes or the cross-platform cross-env / Bun shell workaround:

💡 Cross-platform fix
-    "typecheck": "turbo run typecheck --filter '*'"
+    "typecheck": "turbo run typecheck --filter \"*\""
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@betterbase/package.json` at line 13, The package.json "typecheck" script uses
POSIX single-quotes which break on Windows (the entry is the "typecheck" npm
script); update the script to use cross-platform quoting or a helper: replace
"--filter '*' " with a Windows-friendly form such as --filter "*" (escaped as
\"*\" inside the JSON string) or switch to a cross-platform wrapper (e.g., use
cross-env or Bun's shell workaround) so Turbo receives --filter * correctly on
both Unix and Windows.

},
"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"
"zod": "^3.23.8",
"typescript": "^5.3.0"
},
"devDependencies": {
"@types/bun": "^1.3.9",
"typescript": "^5.9.3"
"@types/bun": "^1.3.9"
},
"exports": {
".": "./src/index.ts"
Expand Down
21 changes: 10 additions & 11 deletions betterbase/packages/cli/src/build.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
import path from 'node:path';

/**
* Build the CLI as a standalone bundled executable output.
*/
export async function buildStandaloneCli(): Promise<void> {
const moduleDir = import.meta.dir;
const entrypoint = path.resolve(moduleDir, 'index.ts');
const outdir = path.resolve(moduleDir, '../dist');

const result = await Bun.build({
entrypoints: ['./src/index.ts'],
outdir: './dist',
entrypoints: [entrypoint],
outdir,
target: 'bun',
format: 'esm',
minify: false,
sourcemap: 'external',
naming: 'index.js',
banner: '#!/usr/bin/env bun\n',
});

if (!result.success) {
const diagnostics = result.logs.map((log) => (typeof log === 'string' ? log : JSON.stringify(log))).join('\n');
throw new Error(`Build failed with ${result.logs.length} error(s).\n${diagnostics}`);
}

const outputPath = './dist/index.js';
const compiled = await Bun.file(outputPath).text();
await Bun.write(outputPath, `#!/usr/bin/env bun\n${compiled}`);
}

async function main(): Promise<void> {
await buildStandaloneCli();
}

const isEsmMain = typeof import.meta !== 'undefined' && import.meta.main;
const cjs = globalThis as unknown as { require?: { main?: unknown }; module?: unknown };
const isCjsMain = cjs.require?.main !== undefined && cjs.require.main === cjs.module;

if (isEsmMain || isCjsMain) {
if (import.meta.main) {
main().catch((error) => {
console.error('Build failed:', error);
process.exit(1);
Expand Down
Loading