-
-
Couldn't load subscription status.
- Fork 210
feat(cli): add internal packages, catalogs, fullstack nextjs #601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRefactors 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
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)
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>
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this 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
📒 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.hbsapps/cli/templates/api/trpc/server/base/tsconfig.json.hbsapps/cli/templates/db/base/tsconfig.json.hbsapps/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.hbsapps/cli/templates/api/trpc/server/base/tsconfig.json.hbsapps/cli/templates/db/base/tsconfig.json.hbsapps/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.hbsapps/cli/templates/api/trpc/server/base/tsconfig.json.hbsapps/cli/templates/db/base/tsconfig.json.hbsapps/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.hbsapps/cli/templates/api/trpc/server/base/tsconfig.json.hbsapps/cli/templates/db/base/tsconfig.json.hbsapps/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.hbsapps/cli/templates/api/trpc/server/base/tsconfig.json.hbsapps/cli/templates/db/base/tsconfig.json.hbsapps/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
| logs | ||
| _.log | ||
| report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
| "types": [ | ||
| "bun" | ||
| ], | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "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.
| logs | ||
| _.log | ||
| report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
| "dependencies": { | ||
| "@{{projectName}}/auth": "workspace:*", | ||
| "@{{projectName}}/db": "workspace:*" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
| "types": [ | ||
| "bun" | ||
| ], | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "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.
| logs | ||
| _.log | ||
| report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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").
| "dependencies": { | ||
| "@{{projectName}}/db": "workspace:*" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "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).
| _.log | ||
| report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| _.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.
c04a2f6 to
14fff7a
Compare
941ce88 to
460ab7d
Compare
|
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. |
There was a problem hiding this 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 fromdevDependencies. 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.
writeEnvFilenow writes credentials toapps/web/.envwhen the backend isself, yet the manual instructions still tell users to modifyapps/server/.env. Anyone scaffolding the new fullstack backend will be sent to the wrong file. Please thread the backend (or resolved target path) throughdisplayManualSetupInstructionsso 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}/.envAnd 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
elseblock (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
elseblock 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
elseblock 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
elsefallback 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
elseblock 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
typescriptis used by the build tool (tsdown), it may be more appropriate indevDependenciesrather thanpeerDependencies, 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/webfor "self" backend andapps/serverotherwise. 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
targetApp2declaration at line 40 and reusetargetApp.apps/cli/src/helpers/core/template-manager.ts (1)
1206-1234: Propagate env.d.ts to the Convex backend package as well.
setupConvexBackendnow moves all backend code intopackages/backendand deletesapps/server. When the Alchemy deploy flow runs,addEnvDtsToPackagesno longer touches that directory, so the Convex package misses the generated env types we used to drop intoapps/server. To keep type parity (and avoid TS errors aroundimport.meta.envin 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/ # Frontendapps/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
⛔ Files ignored due to path filters (1)
bun.lockis 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.hbsapps/cli/templates/api/orpc/server/tsdown.config.ts.hbsapps/cli/templates/backend/server/base/package.json.hbsapps/cli/templates/api/trpc/server/package.json.hbsapps/cli/templates/db/drizzle/postgres/drizzle.config.ts.hbsapps/cli/templates/api/orpc/server/src/context.ts.hbsapps/cli/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbsapps/cli/templates/api/orpc/server/src/routers/index.ts.hbsapps/cli/templates/db/drizzle/mysql/drizzle.config.ts.hbsapps/cli/templates/auth/better-auth/server/base/src/index.ts.hbsapps/cli/templates/api/trpc/server/tsconfig.json.hbsapps/cli/templates/backend/server/base/tsdown.config.ts.hbsapps/cli/templates/db/drizzle/mysql/src/index.ts.hbsapps/cli/templates/api/orpc/native/utils/orpc.ts.hbsapps/cli/templates/api/trpc/server/tsdown.config.ts.hbsapps/cli/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbsapps/cli/templates/base/tsconfig.base.json.hbsapps/cli/templates/db/prisma/mongodb/prisma.config.ts.hbsapps/cli/templates/backend/server/fastify/src/index.ts.hbsapps/cli/templates/db/drizzle/sqlite/drizzle.config.ts.hbsapps/cli/templates/auth/better-auth/web/react/next/src/app/dashboard/page.tsx.hbsapps/cli/templates/api/trpc/server/src/context.ts.hbsapps/cli/templates/api/trpc/fullstack/next/src/app/api/trpc/[trpc]/route.ts.hbsapps/cli/templates/db/drizzle/sqlite/src/index.ts.hbsapps/cli/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbsapps/cli/templates/api/orpc/server/package.json.hbsapps/cli/templates/api/trpc/native/utils/trpc.ts.hbsapps/cli/templates/backend/server/express/src/index.ts.hbsapps/cli/templates/api/orpc/fullstack/next/src/app/api/rpc/[[...rest]]/route.ts.hbsapps/cli/templates/backend/server/hono/src/index.ts.hbsapps/cli/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbsapps/cli/templates/api/orpc/web/solid/src/utils/orpc.ts.hbsapps/cli/templates/auth/better-auth/server/base/package.json.hbsapps/cli/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbsapps/cli/templates/api/trpc/server/src/routers/index.ts.hbsapps/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.tsapps/cli/src/helpers/database-providers/d1-setup.tsapps/cli/src/helpers/core/project-config.tsapps/cli/src/helpers/core/runtime-setup.tsapps/cli/src/helpers/core/api-setup.tsapps/cli/src/helpers/core/create-project.tsapps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.tsapps/cli/src/utils/setup-catalogs.tsapps/cli/src/helpers/core/backend-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.tsapps/cli/src/utils/compatibility-rules.tsapps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.tsapps/cli/src/helpers/addons/ultracite-setup.tsapps/cli/src/helpers/core/env-setup.tsapps/cli/src/helpers/database-providers/planetscale-setup.tsapps/cli/src/helpers/database-providers/turso-setup.tsapps/cli/src/helpers/database-providers/neon-setup.tsapps/cli/src/types.tsapps/cli/src/helpers/deployment/web-deploy-setup.tsapps/cli/src/helpers/addons/examples-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.tsapps/cli/src/helpers/core/create-readme.tsapps/cli/src/helpers/core/payments-setup.tsapps/cli/src/utils/add-package-deps.tsapps/cli/src/prompts/backend.tsapps/cli/src/helpers/addons/fumadocs-setup.tsapps/cli/src/utils/config-validation.tsapps/cli/src/helpers/database-providers/prisma-postgres-setup.tsapps/cli/src/helpers/core/template-manager.tsapps/cli/src/validation.tsapps/cli/src/helpers/database-providers/supabase-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.tsapps/cli/src/helpers/core/workspace-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.tsapps/cli/src/helpers/core/auth-setup.tsapps/cli/src/prompts/runtime.tsapps/cli/src/helpers/database-providers/mongodb-atlas-setup.tsapps/cli/src/helpers/core/post-installation.tsapps/cli/src/utils/template-processor.tsapps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.tsapps/cli/src/helpers/deployment/server-deploy-setup.tsapps/cli/src/helpers/core/db-setup.tsapps/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
UseBun.serve()for HTTP/WebSockets; do not useexpress
Usebun:sqlitefor SQLite; do not usebetter-sqlite3
UseBun.redisfor Redis; do not useioredis
UseBun.sqlfor Postgres; do not usepgorpostgres.js
Use built-inWebSocket; do not usews
PreferBun.fileovernode:fsreadFile/writeFile
UseBun.$instead ofexecafor shelling out
Files:
apps/cli/src/helpers/deployment/alchemy/alchemy-react-router-setup.tsapps/cli/src/helpers/database-providers/d1-setup.tsapps/cli/src/helpers/core/project-config.tsapps/cli/src/helpers/core/runtime-setup.tsapps/cli/src/helpers/core/api-setup.tsapps/cli/src/helpers/core/create-project.tsapps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.tsapps/cli/src/utils/setup-catalogs.tsapps/cli/src/helpers/core/backend-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.tsapps/cli/src/utils/compatibility-rules.tsapps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.tsapps/cli/src/helpers/addons/ultracite-setup.tsapps/cli/src/helpers/core/env-setup.tsapps/cli/src/helpers/database-providers/planetscale-setup.tsapps/cli/src/helpers/database-providers/turso-setup.tsapps/cli/src/helpers/database-providers/neon-setup.tsapps/cli/src/types.tsapps/cli/src/helpers/deployment/web-deploy-setup.tsapps/cli/src/helpers/addons/examples-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.tsapps/cli/src/helpers/core/create-readme.tsapps/cli/src/helpers/core/payments-setup.tsapps/cli/src/utils/add-package-deps.tsapps/cli/src/prompts/backend.tsapps/cli/src/helpers/addons/fumadocs-setup.tsapps/cli/src/utils/config-validation.tsapps/cli/src/helpers/database-providers/prisma-postgres-setup.tsapps/cli/src/helpers/core/template-manager.tsapps/cli/src/validation.tsapps/cli/src/helpers/database-providers/supabase-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.tsapps/cli/src/helpers/core/workspace-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.tsapps/cli/src/helpers/core/auth-setup.tsapps/cli/src/prompts/runtime.tsapps/cli/src/helpers/database-providers/mongodb-atlas-setup.tsapps/cli/src/helpers/core/post-installation.tsapps/cli/src/utils/template-processor.tsapps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.tsapps/cli/src/helpers/deployment/server-deploy-setup.tsapps/cli/src/helpers/core/db-setup.tsapps/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.tsapps/cli/src/helpers/database-providers/d1-setup.tsapps/cli/src/helpers/core/project-config.tsapps/cli/src/helpers/core/runtime-setup.tsapps/cli/src/helpers/core/api-setup.tsapps/cli/src/helpers/core/create-project.tsapps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.tsapps/cli/src/utils/setup-catalogs.tsapps/cli/src/helpers/core/backend-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.tsapps/cli/src/utils/compatibility-rules.tsapps/cli/src/helpers/deployment/alchemy/alchemy-nuxt-setup.tsapps/cli/src/helpers/addons/ultracite-setup.tsapps/cli/src/helpers/core/env-setup.tsapps/cli/src/helpers/database-providers/planetscale-setup.tsapps/cli/src/helpers/database-providers/turso-setup.tsapps/cli/src/helpers/database-providers/neon-setup.tsapps/cli/src/types.tsapps/cli/src/helpers/deployment/web-deploy-setup.tsapps/cli/src/helpers/addons/examples-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-combined-setup.tsapps/cli/src/helpers/core/create-readme.tsapps/cli/src/helpers/core/payments-setup.tsapps/cli/src/utils/add-package-deps.tsapps/cli/src/prompts/backend.tsapps/cli/src/helpers/addons/fumadocs-setup.tsapps/cli/src/utils/config-validation.tsapps/cli/src/helpers/database-providers/prisma-postgres-setup.tsapps/cli/src/helpers/core/template-manager.tsapps/cli/src/validation.tsapps/cli/src/helpers/database-providers/supabase-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.tsapps/cli/src/helpers/core/workspace-setup.tsapps/cli/src/helpers/deployment/alchemy/alchemy-solid-setup.tsapps/cli/src/helpers/core/auth-setup.tsapps/cli/src/prompts/runtime.tsapps/cli/src/helpers/database-providers/mongodb-atlas-setup.tsapps/cli/src/helpers/core/post-installation.tsapps/cli/src/utils/template-processor.tsapps/cli/src/helpers/deployment/alchemy/alchemy-svelte-setup.tsapps/cli/src/helpers/deployment/server-deploy-setup.tsapps/cli/src/helpers/core/db-setup.tsapps/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 ofnode <file>orts-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)}: Usebun testinstead ofjestorvitest
Usebun testto 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 ofwebpackoresbuild
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 usevite
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.hbsapps/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)
Summary by CodeRabbit
New Features
Improvements
Documentation
Chores