Skip to content

feat: add astro frontend support - #826

Merged
AmanVarshney01 merged 5 commits into
mainfrom
astro
Jan 17, 2026
Merged

AmanVarshney01 merged 5 commits into
mainfrom
astro

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Jan 17, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added Astro as a first-class web framework in the CLI, templates, and project builder (including fullstack, auth, oRPC API, and Cloudflare deployment support).
  • Documentation

    • Updated and simplified CLI/docs examples and installation commands; added Astro-specific docs and examples.
  • UI

    • Platform UI and tech lists updated to show Astro and new icons/variants.
  • Tests

    • Added coverage for Astro scenarios in the frontend/backend test matrix.
  • Chores

    • Dev dependency updates and package manifest adjustments.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Jan 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
create-better-t-stack-web Ready Ready Preview, Comment Jan 17, 2026 4:52pm

Request Review

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Jan 17, 2026
@coderabbitai

coderabbitai Bot commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Adds comprehensive Astro frontend support across the CLI, template generator, templates, processors, types, tests, docs, and web UI; integrates Astro with ORPC, Better Auth, Cloudflare/Alchemy, and build tooling, and updates compatibility and validation rules to account for Astro.

Changes

Cohort / File(s) Summary
Type & Schema
packages/types/src/schemas.ts
Added "astro" to FrontendSchema enum.
CLI prompts & compatibility
apps/cli/src/prompts/frontend.ts, apps/cli/src/prompts/backend.ts, apps/cli/src/utils/compatibility.ts, apps/cli/src/utils/compatibility-rules.ts, apps/cli/src/utils/config-validation.ts
Exposed Astro in frontend prompts/constants and updated compatibility rules/validators to account for Astro (incompatible with Convex, tRPC restrictions, other frontend/backend constraints).
CLI tests & config
apps/cli/test/frontend.test.ts, apps/cli/test/backend-runtime.test.ts, apps/cli/test/addons.test.ts, apps/cli/bunfig.toml, bunfig.toml
Added Astro scenarios to tests, updated error messages, removed oxlint from test addon list, minor bunfig formatting.
Template generator processors
packages/template-generator/src/processors/*, packages/template-generator/src/utils/add-deps.ts
Threaded Astro detection through processors: api-deps, auth-deps, deploy-deps, env-vars, payments-deps, readme-generator, turbo-generator, alchemy-plugins; added @astrojs/cloudflare version entry.
Template handlers
packages/template-generator/src/template-handlers/*
Added Astro branches to template handlers for api, auth, examples, frontend, packages (registers and processes Astro templates where applicable).
Astro frontend templates
packages/template-generator/templates/frontend/astro/*
New Astro project templates (package.json, astro.config.mjs, tsconfig, global.css, Layout, Header, index, .gitignore, styles, etc.).
Auth & auth web templates
packages/template-generator/templates/auth/better-auth/*/astro/*
Added Better Auth fullstack & web Astro templates: env.d.ts, middleware, API handler, auth-client, SignIn/SignUp components, dashboard/login/signup pages.
API (oRPC) templates
packages/template-generator/templates/api/orpc/.../astro/*
Added Astro server route, ORPC web client template, and server context (createContext) for Astro combinations.
Examples
packages/template-generator/templates/examples/todo/web/astro/src/pages/todos.astro.hbs
Added Astro todo example page wired to ORPC.
Alchemy / Cloudflare infra templates
packages/template-generator/templates/packages/infra/alchemy.run.ts.hbs, packages/template-generator/src/processors/alchemy-plugins.ts
Added Astro web export binding in Alchemy infra template and processor logic to patch astro.config.mjs for Alchemy adapter.
Env & packages templates
packages/template-generator/templates/packages/env/src/web.ts.hbs, packages/template-generator/src/processors/deploy-deps.ts
Unified Svelte/Astro env-core handling and added Astro-specific deploy devDeps (alchemy, @astrojs/cloudflare, workers types).
Turbo / build outputs
packages/template-generator/src/processors/turbo-generator.ts
Included .astro/** in turbo build outputs when Astro is selected.
Web UI & constants
apps/web/src/lib/constant.ts, apps/web/src/lib/stack-utils.ts, apps/web/src/app/(home)/*, apps/web/src/components/ui/tech-badge.tsx
Added Astro to TECH_OPTIONS (webFrontend & backend self-astro), mapped self-astro CLI command, adjusted icon/light-variant logic and multiple stack-compatibility flows to include Astro constraints.
Docs & MDX
apps/web/content/docs/*, apps/web/source.config.ts, apps/web/content/docs/index.mdx
Simplified multi-tab install blocks to single npm inline commands, formatting fixes, added MDX remarkNpmOptions persist config.
Package & infra minor
package.json, packages/backend/convex/README.md
DevDependency bumps and minor README formatting.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add astro frontend support' clearly and concisely summarizes the main change—adding Astro as a new frontend framework option to the project.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 10

Caution

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

⚠️ Outside diff range comments (3)
packages/template-generator/templates/packages/env/src/web.ts.hbs (1)

45-50: Add auth-specific PUBLIC_ variables for Astro/Svelte when using Convex.

The Astro/Svelte branch (lines 45-50) is missing conditional auth-specific environment variables that are present in other frameworks (Next.js, Vite). When Better Auth or Clerk is selected, validation and runtime access will fail because PUBLIC_CONVEX_SITE_URL (Better Auth) and PUBLIC_CLERK_PUBLISHABLE_KEY (Clerk) are not defined.

Proposed fix
 {{else if (or (includes frontend "svelte") (includes frontend "astro"))}}
 	clientPrefix: "PUBLIC_",
 	client: {
 		PUBLIC_CONVEX_URL: z.url(),
+{{`#if` (eq auth "better-auth")}}
+		PUBLIC_CONVEX_SITE_URL: z.url(),
+{{/if}}
+{{`#if` (eq auth "clerk")}}
+		PUBLIC_CLERK_PUBLISHABLE_KEY: z.string().min(1),
+{{/if}}
 	},
 	runtimeEnv: (import.meta as any).env,
apps/web/content/docs/index.mdx (1)

149-149: Add astro to the --frontend flags list.

The docs list omits the new Astro option.

✏️ Suggested doc update
-- `--frontend`: tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, native-bare, native-uniwind, native-unistyles, none
+- `--frontend`: tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, astro, native-bare, native-uniwind, native-unistyles, none
apps/cli/src/utils/compatibility-rules.ts (1)

47-85: Update self-backend error copy to include Astro.

FULLSTACK_FRONTENDS now includes astro, but the error messages still list only Next/TanStack/Nuxt. That’s misleading for users.

✏️ Suggested message updates
-      "Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, and Nuxt frontends. Please use --frontend next, --frontend tanstack-start, or --frontend nuxt. Support for SvelteKit will be added in a future update.",
+      "Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, Nuxt, and Astro frontends. Please use --frontend next, --frontend tanstack-start, --frontend nuxt, or --frontend astro. Support for SvelteKit will be added in a future update.",
-      "Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, and Nuxt frontends. Please use --frontend next, --frontend tanstack-start, --frontend nuxt, or choose a different backend. Support for SvelteKit will be added in a future update.",
+      "Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, Nuxt, and Astro frontends. Please use --frontend next, --frontend tanstack-start, --frontend nuxt, --frontend astro, or choose a different backend. Support for SvelteKit will be added in a future update.",
🧹 Nitpick comments (12)
convex-astro/.gitignore (1)

16-26: Broaden env file ignores to avoid leaking variant configs.

Right now only .env, .env.production, and .env.local are ignored. Consider ignoring all .env.* variants (e.g., .env.development, .env.test, .env.production.local) while keeping .env.example trackable.

♻️ Suggested update
 # environment variables
 .env
 .env.production
+.env.*
+!.env.example
@@
-.env.local
packages/template-generator/src/processors/turbo-generator.ts (1)

76-79: Misleading comment — .astro/** is a build cache directory, not the output.

The comment says "Astro outputs to dist/**" but the code adds .astro/**. Astro's final build output goes to dist/** (already included in line 61), while .astro/ is the intermediate build/cache directory (similar to .next/ for Next.js).

📝 Suggested comment fix
-  // Astro outputs to dist/**
+  // Astro uses .astro/** for build cache (final output is dist/**)
   if (frontend.includes("astro")) {
     buildOutputs.push(".astro/**");
   }
apps/web/content/docs/cli/programmatic-api.mdx (1)

20-22: Consider multi-line formatting for better maintainability.

The inline TabsContent elements with embedded code blocks work functionally but reduce source readability and make future edits more difficult.

📝 Suggested formatting for improved readability
-  <TabsContent value="npm">```bash npm install create-better-t-stack ```</TabsContent>
-  <TabsContent value="pnpm">```bash pnpm add create-better-t-stack ```</TabsContent>
-  <TabsContent value="bun">```bash bun add create-better-t-stack ```</TabsContent>
+  <TabsContent value="npm">
+    ```bash
+    npm install create-better-t-stack
+    ```
+  </TabsContent>
+  <TabsContent value="pnpm">
+    ```bash
+    pnpm add create-better-t-stack
+    ```
+  </TabsContent>
+  <TabsContent value="bun">
+    ```bash
+    bun add create-better-t-stack
+    ```
+  </TabsContent>
convex-astro/src/lib/convex.tsx (1)

11-21: Consider using standard function declaration for the returned component.

Per coding guidelines, functions should use standard function declaration syntax rather than arrow functions.

♻️ Suggested refactor
 export function withConvexProvider<Props extends JSX.IntrinsicAttributes>(
   Component: FunctionComponent<Props>,
 ) {
-  return function WithConvexProvider(props: Props) {
-    return (
-      <ConvexProvider client={client}>
-        <Component {...props} />
-      </ConvexProvider>
-    );
-  };
+  function WithConvexProvider(props: Props) {
+    return (
+      <ConvexProvider client={client}>
+        <Component {...props} />
+      </ConvexProvider>
+    );
+  }
+  return WithConvexProvider;
 }
convex-astro/package.json (1)

14-22: Move @types/* packages to devDependencies.

Type definition packages (@types/react, @types/react-dom) are only needed at build/development time, not at runtime. They should be in devDependencies.

Suggested fix
   "dependencies": {
     "@astrojs/react": "^4.4.2",
-    "@types/react": "^19.2.6",
-    "@types/react-dom": "^19.2.3",
     "astro": "^5.16.0",
     "convex": "^1.31.0",
     "react": "^19.2.1",
     "react-dom": "^19.2.1"
   },
   "devDependencies": {
     "@tailwindcss/vite": "^4.1.17",
+    "@types/react": "^19.2.6",
+    "@types/react-dom": "^19.2.3",
     "npm-run-all2": "^8.0.4",
packages/template-generator/templates/auth/better-auth/web/astro/src/components/SignInForm.astro.hbs (1)

1-3: Remove unused frontmatter import.

The authClient import in the frontmatter (server-side) is not used. It's only needed in the client-side <script> block where it's already imported on line 53.

Suggested fix
 ---
-import { authClient } from "../lib/auth-client";
 ---
packages/template-generator/templates/frontend/astro/src/layouts/Layout.astro.hbs (1)

5-7: Use a type alias for Props to match project TS conventions.

Line 5 declares an interface; switch to a type alias to align with the TS guideline.

♻️ Suggested change
-interface Props {
-  title?: string;
-}
+type Props = {
+  title?: string;
+};

As per coding guidelines, please use type aliases.

packages/template-generator/templates/api/orpc/server/src/context.ts.hbs (1)

67-75: Prefer explicit auth branches in Handlebars

The bare {{else}} makes the fallback implicit. Please enumerate the supported auth modes (e.g., none vs better-auth) so new providers don’t silently fall into the no-auth path. As per coding guidelines, avoid generic if/else blocks in Handlebars.

♻️ Suggested adjustment
 {{`#if` (eq auth "better-auth")}}
   const session = await auth.api.getSession({ headers });
   return {
     session,
   };
-{{else}}
-  return {};
+{{else if (eq auth "none")}}
+  return {};
 {{/if}}
packages/template-generator/templates/api/orpc/fullstack/astro/src/pages/rpc/[...rest].ts.hbs (1)

17-26: Use a function declaration for the route handler

The style guide prefers standard function declarations over arrow functions. As per coding guidelines, please switch this handler to a function declaration.

♻️ Proposed change
-export const ALL: APIRoute = async ({ request }) => {
+export async function ALL({ request }: Parameters<APIRoute>[0]) {
   const context = await createContext({ headers: request.headers });

   const { response } = await handler.handle(request, {
     prefix: "/rpc",
     context,
   });

   return response ?? new Response("Not found", { status: 404 });
-};
+}
packages/template-generator/templates/examples/todo/web/astro/src/pages/todos.astro.hbs (1)

35-39: Use a type alias instead of an interface

Please use a type alias here for consistency with the TS style rules. As per coding guidelines, prefer type aliases over interfaces.

♻️ Suggested change
-  interface Todo {
-    id: number;
-    text: string;
-    completed: boolean;
-  }
+  type Todo = {
+    id: number;
+    text: string;
+    completed: boolean;
+  };
convex-astro/convex/comments.ts (1)

10-20: Prefer method shorthand over arrow handlers.
Repo guidelines ask for standard function declarations; using async handler(...) {} inside the config keeps consistency. As per coding guidelines, ...

convex-astro/src/components/CommentList.tsx (1)

6-29: Extract the arrow callback into a named function declaration to align with the function-declaration guideline.

The map callback at line 14 uses an arrow function. Extract it as a named function declaration.

♻️ Proposed refactor
 export default withConvexProvider(function CommentList() {
   const comments = useQuery(api.comments.list);
+  function renderComment(comment: NonNullable<typeof comments>[number]) {
+    return (
+      <article
+        key={comment._id}
+        className="rounded-lg border border-gray-200 bg-gray-50 p-4 shadow-sm"
+      >
+        <header className="mb-2 flex items-center justify-between">
+          <strong className="font-medium text-gray-900">{comment.author}</strong>
+          <span className="text-sm text-gray-500">
+            {new Date(comment._creationTime).toLocaleDateString()}
+          </span>
+        </header>
+        <main className="leading-relaxed text-gray-700">
+          <p className="whitespace-pre-line">{comment.content}</p>
+        </main>
+      </article>
+    );
+  }
   return comments === undefined ? (
     <p className="py-4 text-center text-gray-500">Loading comments...</p>
   ) : comments.length === 0 ? (
     <p className="py-4 text-center text-gray-500">No comments found.</p>
   ) : (
     <div className="space-y-6">
-      {comments.map((comment) => (
-        <article
-          key={comment._id}
-          className="rounded-lg border border-gray-200 bg-gray-50 p-4 shadow-sm"
-        >
-          <header className="mb-2 flex items-center justify-between">
-            <strong className="font-medium text-gray-900">{comment.author}</strong>
-            <span className="text-sm text-gray-500">
-              {new Date(comment._creationTime).toLocaleDateString()}
-            </span>
-          </header>
-          <main className="leading-relaxed text-gray-700">
-            <p className="whitespace-pre-line">{comment.content}</p>
-          </main>
-        </article>
-      ))}
+      {comments.map(renderComment)}
     </div>
   );
 });

Comment thread apps/web/content/docs/analytics.mdx Resolved
Comment thread apps/web/content/docs/index.mdx Resolved
Comment thread convex-astro/convex/comments.ts Outdated
Comment on lines +5 to +21
export const create = mutation({
args: {
author: v.string(),
content: v.string(),
},
handler: async (ctx, args) => {
await ctx.db.insert("comments", {
author: args.author,
content: args.content,
});
},
});

export const list = query({
handler: async (ctx) => {
return await ctx.db.query("comments").order("desc").collect();
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

fd comments.ts --type f

Repository: AmanVarshney01/create-better-t-stack

Length of output: 111


🏁 Script executed:

cat -n convex-astro/convex/comments.ts

Repository: AmanVarshney01/create-better-t-stack

Length of output: 700


🌐 Web query:

Convex db.insert return type validator

💡 Result:

Short answer: db.insert returns the new document's ID, and you validate that return with a function-level return validator (e.g. returns: v.id("tableName")). Use the validator builder from convex/values (v) so the function will throw at runtime if the handler returns a value that doesn't match the validator.

Example:

import { mutation } from "./_generated/server";
import { v } from "convex/values";

export const create = mutation({
args: { text: v.string() },
returns: v.id("tasks"),
handler: async (ctx, { text }) => {
return await ctx.db.insert("tasks", { text }); // insert returns the new Id
},
});

Docs: Convex return-value validators and db.insert behavior. [1][2][3]

Sources
[1] Convex — Argument and Return Value Validation.
[2] Convex — Announcing Convex 1.13 (return value validators).
[3] Convex — Writing Data (db.insert returns ID).


🌐 Web query:

Convex db.query collect return type validator

💡 Result:

Short answer: use a return-value validator on the query and specify an array validator (since collect() returns an array). Convex will validate at runtime and infer TypeScript types.

Example:

  • Define the query with returns: v.array(...), then call .collect() on the returned Query in your handler or client.

Server-side example:
import { query } from "./_generated/server";
import { v } from "convex/values";

export const listMessages = query({
args: {},
returns: v.array(v.object({ _id: v.id("messages"), body: v.string(), author: v.string() })),
handler: async (ctx) => {
return await ctx.db.query("messages").collect();
},
});

Notes:

  • collect() returns all results as an array, so use v.array(...) for the validator. [1][2]
  • Return validators throw at runtime if the returned value doesn't match; validators also drive TypeScript inference (use Infer<> if needed). [1][3]

Sources:

  • Convex argument & return value validators. [1]
  • Query.collect() documentation. [2]
  • Release notes introducing return value validators. [3]

Add return validators and args validator to Convex functions.

Both create and list are missing returns validators. list is also missing an args validator. Per repository guidelines, all Convex functions must include explicit argument and return validators.

Additionally, convert handlers from arrow functions to the standard function declaration syntax.

🛠️ Suggested fix
 export const create = mutation({
   args: {
     author: v.string(),
     content: v.string(),
   },
-  handler: async (ctx, args) => {
-    await ctx.db.insert("comments", {
+  returns: v.id("comments"),
+  async handler(ctx, args) {
+    return await ctx.db.insert("comments", {
       author: args.author,
       content: args.content,
     });
   },
 });

 export const list = query({
-  handler: async (ctx) => {
-    return await ctx.db.query("comments").order("desc").collect();
+  args: {},
+  returns: v.array(
+    v.object({
+      _id: v.id("comments"),
+      _creationTime: v.number(),
+      author: v.string(),
+      content: v.string(),
+    }),
+  ),
+  async handler(ctx) {
+    return await ctx.db.query("comments").order("desc").collect();
   },
 });

Comment thread convex-astro/convex/README.md Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

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

⚠️ Outside diff range comments (3)
apps/web/content/docs/guides/cloudflare-alchemy.mdx (1)

37-65: Update scaffold commands to use bun for consistency with operational commands throughout the guide.

Lines 40, 51, and 60 use npm create better-t-stack@latest, but all subsequent operational commands (deploy, dev, destroy, db:push, build) use bun run (lines 230+). Users should either scaffold with bunx create better-t-stack@latest or the guide should clarify why npm is used only for scaffolding while bun is required for everything else.

apps/cli/src/utils/compatibility-rules.ts (1)

36-39: Error message doesn't list Astro as a web framework option.

The error message lists web frameworks but omits "astro" from the list.

📝 Proposed fix
   if (web.length > 1) {
     exitWithError(
-      "Cannot select multiple web frameworks. Choose only one of: tanstack-router, tanstack-start, react-router, next, nuxt, svelte, solid",
+      "Cannot select multiple web frameworks. Choose only one of: tanstack-router, tanstack-start, react-router, next, nuxt, svelte, solid, astro",
     );
   }
apps/web/content/docs/index.mdx (1)

93-93: Add astro to the --frontend options list.

The Astro frontend was added in this PR but is missing from the documentation's flags cheat sheet.

📝 Proposed fix
-- `--frontend`: tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, native-bare, native-uniwind, native-unistyles, none
+- `--frontend`: tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, astro, native-bare, native-uniwind, native-unistyles, none
♻️ Duplicate comments (1)
apps/web/content/docs/guides/cloudflare-alchemy.mdx (1)

511-511: Fix typo in heading ("Continous" → "Continuous").

✏️ Proposed fix
-## Continous Integration
+## Continuous Integration
🧹 Nitpick comments (1)
apps/cli/src/utils/compatibility-rules.ts (1)

335-337: Consider adding Astro to AI example validation for consistency.

The isExampleAIAllowed function correctly blocks Astro + AI, but validateExamplesCompatibility only has a specific error message for Solid + AI. For consistency, consider adding Astro here as well.

📝 Proposed fix
-  if (examplesArr.includes("ai") && (frontend ?? []).includes("solid")) {
-    exitWithError("The 'ai' example is not compatible with the Solid frontend.");
+  if (examplesArr.includes("ai") && (frontend ?? []).includes("solid")) {
+    exitWithError("The 'ai' example is not compatible with the Solid frontend.");
+  }
+
+  if (examplesArr.includes("ai") && (frontend ?? []).includes("astro")) {
+    exitWithError("The 'ai' example is not compatible with the Astro frontend.");
   }

Comment thread apps/cli/test/frontend.test.ts Resolved
Comment thread apps/web/content/docs/index.mdx Resolved
Comment on lines +64 to +69
} else if (frontend.includes("astro")) {
addPackageDependency({
vfs,
packagePath: webPkgPath,
devDependencies: ["alchemy", "@cloudflare/workers-types"],
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's read the deploy-deps.ts file to understand the context
cat -n packages/template-generator/src/processors/deploy-deps.ts

Repository: AmanVarshney01/create-better-t-stack

Length of output: 3127


🏁 Script executed:

# Search for Astro-related files and templates
find . -type f -name "*astro*" | head -20

Repository: AmanVarshney01/create-better-t-stack

Length of output: 1132


🏁 Script executed:

# Search for `@astrojs/cloudflare` references
rg "@astrojs/cloudflare" --type ts --type tsx --type js --type json

Repository: AmanVarshney01/create-better-t-stack

Length of output: 107


🏁 Script executed:

# Search for astro in package.json files
rg "astro" packages/ -t json | head -20

Repository: AmanVarshney01/create-better-t-stack

Length of output: 62


🏁 Script executed:

# Check if there are template files that might add Astro deps
find . -path "*/templates/*" -type f | grep -i astro | head -10

Repository: AmanVarshney01/create-better-t-stack

Length of output: 1037


🌐 Web query:

Astro Cloudflare adapter @astrojs/cloudflare required dependencies wrangler

💡 Result:

Short answer: to use the Astro Cloudflare adapter (@astrojs/cloudflare) you need the adapter itself plus the Cloudflare Wrangler CLI (installed as a dev dependency). Install commands shown in the docs:

  • Adapter: npm install @astrojs/cloudflare. [1][2]
  • Wrangler CLI: npm install wrangler@latest --save-dev (or pnpm add wrangler --save-dev). [1][3]

Notes: Astro’s npx astro add cloudflare will add the adapter and create a wrangler.jsonc for you; a Wrangler config file is optional for simple projects (Astro can generate defaults). [1][2]

Sources:
[1] Astro deploy → Cloudflare (docs).
[2] @astrojs/cloudflare integration (Astro docs).
[3] Cloudflare Pages + Astro (Cloudflare docs).


Add missing Astro Cloudflare adapter and wrangler dependencies.

The Astro Cloudflare branch only adds alchemy and @cloudflare/workers-types, but according to Astro documentation, deploying to Cloudflare requires the @astrojs/cloudflare adapter and wrangler for local development. All other frameworks in this file (Next, Nuxt, Svelte, TanStack Start) include their respective framework adapters. Add both to maintain consistency and ensure Cloudflare builds succeed:

Fix
-      devDependencies: ["alchemy", "@cloudflare/workers-types"],
+      devDependencies: ["alchemy", "@cloudflare/workers-types", "wrangler", "@astrojs/cloudflare"],

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jan 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (3)
apps/web/src/app/(home)/new/_components/utils.ts (3)

97-102: Message doesn't reflect that Astro is also removed.

The condition and filter now handle both Solid and Astro, but the message on line 101 only mentions Solid. When Astro is removed, users would see a misleading message.

Proposed fix
     // Remove incompatible frontends
     if (nextStack.webFrontend.includes("solid") || nextStack.webFrontend.includes("astro")) {
+      const removedFrontends: string[] = [];
+      if (nextStack.webFrontend.includes("solid")) removedFrontends.push("Solid");
+      if (nextStack.webFrontend.includes("astro")) removedFrontends.push("Astro");
       nextStack.webFrontend = nextStack.webFrontend.filter((f) => f !== "solid" && f !== "astro");
       if (nextStack.webFrontend.length === 0) nextStack.webFrontend = ["none"];
       changed = true;
-      changes.push({ category: "backend", message: "Removed Solid (incompatible with Convex)" });
+      changes.push({ category: "backend", message: `Removed ${removedFrontends.join(" and ")} (incompatible with Convex)` });
     }

943-951: Missing Astro in tRPC disabled reason check.

The analyzeStackCompatibility function (line 494) includes "astro" in the frontends requiring oRPC, but this getDisabledReason check at line 944 does not include it. This inconsistency means tRPC won't appear disabled in the UI when Astro is selected, even though it will be auto-corrected.

Proposed fix
   if (category === "api" && optionId === "trpc") {
-    const needsOrpc = currentStack.webFrontend.some((f) => ["nuxt", "svelte", "solid"].includes(f));
+    const needsOrpc = currentStack.webFrontend.some((f) => ["nuxt", "svelte", "solid", "astro"].includes(f));
     if (needsOrpc) {
       const frontendName = currentStack.webFrontend.find((f) =>
-        ["nuxt", "svelte", "solid"].includes(f),
+        ["nuxt", "svelte", "solid", "astro"].includes(f),
       );
       return `${frontendName} requires oRPC, not tRPC`;
     }
   }

26-32: Add Astro to PWA and Tauri compatible frontend lists.

Astro is currently excluded from both hasPWACompatibleFrontend and hasTauriCompatibleFrontend, but the codebase already supports Astro as a first-class fullstack framework (via self-astro backend). Astro has official PWA support via the @vite-pwa/astro integration and supports Tauri integration through standard build configuration. Both functions should include "astro" in their framework checks to match the broader framework support in this scaffolding tool.

Additionally, line 944 has an inconsistency where "astro" is missing from the needsOrpc check—it should be added alongside the other non-React frameworks that require oRPC.

♻️ Duplicate comments (1)
packages/template-generator/src/processors/deploy-deps.ts (1)

64-69: Add wrangler for Astro Cloudflare deploys.

The Astro Cloudflare branch still omits wrangler, which other Cloudflare frontends include and is typically needed for local dev/preview workflows. Consider adding it unless intentionally excluded.

✅ Proposed fix
-        devDependencies: ["alchemy", "@astrojs/cloudflare", "@cloudflare/workers-types"],
+        devDependencies: ["alchemy", "@astrojs/cloudflare", "@cloudflare/workers-types", "wrangler"],
Does Astro’s Cloudflare adapter require the wrangler CLI as a devDependency for local development/preview?
🧹 Nitpick comments (1)
apps/web/src/app/(home)/_components/FeatureCard.tsx (1)

37-45: Consider aligning the light-theme icon list with other components.

The addition of "astro" is correct. However, this component's light-theme icon list (drizzle, prisma, express, astro) is missing some entries present in similar components like tech-icon.tsx and tech-badge.tsx (clerk, planetscale, polar).

This may be intentional if those icons aren't used in FeatureCard, but worth verifying for consistency.

#!/bin/bash
# Check which icons are actually used in FeatureCard contexts to verify if clerk/planetscale/polar are needed
rg -n "FeatureCard" --type=tsx -A 10 | head -100

Comment thread apps/cli/test/addons.test.ts Resolved
@AmanVarshney01
AmanVarshney01 merged commit bebdac0 into main Jan 17, 2026
3 checks passed
@AmanVarshney01
AmanVarshney01 deleted the astro branch January 17, 2026 16:54

This branch was successfully deployed

1 active deployment
Preview — 201db20d Deployed Jan 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant