Skip to content

Conversation

@AmanVarshney01
Copy link
Owner

@AmanVarshney01 AmanVarshney01 commented Sep 28, 2025

Summary by CodeRabbit

  • New Features

    • Added “Self (Fullstack)” backend option with integrated API/Auth/DB packages.
    • Introduced workspace dependency catalogs for Bun/pnpm to deduplicate versions.
    • Added fullstack Next API routes for tRPC and oRPC.
    • Added progress spinners to Fumadocs and Ultracite setups.
  • Improvements

    • Unified env, deployment, and scripts for fullstack mode; ORM/DB moved to dedicated packages.
    • Enhanced API/auth/examples wiring; updated AI examples to Gemini 2.5 Flash.
  • Documentation

    • New guides for catalogs and fullstack “self” backend, including migration notes.
  • Chores

    • Dependency updates (e.g., yaml, versions), standardized ignores, and new TS/tsdown configs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

Walkthrough

Refactors CLI to support a “self” fullstack backend with package-scoped api/auth/db, reorganizes template management, updates env/deployment/database providers accordingly, and adds workspace cataloging for Bun/pnpm. Removes Next as a backend. Introduces new templates/configs for packages and adjusts prompts, validation, and setup flows.

Changes

Cohort / File(s) Summary
Core template orchestration
apps/cli/src/helpers/core/template-manager.ts
Reorganized backend packaging; added helpers for api/db/auth/server template setup; replaced setupDbOrmTemplates with setupBackendFramework.
Project creation flow & workspace wiring
apps/cli/src/helpers/core/create-project.ts, .../project-config.ts, .../workspace-setup.ts
Added self-backend gating; moved scripts/deps to package-scoped db/auth/api; new workspace dependency setup; skips server for self.
Self backend option: prompts, types, validation
apps/cli/src/prompts/backend.ts, .../prompts/runtime.ts, apps/cli/src/types.ts, apps/cli/src/utils/compatibility-rules.ts, .../config-validation.ts, apps/cli/src/helpers/core/runtime-setup.ts
Added backend "self", removed "next" backend; updated runtime behavior and validation rules for self/fullstack eligibility.
Catalogs (Bun/pnpm)
apps/cli/src/utils/setup-catalogs.ts, apps/cli/src/helpers/core/create-project.ts, apps/cli/package.json, CATALOG_IMPLEMENTATION.md
New workspace catalogs utility; invoked during project setup; added yaml dependency; documented behavior.
Dependencies and utility updates
apps/cli/src/constants.ts, apps/cli/src/utils/add-package-deps.ts, apps/cli/src/utils/template-processor.ts, apps/cli/src/validation.ts
Version map tweaks; add-package-deps applies map + custom overrides; Handlebars and/or now variadic; added payments to core flags.
API setup and addons
apps/cli/src/helpers/core/api-setup.ts, .../addons/examples-setup.ts
Target api package for server deps; self mode adds framework deps; AI/ORM deps routed via api package.
Auth setup and payments
apps/cli/src/helpers/core/auth-setup.ts, .../payments-setup.ts
Better-auth now installed in packages/auth; payments server deps routed to auth package.
DB setup and providers
apps/cli/src/helpers/core/db-setup.ts, apps/cli/src/helpers/database-providers/*
DB deps/install target packages/db; env writes target web when self; signatures updated to pass backend; provider flows updated (Neon, Prisma-Postgres, Turso, PlanetScale, D1, Mongo, Supabase).
Env setup and post-install
apps/cli/src/helpers/core/env-setup.ts, .../post-installation.ts, .../database-providers/*
Centralized helpers for env var names/values; backend-aware env emission across apps/web or apps/server.
Deployment (Alchemy, server/web)
apps/cli/src/helpers/deployment/*
Removed dotenv from several devDeps; server/web deploy helpers add @cloudflare/workers-types to packages when Alchemy; updated function signatures.
Base templates and package scaffolds
apps/cli/templates/base/*, .../backend/server/base/*, .../auth/better-auth/server/base/*, .../db/base/*
Added tsconfig/tsdown templates and gitignores; server base tsconfig/tsdown; minimal package.json.hbs for auth/db; adjusted ignores.
Remove Next as backend
apps/cli/templates/backend/server/next/*
Deleted Next backend templates/configs/routes/tsconfig.
Backend server templates (non-Next)
apps/cli/templates/backend/server/{hono,express,fastify,elysia}/src/index.ts.hbs
Switched imports to project-scoped api/auth; updated AI model to gemini-2.5-flash.
API packages (tRPC/oRPC) server scaffolds
apps/cli/templates/api/{trpc,orpc}/server/*
Added package.json/tsconfig/tsdown scaffolds and router/context updates; removed legacy Next server routes.
Fullstack Next API routes
apps/cli/templates/api/{trpc,orpc}/fullstack/next/...
Added Next route handlers for self fullstack: /api/trpc and /api/rpc.
Frontend ORPC/TRPC client templates
apps/cli/templates/api/*/web/*/utils/*.ts.hbs, .../native/utils/*.ts.hbs
Import AppRouter types from @{{projectName}}/api/routers/index; URLs use /api/* when backend is self.
Auth templates (web/fullstack)
apps/cli/templates/auth/better-auth/web/react/*, .../fullstack/next/..., .../server/base/src/index.ts.hbs
Use @{{projectName}}/auth and @{{projectName}}/db imports; conditional baseURL for self; dashboard differs for self vs non-self.
DB templates (Drizzle/Prisma)
apps/cli/templates/db/drizzle/*/*, apps/cli/templates/db/prisma/*/*
Load dotenv from web/server based on backend; moved schema/migrations paths; included runtime "none" in conditions; removed prisma mongodb db index template.
Docs
FULLSTACK_BACKEND_IMPLEMENTATION.md
Documents self-backend behavior, prompts, validation, structure, and migration.

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant CLI
  participant Workspace
  participant WebApp as apps/web
  participant Server as apps/server
  participant PkgAPI as packages/api
  participant PkgAuth as packages/auth
  participant PkgDB as packages/db

  User->>CLI: createProject (--backend self|other)
  CLI->>Workspace: init base files
  alt backend == self
    CLI->>WebApp: scaffold fullstack app
    CLI->>PkgAPI: scaffold API package
    CLI->>PkgAuth: scaffold Auth package
    CLI->>PkgDB: scaffold DB package
    CLI->>Workspace: setup workspace deps (link web->packages)
  else backend != self/convex
    CLI->>Server: scaffold server app
    CLI->>PkgAPI: scaffold API package
    CLI->>PkgAuth: scaffold Auth package
    CLI->>PkgDB: scaffold DB package
    CLI->>Workspace: setup workspace deps (link server/web->packages)
  end
  CLI->>Workspace: setup catalogs (bun/pnpm)
Loading
sequenceDiagram
  participant CLI
  participant Scanner as CatalogScanner
  participant RootPkg as root package.json / pnpm-workspace.yaml
  participant Packages as workspace packages

  CLI->>Scanner: gather deps from packages
  Scanner-->>CLI: duplicates map (name -> version)
  alt packageManager == bun
    CLI->>RootPkg: write workspaces.catalog entries
  else packageManager == pnpm
    CLI->>RootPkg: write catalog in pnpm-workspace.yaml
  end
  CLI->>Packages: rewrite deps to catalog:<name>
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested reviewers

  • unnoq

Poem

I hop through stacks and split the shelf,
Backend whispers: “Let’s be self.”
Packages three—api, auth, db—
A tidy warren for devs like me.
Catalog seeds keep versions tight,
Carrots compiled with tsdown bright.
Thump-thump: shipped tonight! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title succinctly summarizes the three principal features introduced by this pull request—adding internal packages, integrating a dependency catalog, and enabling fullstack Next.js support—while following the conventional commit style. It avoids vague language and file-specific details, making it clear and actionable for anyone reviewing the repository history. The title aligns with the scope of the most significant changes without overloading on minor edits.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch internal-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AmanVarshney01
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dfc6f1b and 4007e7d.

📒 Files selected for processing (18)
  • apps/cli/src/helpers/core/template-manager.ts (13 hunks)
  • apps/cli/templates/api/orpc/server/base/_gitignore (1 hunks)
  • apps/cli/templates/api/orpc/server/base/package.json.hbs (1 hunks)
  • apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/api/orpc/server/base/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/base/_gitignore (1 hunks)
  • apps/cli/templates/api/trpc/server/base/package.json.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/base/src/routers/index.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/base/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/_gitignore (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/package.json.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/db/base/_gitignore (1 hunks)
  • apps/cli/templates/db/base/package.json.hbs (1 hunks)
  • apps/cli/templates/db/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/db/base/tsdown.config.ts.hbs (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to {**/package.json,**/webpack.config.@(js|ts|mjs|cjs),**/esbuild.config.@(js|ts|mjs|cjs)} : Use `bun build <file>` instead of `webpack` or `esbuild`

Applied to files:

  • apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/tsconfig.json.hbs
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to {**/package.json,**/@(jest|vitest).config.@(js|ts|mjs|cjs)} : Use `bun test` to run tests

Applied to files:

  • apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/tsconfig.json.hbs
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to **/*.{js,jsx,ts,tsx,mjs,cjs} : Use `Bun.$` instead of `execa` for shelling out

Applied to files:

  • apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/tsconfig.json.hbs
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to {**/package.json,**/@(jest|vitest).config.@(js|ts|mjs|cjs)} : Use `bun test` instead of `jest` or `vitest`

Applied to files:

  • apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/tsconfig.json.hbs
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to **/package.json : In package.json scripts, prefer running files with `bun <file>` instead of `node <file>` or `ts-node <file>`

Applied to files:

  • apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/tsconfig.json.hbs
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs
📚 Learning: 2025-08-24T18:00:39.152Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/convex_rules.mdc:0-0
Timestamp: 2025-08-24T18:00:39.152Z
Learning: Applies to package.json : Add types/node to package.json when using Node.js built-in modules

Applied to files:

  • apps/cli/templates/db/base/package.json.hbs

Comment on lines +14 to +16
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the log file ignore pattern.

_.log only ignores a file literally named _.log. Any actual log file such as debug.log or server.log will still be tracked in the generated package. Please switch to a wildcard so the template does what it promises.

-_.log
+*.log
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
logs
*.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
🤖 Prompt for AI Agents
In apps/cli/templates/api/orpc/server/base/_gitignore around lines 14 to 16, the
entry "_.log" only ignores a file literally named "_.log"; update the pattern to
a wildcard (e.g., "*.log") so all log files like debug.log or server.log are
ignored by the generated package; replace the literal with the wildcard and keep
surrounding entries intact.

Comment on lines 6 to 9
"types": [
"bun"
],
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Remove trailing comma to keep generated tsconfig valid JSON.

Same as the other templates: the trailing comma after the "types" array makes the generated tsconfig.json invalid. Drop the comma so the file parses correctly.

 		"types": [
 			"bun"
-		],
+		]
 	}
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"types": [
"bun"
],
}
"types": [
"bun"
]
}
}
🤖 Prompt for AI Agents
In apps/cli/templates/api/orpc/server/base/tsconfig.json.hbs around lines 6 to
9, the JSON emitted includes a trailing comma after the "types" array which
produces invalid JSON; remove the trailing comma character after the closing
bracket so the generated tsconfig.json is valid JSON and matches the other
templates.

Comment on lines +14 to +16
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Correct the log ignore glob.

_.log only ignores a file literally named _.log. Replace it with *.log so generated log files are excluded from git in generated projects.

-_.log
+*.log
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
logs
*.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
🤖 Prompt for AI Agents
In apps/cli/templates/api/trpc/server/base/_gitignore around lines 14 to 16, the
ignore pattern `_.log` only matches a file literally named "_.log"; replace it
with `*.log` so all generated log files are excluded from git. Update that line
to the correct glob `*.log` (leave other entries unchanged) to ensure typical
log filenames are ignored.

Comment on lines 18 to 21
"dependencies": {
"@{{projectName}}/auth": "workspace:*",
"@{{projectName}}/db": "workspace:*"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Only add workspace deps for packages that are actually generated.

packages/api is produced whenever context.api !== "none", but packages/auth and packages/db are created only when the corresponding features are selected. With the current template, choosing TRPC without auth (or without DB/ORM) leaves these workspace:* dependencies dangling, causing pnpm install to halt with ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE.(pnpm.io) Please gate each dependency behind the same feature checks used in setupBackendFramework—e.g. wrap the auth entry in {{#unless (eq auth "none")}} and the DB entry in nested {{#unless (eq database "none")}} / {{#unless (eq orm "none")}} blocks—taking care of commas so the generated JSON stays valid.

🤖 Prompt for AI Agents
In apps/cli/templates/api/trpc/server/base/package.json.hbs around lines 18-21,
the template unconditionally includes workspace dependencies for
@{{projectName}}/auth and @{{projectName}}/db causing pnpm errors when those
packages aren't generated; wrap the auth dependency with a Handlebars
conditional matching the auth feature (e.g. {{#unless (eq auth "none")}} ...
{{/unless}}) and wrap the DB dependency with the same database/orm guards used
in setupBackendFramework (e.g. nested {{#unless (eq database "none")}} /
{{#unless (eq orm "none")}} ... {{/unless}}) and adjust commas so the resulting
JSON remains valid (only emit commas between entries when the following entry is
present).

Comment on lines 6 to 12
"types": [
"bun"
],
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Remove trailing comma to keep generated tsconfig valid JSON.

When the template renders, the trailing comma after the "types" array turns the output into invalid JSON, so tsconfig.json will fail to parse. Please drop that comma from the template.

 		"types": [
 			"bun"
-		],
+		]
 	}
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"types": [
"bun"
],
}
"types": [
"bun"
]
}
}
🤖 Prompt for AI Agents
In apps/cli/templates/api/trpc/server/base/tsconfig.json.hbs around lines 6 to
9, the template includes a trailing comma after the "types" array which produces
invalid JSON when rendered; remove the comma after the closing bracket of the
"types" array so the generated tsconfig.json is valid JSON.

Comment on lines +14 to +16
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the log ignore glob.

_.log matches only a file literally named _.log, so real log files like server.log will slip into version control. Update the glob to *.log so logs stay out of git.

-_.log
+*.log
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
logs
*.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
🤖 Prompt for AI Agents
In apps/cli/templates/auth/better-auth/server/base/_gitignore around lines 14 to
16, the gitignore entry "_.log" only matches a file literally named "_.log" so
real log files like "server.log" are not ignored; change that entry to use a
wildcard "*.log" to ignore all .log files (replace "_.log" with "*.log").

Comment on lines 19 to 21
"dependencies": {
"@{{projectName}}/db": "workspace:*"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Guard the workspace dependency when DB is disabled.

This template always emits @{{projectName}}/db even when the project is generated without a database/ORM, so no packages/db workspace exists. The next install will fail with ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE because the declared workspace:* target cannot be resolved.(pnpm.io) Wrap the dependency in conditionals (matching the logic in setupBackendFramework) so it is only emitted when both context.database and context.orm are enabled.

 	"peerDependencies": {
 		"typescript": "^5"
 	},
 	"dependencies": {
-		"@{{projectName}}/db": "workspace:*"
+{{#unless (eq database "none")}}
+{{#unless (eq orm "none")}}
+		"@{{projectName}}/db": "workspace:*"
+{{/unless}}
+{{/unless}}
 	}
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"@{{projectName}}/db": "workspace:*"
}
"peerDependencies": {
"typescript": "^5"
},
"dependencies": {
{{#unless (eq database "none")}}
{{#unless (eq orm "none")}}
"@{{projectName}}/db": "workspace:*"
{{/unless}}
{{/unless}}
}
}
🤖 Prompt for AI Agents
In apps/cli/templates/auth/better-auth/server/base/package.json.hbs around lines
19-21, the template unconditionally emits the "@{{projectName}}/db":
"workspace:*" dependency which breaks installs when no DB/ORM package is
generated; guard this block with the same conditional logic used in
setupBackendFramework so the dependency is only rendered when context.database
and context.orm are enabled (i.e., wrap the dependency entry in an if-check that
requires both flags).

Comment on lines +15 to +17
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix glob patterns so log artifacts are actually ignored.

The patterns _.log and report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json only match those exact literal names. They won’t ignore real log files (e.g. app.log) or report snapshots (e.g. report.2024.09.27.12.00.00.json). Please restore the wildcards so generated artifacts don’t slip into Git.

-_.log
-report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
+*.log
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
*.log
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
🤖 Prompt for AI Agents
In apps/cli/templates/db/base/_gitignore around lines 15 to 17, the glob
patterns are currently literal ("_.log" and
"report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json") and therefore don't ignore real
log/report artifacts; replace them with proper globs such as "*.log" to ignore
any log files and "report.*.json" (or "report.*.*.*.*.json" if you prefer to
constrain parts) to match generated report snapshot filenames so those artifacts
are excluded from Git.

@AmanVarshney01 AmanVarshney01 marked this pull request as ready for review October 6, 2025 15:57
@cursor
Copy link

cursor bot commented Oct 6, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on November 7.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@AmanVarshney01
Copy link
Owner Author

https://github.com/coderabbitai review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/cli/templates/backend/server/base/package.json.hbs (1)

6-6: Add tsdown to devDependencies.

The build script uses tsdown, but it has been removed from devDependencies. This will cause the build to fail.

Apply this diff to restore tsdown as a dev dependency:

 	"devDependencies": {
+		"tsdown": "^0.2.1",
 		"typescript": "^5.8.2"
 	}
apps/cli/src/helpers/database-providers/turso-setup.ts (1)

182-206: Update manual instructions to match backend-specific target.

writeEnvFile now writes credentials to apps/web/.env when the backend is self, yet the manual instructions still tell users to modify apps/server/.env. Anyone scaffolding the new fullstack backend will be sent to the wrong file. Please thread the backend (or resolved target path) through displayManualSetupInstructions so the message matches where we actually write the env vars. A minimal fix is to accept the backend (or computed target app) as an argument and interpolate it in the instructions.

Example patch:

-function displayManualSetupInstructions() {
+function displayManualSetupInstructions(
+	backend: ProjectConfig["backend"],
+) {
+	const targetApp = backend === "self" ? "apps/web" : "apps/server";
 	log.info(`Manual Turso Setup Instructions:

 1. Visit https://turso.tech and create an account
 2. Create a new database from the dashboard
 3. Get your database URL and authentication token
-4. Add these credentials to the .env file in apps/server/.env
+4. Add these credentials to the .env file in ${targetApp}/.env

And pass the backend everywhere we call it.

Also applies to: 231-321

🧹 Nitpick comments (11)
apps/cli/templates/db/drizzle/postgres/drizzle.config.ts.hbs (1)

4-10: Use explicit condition instead of generic else block.

The else block (lines 7-9) is a generic catch-all. Per coding guidelines: "In Handlebars templates, avoid generic if/else blocks; write explicit conditions."

As per coding guidelines

Apply this diff to make the condition explicit:

 dotenv.config({
     {{#if (eq backend "self")}}
     path: "../../apps/web/.env",
-    {{else}}
+    {{else if (eq backend "server")}}
     path: "../../apps/server/.env",
     {{/if}}
 });

Note: Adjust the explicit condition based on the actual non-"self" backend value(s) used in your project.

apps/cli/templates/db/drizzle/mysql/drizzle.config.ts.hbs (1)

4-10: Use explicit condition instead of generic else block.

The else block is a generic catch-all, which violates coding guidelines. Same issue as in the postgres config file.

As per coding guidelines

Apply this diff:

 dotenv.config({
     {{#if (eq backend "self")}}
     path: "../../apps/web/.env",
-    {{else}}
+    {{else if (eq backend "server")}}
     path: "../../apps/server/.env",
     {{/if}}
 });

Adjust the explicit condition based on actual backend values in your project.

apps/cli/templates/db/drizzle/sqlite/drizzle.config.ts.hbs (1)

4-10: Use explicit condition instead of generic else block.

The else block is a generic catch-all, violating coding guidelines. This is the same issue present in the postgres and mysql config files.

As per coding guidelines

Apply this diff:

 dotenv.config({
     {{#if (eq backend "self")}}
     path: "../../apps/web/.env",
-    {{else}}
+    {{else if (eq backend "server")}}
     path: "../../apps/server/.env",
     {{/if}}
 });

Adjust the explicit condition based on actual backend values in your project.

apps/cli/templates/api/orpc/fullstack/next/src/app/api/rpc/[[...rest]]/route.ts.hbs (1)

31-40: Reuse the request context once per handler invocation

createContext(req) runs twice, so anything expensive inside it (auth/session lookups, DB connections, etc.) is performed redundantly. Build the context once and pass the same instance to both handlers to avoid duplicate work and to ensure both layers observe consistent request state.

 async function handleRequest(req: NextRequest) {
-	const rpcResult = await rpcHandler.handle(req, {
-		prefix: "/api/rpc",
-		context: await createContext(req),
-	});
+	const context = await createContext(req);
+	const rpcResult = await rpcHandler.handle(req, {
+		prefix: "/api/rpc",
+		context,
+	});
 	if (rpcResult.response) return rpcResult.response;

-	const apiResult = await apiHandler.handle(req, {
-		prefix: "/api/rpc/api",
-		context: await createContext(req),
-	});
+	const apiResult = await apiHandler.handle(req, {
+		prefix: "/api/rpc/api",
+		context,
+	});
apps/cli/templates/base/tsconfig.base.json.hbs (1)

20-31: Types array logic is correct, but document the fallback behavior.

The explicit runtime conditions with a default "node" fallback (line 28) are correct and follow the Handlebars coding guideline for explicit conditions. The comma handling for the optional Cloudflare workers type is also correct.

However, the else fallback to "node" (line 28) could silently mask issues if a new, unhandled runtime is introduced. Consider adding a comment in the template generation logic explaining this default behavior.

As per coding guidelines.

apps/cli/templates/api/orpc/server/src/context.ts.hbs (1)

117-122: Consider adding an explicit condition for the final fallback block.

The generic else block doesn't follow the coding guideline: "avoid generic if/else blocks; write explicit conditions (e.g., if (eq orm "prisma") and else if (eq orm "drizzle"))."

As per coding guidelines, consider one of these approaches:

-{{else}}
+{{!-- Fallback for any unhandled backend type --}}
+{{else}}
 export async function createContext() {
   return {
     session: null,
   };
 }

Or make it truly explicit by checking for unknown backends:

-{{else}}
+{{else if (not (or (eq backend 'self') (eq backend 'hono') (eq backend 'elysia') (eq backend 'express') (eq backend 'fastify')))}}
+{{!-- Fallback for unknown backend types --}}
 export async function createContext() {
   return {
     session: null,
   };
 }
apps/cli/templates/api/trpc/server/package.json.hbs (1)

18-20: Consider moving typescript to devDependencies.

Since typescript is used by the build tool (tsdown), it may be more appropriate in devDependencies rather than peerDependencies, unless you specifically want consumers to provide their own TypeScript version.

apps/cli/src/helpers/database-providers/d1-setup.ts (1)

10-11: Backend-aware routing looks correct.

The conditional logic correctly routes to apps/web for "self" backend and apps/server otherwise. However, this exact logic is duplicated at lines 40-41.

Consider extracting this logic to reduce duplication:

+	const targetApp = backend === "self" ? "apps/web" : "apps/server";
+
 	if (serverDeploy === "wrangler") {
-		const targetApp = backend === "self" ? "apps/web" : "apps/server";
 		const envPath = path.join(projectDir, targetApp, ".env");

Then remove the duplicate targetApp2 declaration at line 40 and reuse targetApp.

apps/cli/src/helpers/core/template-manager.ts (1)

1206-1234: Propagate env.d.ts to the Convex backend package as well.

setupConvexBackend now moves all backend code into packages/backend and deletes apps/server. When the Alchemy deploy flow runs, addEnvDtsToPackages no longer touches that directory, so the Convex package misses the generated env types we used to drop into apps/server. To keep type parity (and avoid TS errors around import.meta.env in those templates), please add the backend package to this loop—or confirm we never read envs from Convex and explain why the omission is safe.

-	const packages = ["packages/api", "packages/auth", "packages/db"];
+	const packages = [
+		"packages/api",
+		"packages/auth",
+		"packages/db",
+		"packages/backend",
+	];
FULLSTACK_BACKEND_IMPLEMENTATION.md (1)

1-183: Add language specifiers to fenced code blocks.

The static analysis tool flagged two code blocks missing language specifiers (lines 56 and 69). Adding language identifiers improves syntax highlighting and readability.

Apply this diff to add language specifiers:

 ### With `--backend self` (Fullstack)
-```
+```text
 my-app/
 ├── apps/
 │   └── web/              # Fullstack app (Next/Nuxt/SvelteKit/TanStack Start)
 ### With traditional backend (hono, express, etc.)
-```
+```text
 my-app/
 ├── apps/
 │   ├── web/              # Frontend
apps/cli/src/helpers/database-providers/prisma-postgres-setup.ts (1)

103-103: Simplify log message.

The log message was simplified from "Starting Prisma PostgreSQL setup with automated database creation" to "Starting Prisma PostgreSQL setup." This change removes helpful context about the automated setup mode.

Consider restoring more descriptive text to help users understand what's happening:

-		log.info("Starting Prisma PostgreSQL setup.");
+		log.info("Starting Prisma PostgreSQL setup with automated database creation.");
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4007e7d and 3462d13.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (107)
  • CATALOG_IMPLEMENTATION.md (1 hunks)
  • FULLSTACK_BACKEND_IMPLEMENTATION.md (1 hunks)
  • apps/cli/package.json (2 hunks)
  • apps/cli/src/constants.ts (3 hunks)
  • apps/cli/src/helpers/addons/examples-setup.ts (3 hunks)
  • apps/cli/src/helpers/addons/fumadocs-setup.ts (2 hunks)
  • apps/cli/src/helpers/addons/ultracite-setup.ts (2 hunks)
  • apps/cli/src/helpers/core/api-setup.ts (1 hunks)
  • apps/cli/src/helpers/core/auth-setup.ts (3 hunks)
  • apps/cli/src/helpers/core/backend-setup.ts (2 hunks)
  • apps/cli/src/helpers/core/create-project.ts (4 hunks)
  • apps/cli/src/helpers/core/create-readme.ts (13 hunks)
  • apps/cli/src/helpers/core/db-setup.ts (2 hunks)
  • apps/cli/src/helpers/core/env-setup.ts (7 hunks)
  • apps/cli/src/helpers/core/payments-setup.ts (1 hunks)
  • apps/cli/src/helpers/core/post-installation.ts (12 hunks)
  • apps/cli/src/helpers/core/project-config.ts (5 hunks)
  • apps/cli/src/helpers/core/runtime-setup.ts (1 hunks)
  • apps/cli/src/helpers/core/template-manager.ts (18 hunks)
  • apps/cli/src/helpers/core/workspace-setup.ts (1 hunks)
  • apps/cli/src/helpers/database-providers/d1-setup.ts (3 hunks)
  • apps/cli/src/helpers/database-providers/mongodb-atlas-setup.ts (4 hunks)
  • apps/cli/src/helpers/database-providers/neon-setup.ts (9 hunks)
  • apps/cli/src/helpers/database-providers/planetscale-setup.ts (5 hunks)
  • apps/cli/src/helpers/database-providers/prisma-postgres-setup.ts (8 hunks)
  • apps/cli/src/helpers/database-providers/supabase-setup.ts (5 hunks)
  • apps/cli/src/helpers/database-providers/turso-setup.ts (7 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.ts (2 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-react-router-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.ts (1 hunks)
  • apps/cli/src/helpers/deployment/server-deploy-setup.ts (4 hunks)
  • apps/cli/src/helpers/deployment/web-deploy-setup.ts (4 hunks)
  • apps/cli/src/prompts/backend.ts (3 hunks)
  • apps/cli/src/prompts/runtime.ts (1 hunks)
  • apps/cli/src/types.ts (1 hunks)
  • apps/cli/src/utils/add-package-deps.ts (3 hunks)
  • apps/cli/src/utils/compatibility-rules.ts (1 hunks)
  • apps/cli/src/utils/config-validation.ts (5 hunks)
  • apps/cli/src/utils/setup-catalogs.ts (1 hunks)
  • apps/cli/src/utils/template-processor.ts (1 hunks)
  • apps/cli/src/validation.ts (1 hunks)
  • apps/cli/templates/addons/ruler/.ruler/bts.md.hbs (5 hunks)
  • apps/cli/templates/api/orpc/fullstack/next/src/app/api/rpc/[[...rest]]/route.ts.hbs (1 hunks)
  • apps/cli/templates/api/orpc/native/utils/orpc.ts.hbs (2 hunks)
  • apps/cli/templates/api/orpc/server/_gitignore (1 hunks)
  • apps/cli/templates/api/orpc/server/next/src/app/rpc/[...all]/route.ts.hbs (0 hunks)
  • apps/cli/templates/api/orpc/server/package.json.hbs (1 hunks)
  • apps/cli/templates/api/orpc/server/src/context.ts.hbs (5 hunks)
  • apps/cli/templates/api/orpc/server/src/routers/index.ts.hbs (2 hunks)
  • apps/cli/templates/api/orpc/server/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/api/orpc/server/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs (1 hunks)
  • apps/cli/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs (2 hunks)
  • apps/cli/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs (1 hunks)
  • apps/cli/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/fullstack/next/src/app/api/trpc/[trpc]/route.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/native/utils/trpc.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/_gitignore (1 hunks)
  • apps/cli/templates/api/trpc/server/next/src/app/trpc/[trpc]/route.ts (0 hunks)
  • apps/cli/templates/api/trpc/server/package.json.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/src/context.ts.hbs (5 hunks)
  • apps/cli/templates/api/trpc/server/src/routers/index.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/api/trpc/server/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs (3 hunks)
  • apps/cli/templates/auth/better-auth/fullstack/next/src/app/api/auth/[...all]/route.ts.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/_gitignore (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/package.json.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/src/index.ts.hbs (5 hunks)
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/server/base/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs (1 hunks)
  • apps/cli/templates/auth/better-auth/web/react/next/src/app/dashboard/page.tsx.hbs (2 hunks)
  • apps/cli/templates/backend/server/base/package.json.hbs (1 hunks)
  • apps/cli/templates/backend/server/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/backend/server/base/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/backend/server/elysia/src/index.ts.hbs (3 hunks)
  • apps/cli/templates/backend/server/express/src/index.ts.hbs (3 hunks)
  • apps/cli/templates/backend/server/fastify/src/index.ts.hbs (4 hunks)
  • apps/cli/templates/backend/server/hono/src/index.ts.hbs (3 hunks)
  • apps/cli/templates/backend/server/next/next-env.d.ts (0 hunks)
  • apps/cli/templates/backend/server/next/next.config.ts (0 hunks)
  • apps/cli/templates/backend/server/next/package.json.hbs (0 hunks)
  • apps/cli/templates/backend/server/next/src/app/route.ts (0 hunks)
  • apps/cli/templates/backend/server/next/src/middleware.ts (0 hunks)
  • apps/cli/templates/backend/server/next/tsconfig.json.hbs (0 hunks)
  • apps/cli/templates/base/_gitignore (1 hunks)
  • apps/cli/templates/base/package.json.hbs (1 hunks)
  • apps/cli/templates/base/tsconfig.base.json.hbs (2 hunks)
  • apps/cli/templates/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/db/base/_gitignore (1 hunks)
  • apps/cli/templates/db/base/package.json.hbs (1 hunks)
  • apps/cli/templates/db/base/tsconfig.json.hbs (1 hunks)
  • apps/cli/templates/db/base/tsdown.config.ts.hbs (1 hunks)
  • apps/cli/templates/db/drizzle/mysql/drizzle.config.ts.hbs (1 hunks)
  • apps/cli/templates/db/drizzle/mysql/src/index.ts.hbs (1 hunks)
  • apps/cli/templates/db/drizzle/postgres/drizzle.config.ts.hbs (1 hunks)
  • apps/cli/templates/db/drizzle/postgres/src/index.ts.hbs (1 hunks)
  • apps/cli/templates/db/drizzle/sqlite/drizzle.config.ts.hbs (1 hunks)
  • apps/cli/templates/db/drizzle/sqlite/src/index.ts.hbs (1 hunks)
  • apps/cli/templates/db/prisma/mongodb/prisma.config.ts.hbs (1 hunks)
  • apps/cli/templates/db/prisma/mongodb/src/db/index.ts.hbs (0 hunks)
⛔ Files not processed due to max files limit (39)
  • apps/cli/templates/db/prisma/mongodb/src/index.ts.hbs
  • apps/cli/templates/db/prisma/mysql/prisma.config.ts.hbs
  • apps/cli/templates/db/prisma/mysql/src/index.ts.hbs
  • apps/cli/templates/db/prisma/postgres/prisma.config.ts.hbs
  • apps/cli/templates/db/prisma/postgres/src/index.ts.hbs
  • apps/cli/templates/db/prisma/sqlite/prisma.config.ts.hbs
  • apps/cli/templates/db/prisma/sqlite/src/index.ts.hbs
  • apps/cli/templates/deploy/alchemy/alchemy.run.ts.hbs
  • apps/cli/templates/examples/ai/fullstack/next/src/app/api/ai/route.ts.hbs
  • apps/cli/templates/examples/ai/server/next/src/app/ai/route.ts.hbs
  • apps/cli/templates/examples/todo/server/drizzle/base/src/routers/todo.ts.hbs
  • apps/cli/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbs
  • apps/cli/templates/examples/todo/server/prisma/base/src/routers/todo.ts.hbs
  • apps/cli/templates/extras/bunfig.toml.hbs
  • apps/cli/templates/frontend/native/nativewind/tsconfig.json.hbs
  • apps/cli/templates/frontend/native/unistyles/tsconfig.json.hbs
  • apps/cli/templates/frontend/nuxt/tsconfig.json.hbs
  • apps/cli/templates/frontend/react/next/package.json.hbs
  • apps/cli/templates/frontend/react/next/tsconfig.json.hbs
  • apps/cli/templates/frontend/react/react-router/tsconfig.json.hbs
  • apps/cli/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs
  • apps/cli/templates/frontend/react/tanstack-router/tsconfig.json.hbs
  • apps/cli/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs
  • apps/cli/templates/frontend/react/tanstack-start/tsconfig.json.hbs
  • apps/cli/templates/frontend/solid/tsconfig.json.hbs
  • apps/cli/templates/frontend/svelte/tsconfig.json.hbs
  • apps/cli/test/api.test.ts
  • apps/cli/test/auth.test.ts
  • apps/cli/test/backend-runtime.test.ts
  • apps/cli/test/basic-configurations.test.ts
  • apps/cli/test/benchmark.test.ts
  • apps/cli/test/deployment.test.ts
  • apps/cli/test/examples.test.ts
  • apps/cli/test/frontend.test.ts
  • apps/cli/test/integration.test.ts
  • apps/web/src/app/(home)/new/_components/utils.ts
  • apps/web/src/lib/constant.ts
  • bunfig.toml
  • package.json
💤 Files with no reviewable changes (9)
  • apps/cli/templates/backend/server/next/next-env.d.ts
  • apps/cli/templates/backend/server/next/package.json.hbs
  • apps/cli/templates/backend/server/next/next.config.ts
  • apps/cli/templates/api/trpc/server/next/src/app/trpc/[trpc]/route.ts
  • apps/cli/templates/backend/server/next/src/app/route.ts
  • apps/cli/templates/backend/server/next/tsconfig.json.hbs
  • apps/cli/templates/db/prisma/mongodb/src/db/index.ts.hbs
  • apps/cli/templates/api/orpc/server/next/src/app/rpc/[...all]/route.ts.hbs
  • apps/cli/templates/backend/server/next/src/middleware.ts
✅ Files skipped from review due to trivial changes (8)
  • apps/cli/templates/api/orpc/server/_gitignore
  • apps/cli/templates/api/trpc/server/_gitignore
  • apps/cli/templates/backend/server/base/tsconfig.json.hbs
  • apps/cli/templates/auth/better-auth/fullstack/next/src/app/api/auth/[...all]/route.ts.hbs
  • apps/cli/templates/base/package.json.hbs
  • apps/cli/templates/api/orpc/server/tsconfig.json.hbs
  • apps/cli/templates/base/tsconfig.json.hbs
  • apps/cli/templates/base/_gitignore
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/cli/templates/auth/better-auth/server/base/tsdown.config.ts.hbs
  • apps/cli/templates/db/base/tsdown.config.ts.hbs
  • apps/cli/templates/auth/better-auth/server/base/_gitignore
  • apps/cli/templates/db/base/_gitignore
  • apps/cli/templates/auth/better-auth/server/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/tsconfig.json.hbs
  • apps/cli/templates/db/base/package.json.hbs
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{hbs,handlebars}

📄 CodeRabbit inference engine (.cursor/rules/better-t-stack-repo.mdc)

In Handlebars templates, avoid generic if/else blocks; write explicit conditions (e.g., if (eq orm "prisma") and else if (eq orm "drizzle")).

Files:

  • apps/cli/templates/db/drizzle/postgres/src/index.ts.hbs
  • apps/cli/templates/api/orpc/server/tsdown.config.ts.hbs
  • apps/cli/templates/backend/server/base/package.json.hbs
  • apps/cli/templates/api/trpc/server/package.json.hbs
  • apps/cli/templates/db/drizzle/postgres/drizzle.config.ts.hbs
  • apps/cli/templates/api/orpc/server/src/context.ts.hbs
  • apps/cli/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs
  • apps/cli/templates/api/orpc/server/src/routers/index.ts.hbs
  • apps/cli/templates/db/drizzle/mysql/drizzle.config.ts.hbs
  • apps/cli/templates/auth/better-auth/server/base/src/index.ts.hbs
  • apps/cli/templates/api/trpc/server/tsconfig.json.hbs
  • apps/cli/templates/backend/server/base/tsdown.config.ts.hbs
  • apps/cli/templates/db/drizzle/mysql/src/index.ts.hbs
  • apps/cli/templates/api/orpc/native/utils/orpc.ts.hbs
  • apps/cli/templates/api/trpc/server/tsdown.config.ts.hbs
  • apps/cli/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs
  • apps/cli/templates/base/tsconfig.base.json.hbs
  • apps/cli/templates/db/prisma/mongodb/prisma.config.ts.hbs
  • apps/cli/templates/backend/server/fastify/src/index.ts.hbs
  • apps/cli/templates/db/drizzle/sqlite/drizzle.config.ts.hbs
  • apps/cli/templates/auth/better-auth/web/react/next/src/app/dashboard/page.tsx.hbs
  • apps/cli/templates/api/trpc/server/src/context.ts.hbs
  • apps/cli/templates/api/trpc/fullstack/next/src/app/api/trpc/[trpc]/route.ts.hbs
  • apps/cli/templates/db/drizzle/sqlite/src/index.ts.hbs
  • apps/cli/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs
  • apps/cli/templates/api/orpc/server/package.json.hbs
  • apps/cli/templates/api/trpc/native/utils/trpc.ts.hbs
  • apps/cli/templates/backend/server/express/src/index.ts.hbs
  • apps/cli/templates/api/orpc/fullstack/next/src/app/api/rpc/[[...rest]]/route.ts.hbs
  • apps/cli/templates/backend/server/hono/src/index.ts.hbs
  • apps/cli/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs
  • apps/cli/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs
  • apps/cli/templates/auth/better-auth/server/base/package.json.hbs
  • apps/cli/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs
  • apps/cli/templates/api/trpc/server/src/routers/index.ts.hbs
  • apps/cli/templates/backend/server/elysia/src/index.ts.hbs
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)

**/*.{ts,tsx}: Use Id from './_generated/dataModel' to type document ids (e.g., Id<'users'>)
Ensure Record key/value types align with validators (e.g., v.record(v.id('users'), v.string()) => Record<Id<'users'>, string>)
Be strict with types for document ids; prefer Id<'table'> over string
Use 'as const' for string literals in discriminated unions
When using Array and Record types, declare with explicit generic types (e.g., const arr: Array = ...)

**/*.{ts,tsx}: Use TypeScript type aliases instead of interface declarations.
Do not use explicit return types in TypeScript.

Files:

  • apps/cli/src/helpers/deployment/alchemy/alchemy-react-router-setup.ts
  • apps/cli/src/helpers/database-providers/d1-setup.ts
  • apps/cli/src/helpers/core/project-config.ts
  • apps/cli/src/helpers/core/runtime-setup.ts
  • apps/cli/src/helpers/core/api-setup.ts
  • apps/cli/src/helpers/core/create-project.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.ts
  • apps/cli/src/utils/setup-catalogs.ts
  • apps/cli/src/helpers/core/backend-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.ts
  • apps/cli/src/utils/compatibility-rules.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.ts
  • apps/cli/src/helpers/addons/ultracite-setup.ts
  • apps/cli/src/helpers/core/env-setup.ts
  • apps/cli/src/helpers/database-providers/planetscale-setup.ts
  • apps/cli/src/helpers/database-providers/turso-setup.ts
  • apps/cli/src/helpers/database-providers/neon-setup.ts
  • apps/cli/src/types.ts
  • apps/cli/src/helpers/deployment/web-deploy-setup.ts
  • apps/cli/src/helpers/addons/examples-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.ts
  • apps/cli/src/helpers/core/create-readme.ts
  • apps/cli/src/helpers/core/payments-setup.ts
  • apps/cli/src/utils/add-package-deps.ts
  • apps/cli/src/prompts/backend.ts
  • apps/cli/src/helpers/addons/fumadocs-setup.ts
  • apps/cli/src/utils/config-validation.ts
  • apps/cli/src/helpers/database-providers/prisma-postgres-setup.ts
  • apps/cli/src/helpers/core/template-manager.ts
  • apps/cli/src/validation.ts
  • apps/cli/src/helpers/database-providers/supabase-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.ts
  • apps/cli/src/helpers/core/workspace-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.ts
  • apps/cli/src/helpers/core/auth-setup.ts
  • apps/cli/src/prompts/runtime.ts
  • apps/cli/src/helpers/database-providers/mongodb-atlas-setup.ts
  • apps/cli/src/helpers/core/post-installation.ts
  • apps/cli/src/utils/template-processor.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.ts
  • apps/cli/src/helpers/deployment/server-deploy-setup.ts
  • apps/cli/src/helpers/core/db-setup.ts
  • apps/cli/src/constants.ts
**/*.{js,jsx,ts,tsx,mjs,cjs}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{js,jsx,ts,tsx,mjs,cjs}: Do not use dotenv; Bun auto-loads .env
Use Bun.serve() for HTTP/WebSockets; do not use express
Use bun:sqlite for SQLite; do not use better-sqlite3
Use Bun.redis for Redis; do not use ioredis
Use Bun.sql for Postgres; do not use pg or postgres.js
Use built-in WebSocket; do not use ws
Prefer Bun.file over node:fs readFile/writeFile
Use Bun.$ instead of execa for shelling out

Files:

  • apps/cli/src/helpers/deployment/alchemy/alchemy-react-router-setup.ts
  • apps/cli/src/helpers/database-providers/d1-setup.ts
  • apps/cli/src/helpers/core/project-config.ts
  • apps/cli/src/helpers/core/runtime-setup.ts
  • apps/cli/src/helpers/core/api-setup.ts
  • apps/cli/src/helpers/core/create-project.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.ts
  • apps/cli/src/utils/setup-catalogs.ts
  • apps/cli/src/helpers/core/backend-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.ts
  • apps/cli/src/utils/compatibility-rules.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.ts
  • apps/cli/src/helpers/addons/ultracite-setup.ts
  • apps/cli/src/helpers/core/env-setup.ts
  • apps/cli/src/helpers/database-providers/planetscale-setup.ts
  • apps/cli/src/helpers/database-providers/turso-setup.ts
  • apps/cli/src/helpers/database-providers/neon-setup.ts
  • apps/cli/src/types.ts
  • apps/cli/src/helpers/deployment/web-deploy-setup.ts
  • apps/cli/src/helpers/addons/examples-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.ts
  • apps/cli/src/helpers/core/create-readme.ts
  • apps/cli/src/helpers/core/payments-setup.ts
  • apps/cli/src/utils/add-package-deps.ts
  • apps/cli/src/prompts/backend.ts
  • apps/cli/src/helpers/addons/fumadocs-setup.ts
  • apps/cli/src/utils/config-validation.ts
  • apps/cli/src/helpers/database-providers/prisma-postgres-setup.ts
  • apps/cli/src/helpers/core/template-manager.ts
  • apps/cli/src/validation.ts
  • apps/cli/src/helpers/database-providers/supabase-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.ts
  • apps/cli/src/helpers/core/workspace-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.ts
  • apps/cli/src/helpers/core/auth-setup.ts
  • apps/cli/src/prompts/runtime.ts
  • apps/cli/src/helpers/database-providers/mongodb-atlas-setup.ts
  • apps/cli/src/helpers/core/post-installation.ts
  • apps/cli/src/utils/template-processor.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.ts
  • apps/cli/src/helpers/deployment/server-deploy-setup.ts
  • apps/cli/src/helpers/core/db-setup.ts
  • apps/cli/src/constants.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/better-t-stack-repo.mdc)

Define functions using the standard function declaration syntax, not arrow functions.

Files:

  • apps/cli/src/helpers/deployment/alchemy/alchemy-react-router-setup.ts
  • apps/cli/src/helpers/database-providers/d1-setup.ts
  • apps/cli/src/helpers/core/project-config.ts
  • apps/cli/src/helpers/core/runtime-setup.ts
  • apps/cli/src/helpers/core/api-setup.ts
  • apps/cli/src/helpers/core/create-project.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.ts
  • apps/cli/src/utils/setup-catalogs.ts
  • apps/cli/src/helpers/core/backend-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.ts
  • apps/cli/src/utils/compatibility-rules.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.ts
  • apps/cli/src/helpers/addons/ultracite-setup.ts
  • apps/cli/src/helpers/core/env-setup.ts
  • apps/cli/src/helpers/database-providers/planetscale-setup.ts
  • apps/cli/src/helpers/database-providers/turso-setup.ts
  • apps/cli/src/helpers/database-providers/neon-setup.ts
  • apps/cli/src/types.ts
  • apps/cli/src/helpers/deployment/web-deploy-setup.ts
  • apps/cli/src/helpers/addons/examples-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.ts
  • apps/cli/src/helpers/core/create-readme.ts
  • apps/cli/src/helpers/core/payments-setup.ts
  • apps/cli/src/utils/add-package-deps.ts
  • apps/cli/src/prompts/backend.ts
  • apps/cli/src/helpers/addons/fumadocs-setup.ts
  • apps/cli/src/utils/config-validation.ts
  • apps/cli/src/helpers/database-providers/prisma-postgres-setup.ts
  • apps/cli/src/helpers/core/template-manager.ts
  • apps/cli/src/validation.ts
  • apps/cli/src/helpers/database-providers/supabase-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.ts
  • apps/cli/src/helpers/core/workspace-setup.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.ts
  • apps/cli/src/helpers/core/auth-setup.ts
  • apps/cli/src/prompts/runtime.ts
  • apps/cli/src/helpers/database-providers/mongodb-atlas-setup.ts
  • apps/cli/src/helpers/core/post-installation.ts
  • apps/cli/src/utils/template-processor.ts
  • apps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.ts
  • apps/cli/src/helpers/deployment/server-deploy-setup.ts
  • apps/cli/src/helpers/core/db-setup.ts
  • apps/cli/src/constants.ts
**/package.json

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

In package.json scripts, prefer running files with bun <file> instead of node <file> or ts-node <file>

Files:

  • apps/cli/package.json
{**/package.json,**/@(jest|vitest).config.@(js|ts|mjs|cjs)}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

{**/package.json,**/@(jest|vitest).config.@(js|ts|mjs|cjs)}: Use bun test instead of jest or vitest
Use bun test to run tests

Files:

  • apps/cli/package.json
{**/package.json,**/webpack.config.@(js|ts|mjs|cjs),**/esbuild.config.@(js|ts|mjs|cjs)}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file> instead of webpack or esbuild

Files:

  • apps/cli/package.json
{**/package.json,**/vite.config.@(js|ts|mjs|cjs)}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use HTML imports with Bun.serve(); do not use vite

Files:

  • apps/cli/package.json
🧠 Learnings (3)
📚 Learning: 2025-09-11T04:31:24.508Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/better-t-stack-repo.mdc:0-0
Timestamp: 2025-09-11T04:31:24.508Z
Learning: Applies to **/*.{hbs,handlebars} : In Handlebars templates, avoid generic if/else blocks; write explicit conditions (e.g., if (eq orm "prisma") and else if (eq orm "drizzle")).

Applied to files:

  • apps/cli/templates/db/drizzle/mysql/src/index.ts.hbs
  • apps/cli/templates/db/drizzle/sqlite/src/index.ts.hbs
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to **/*.{js,jsx,ts,tsx,mjs,cjs} : Use `Bun.sql` for Postgres; do not use `pg` or `postgres.js`

Applied to files:

  • apps/cli/templates/db/drizzle/sqlite/src/index.ts.hbs
📚 Learning: 2025-08-24T18:01:11.544Z
Learnt from: CR
PR: AmanVarshney01/create-better-t-stack#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-08-24T18:01:11.544Z
Learning: Applies to **/*.{js,jsx,ts,tsx,mjs,cjs} : Use `bun:sqlite` for SQLite; do not use `better-sqlite3`

Applied to files:

  • apps/cli/templates/db/drizzle/sqlite/src/index.ts.hbs
🧬 Code graph analysis (25)
apps/cli/src/helpers/database-providers/d1-setup.ts (1)
apps/cli/src/helpers/core/env-setup.ts (1)
  • EnvVariable (37-42)
apps/cli/src/helpers/core/project-config.ts (2)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/helpers/core/workspace-setup.ts (1)
  • setupWorkspaceDependencies (7-105)
apps/cli/src/helpers/core/api-setup.ts (2)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/constants.ts (1)
  • AvailableDependencies (170-170)
apps/cli/src/helpers/core/create-project.ts (4)
apps/cli/src/helpers/core/template-manager.ts (2)
  • setupBackendFramework (341-363)
  • setupDockerComposeTemplates (1064-1081)
apps/cli/src/helpers/core/backend-setup.ts (1)
  • setupBackendDependencies (6-68)
apps/cli/src/helpers/core/runtime-setup.ts (1)
  • setupRuntime (6-24)
apps/cli/src/utils/setup-catalogs.ts (1)
  • setupCatalogs (17-64)
apps/cli/src/utils/setup-catalogs.ts (1)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/utils/compatibility-rules.ts (2)
apps/cli/src/types.ts (3)
  • Frontend (37-37)
  • CLIInput (168-170)
  • ProjectConfig (172-192)
apps/cli/src/utils/errors.ts (1)
  • exitWithError (9-15)
apps/cli/src/helpers/core/env-setup.ts (2)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/helpers/core/auth-setup.ts (1)
  • generateAuthSecret (162-171)
apps/cli/src/helpers/database-providers/planetscale-setup.ts (1)
apps/web/next.config.mjs (1)
  • config (6-27)
apps/cli/src/helpers/database-providers/turso-setup.ts (1)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/helpers/database-providers/neon-setup.ts (2)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/utils/package-runner.ts (1)
  • getPackageExecutionCommand (11-23)
apps/cli/src/helpers/deployment/web-deploy-setup.ts (1)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/helpers/addons/examples-setup.ts (1)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.ts (1)
apps/cli/src/helpers/deployment/server-deploy-setup.ts (1)
  • setupAlchemyServerDeploy (83-117)
apps/cli/src/helpers/core/payments-setup.ts (1)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/utils/add-package-deps.ts (1)
apps/cli/src/constants.ts (1)
  • dependencyVersionMap (42-168)
apps/cli/src/prompts/backend.ts (2)
apps/cli/src/types.ts (2)
  • Frontend (37-37)
  • Backend (16-16)
apps/cli/src/constants.ts (1)
  • DEFAULT_CONFIG (40-40)
apps/cli/src/utils/config-validation.ts (3)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/utils/errors.ts (1)
  • exitWithError (9-15)
apps/cli/src/utils/compatibility-rules.ts (1)
  • validateSelfBackendCompatibility (54-92)
apps/cli/src/helpers/database-providers/prisma-postgres-setup.ts (2)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/helpers/core/template-manager.ts (2)
apps/cli/src/constants.ts (1)
  • PKG_ROOT (7-7)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/helpers/database-providers/supabase-setup.ts (1)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/helpers/core/workspace-setup.ts (3)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/constants.ts (1)
  • AvailableDependencies (170-170)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/helpers/core/auth-setup.ts (1)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/helpers/database-providers/mongodb-atlas-setup.ts (1)
apps/cli/src/types.ts (1)
  • ProjectConfig (172-192)
apps/cli/src/helpers/deployment/server-deploy-setup.ts (1)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
apps/cli/src/helpers/core/db-setup.ts (1)
apps/cli/src/utils/add-package-deps.ts (1)
  • addPackageDependency (6-59)
🪛 markdownlint-cli2 (0.18.1)
FULLSTACK_BACKEND_IMPLEMENTATION.md

56-56: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


69-69: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

@AmanVarshney01 AmanVarshney01 changed the title feat(cli): add internal packages for servers feat(cli): add internal packages, catalogs, fullstack nextjs Oct 6, 2025
@AmanVarshney01 AmanVarshney01 merged commit eb19dbd into main Oct 6, 2025
1 check passed
@AmanVarshney01 AmanVarshney01 deleted the internal-package branch October 6, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant