Zum Inhalt springen

Production-Ready Astro 6.3 Monorepo Starter

Cloudflare Workers, Tailwind v4, Svelte 5 and everything a modern project needs from the start. MIT-licensed, deploy-ready.

Astro 6.3 Tailwind v4 Svelte 5 TypeScript Cloudflare Workers Biome Zod v4 i18n CSP Playwright pnpm Workspaces MIT

Get Started in Three Steps

1. Clone the repository (or use as a GitHub template)

git clone https://github.com/casoon/astro-v6-template
cd astro-v6-template

2. Install dependencies

pnpm install

3. Start the development server

pnpm dev          # starter app
pnpm dev:blog     # blog app
Requirements: Node.js 22.12.0+ and pnpm 10+

Structure

astro-v6-template/
├── apps/
│   ├── starter/          # Landing page + contact form + i18n
│   └── blog/             # MDX blog + content collections + RSS
├── shared/               # Design tokens, UI components, utilities
├── e2e/
│   ├── starter/          # Playwright E2E tests for starter
│   └── blog/             # Playwright E2E tests for blog
├── biome.json            # Lint + format for the entire workspace
├── pnpm-workspace.yaml
└── package.json          # Workspace root with pnpm catalog

New apps can be added with a folder under apps/. All apps share design tokens and components from the shared package.

What's Inside

Astro 6.3 + Vite 7

New dev server with Vite Environment API. workerd runs locally identical to the production environment on Cloudflare.

Tailwind CSS v4

CSS-first configuration, Vite plugin, OKLCH colors and dark mode. No JavaScript in the config.

Svelte 5 Runes

Reactive islands with the new Runes API ($state, $derived). No unnecessary client JavaScript overhead.

Cloudflare Workers

Cloudflare adapter with sessions via KV, direct access to R2 and Durable Objects – locally and in production.

Biome

One tool for linting and formatting. Fully replaces ESLint + Prettier. Faster, less configuration.

Zod v4

Runtime validation for environments, forms and API routes. Directly integrated into Astro Actions.

Features

pnpm Workspaces Monorepo

starter + blog as standalone apps, shared design tokens and UI components in the shared package.

i18n (en/de)

Multilingual with Astro i18n routing. Default locale without prefix, fully hreflang-compliant.

Content Security Policy

CSP with SHA-256 configured directly in Astro. No external middleware needed.

OG Images

Automatically generated Open Graph images at build time with Satori + resvg.

Astro Actions

Server-side form processing for contact, newsletter and feedback – type-safe with Zod v4.

Playwright E2E

28 tests for both apps including axe-core accessibility scans. Runs automatically in CI.

Post-Build Audit

@casoon/astro-post-audit checks SEO, a11y, links, hreflang and sitemap after every build.

Secret Scanning

@casoon/nosecrets in pre-commit and as manual workspace scan. No secrets in the repository.

Astro Sessions

Server-side session management via Cloudflare KV – fully configured, ready to use immediately.

RSS Feed

The blog app auto-generates an RSS feed at /rss.xml – including all metadata from Content Collections.

Dark Mode

System preference + manual toggle via prefers-color-scheme. OKLCH colors maintain contrast in both modes.

Site Files

@casoon/astro-site-files generates robots.txt, sitemap.xml, llms.txt, security.txt and humans.txt at build time.

Claude Code Integration

CLAUDE.md with project guidelines, skills and MCP server config – ready for AI-assisted development out of the box.

Deployment

Cloudflare Workers

wrangler deploy

The Cloudflare adapter generates worker-compatible output directly. Sessions, KV and R2 are pre-configured.

pnpm build:starter
pnpm deploy:starter
Other Platforms

Swap the Adapter

Astro supports Vercel, Netlify, Node.js and other platforms. Swap the adapter and you're done.

npm install @astrojs/vercel
# change adapter in astro.config.mjs

Suitable for

Marketing Websites
Blog + Content Sites
Agency Starters
Cloudflare Projects
Multi-App Monorepos
Open Source Templates

Why Astro – and why a template?

Astro renders static HTML. JavaScript only reaches the browser where it's explicitly included via an island – the result is fast load times without manual optimization. The Cloudflare adapter generates real Workers that run locally under workerd identically to production.

Anyone starting a new Astro project regularly spends the first days on the same tasks: setting up a monorepo, configuring i18n, setting up CSP, configuring linting, integrating tests. This template does that once and for all – so your first commit contains production code, not boilerplate.

Who is this template for?

Developers who want to skip the setup

Biome, Playwright, i18n, CSP, Cloudflare and post-audit are pre-configured. Your first commit contains production code, not boilerplate.

Agencies & Freelancers

A solid base for all Cloudflare projects. New project – new folder under apps/. The entire toolchain is already there.

Teams with quality requirements

WCAG compliance, secret scanning, E2E tests and build audits are built in from the start – not bolted on later.

Multilingual projects

i18n is part of the architecture from day one: Astro i18n routing, hreflang validation after every build, separate content per locale.

CASOON Open Source Plugins

The template ships with four open source plugins by CASOON – all pre-configured, all MIT-licensed. Together they form a toolchain that automatically catches common quality problems in the Astro workflow.

Build Quality

@casoon/astro-post-audit

Checks SEO, accessibility, hreflang and JSON-LD after every build. Errors block the build before they go live.

Site Files

@casoon/astro-site-files

Generates robots.txt, sitemap.xml with i18n hreflang, llms.txt, security.txt and humans.txt at build time. No manual maintenance.

Security

@casoon/nosecrets

Prevents API keys and tokens from ending up in the repository – as a pre-commit hook and manual workspace scan.

Performance

@casoon/astro-speed-measure

Measures build performance at the level of integrations, Vite plugins and individual pages. JSON baseline and CI summaries included.