Skip to content

Quick Start

Quickstart

Get the project running locally in minutes.

  • Node.js 26 LTS (the repo pins it in .node-version; fnm and nvm pick it up)
  • pnpm 12 (corepack enable — the version comes from packageManager in package.json)
  • Cloudflare Account (free tier works)
Terminal window
git clone https://github.com/milzamsz/astro-cloudflare-starter.git
cd astro-cloudflare-starter
pnpm install
Terminal window
cp .env.example .env

Most variables are optional for a static site. Set SITE_URL for correct canonical/OG/sitemap URLs in production.

Terminal window
pnpm dev

Visit http://localhost:4321 — English is served at the root (/). The i18n engine is ready for additional locales when you need them.

Terminal window
pnpm build

The output is in dist/ — ready for Cloudflare Pages deployment.

Terminal window
pnpm lint # oxlint, eslint (.astro), stylelint, type-check (TS 7 + astro check), design KPIs
pnpm test # unit tests (Vitest)
pnpm test:e2e # end-to-end + CSP tests (Playwright, runs against the built site)
pnpm lighthouse # Lighthouse budgets against dist/