OPEN REFERENCE STANDARD

One clean stack. Built to last.

Copy our exact production conventions for Astro, GitHub, and Cloudflare Pages. No proprietary lock-in, no hidden build tooling, and downloadable starter config files you can drop into any repo today.

REFERENCE ARCHITECTURE

Understand every layer of the stack.

4 steps
Step 1 of 4

Astro

Build static output with a reusable layout and a pinned supported runtime.

View architecture
Example preview01
Astro
01Static output
02Shared components
03Build directory

Illustration · not connected to your accounts

Step 2 of 4

GitHub

Keep source, rules and dependency locks together in a repository you own.

View repository structure
Example preview02
GitHub
01README.md
02AGENTS.md
03package-lock.json

Illustration · not connected to your accounts

Step 3 of 4

Cloudflare

Use hosting security headers and redirects while preserving your domain and mail records.

View security configuration
Example preview03
Cloudflare
01public/_headers
02public/_redirects
03HTTPS

Illustration · not connected to your accounts

Step 4 of 4

Adopt the standards

Download the starter configuration files and adapt them to your specific project.

Review config downloads
Example preview04
Adopt the standards
01astro.config.mjs
02_headers
03AGENTS.md

Illustration · not connected to your accounts

ARCHITECTURE DIAGRAM · SEPARATION OF CONCERNS

Keep Domain, Email & Website Separate

1 · YOUR DEEDDomain RegistrarCloudflare / Porkbun~$10–$15 / year2 · DO NOT BREAKBusiness EmailWorkspace / M365MX · SPF · DKIM · DMARC3 · YOUR CODEGitHub RepoAstro / HTML · main$0 / mo · Full history4 · EDGE HOSTCloudflare Pages300+ Global Cities$0 / mo · Auto HTTPSDNS ROUTING RULE:Website launches ONLY update A / CNAME records pointing to Cloudflare Pages.EMAIL SAFETY RULE:Existing MX & TXT (SPF / DKIM / DMARC) records stay untouched — zero email downtime.
Because every piece lives in your own accounts, you can swap editors, AI tools, or hosts anytime without losing your domain, email, or code.

Standard technology matrix

LayerStandard ChoiceWhy
FrameworkAstro (output: 'static')Pre-compiles clean HTML with zero mandatory client JS runtime.
InteractivityVanilla JS (progressive enhancement)Fast load times and zero framework churn over a 5–10 year lifespan.
Source ControlGitHub (production branch main)Full history, pull-request previews, instant revert, and total portability.
Edge HostingCloudflare Pages / Workers Static AssetsGlobal CDN, automatic HTTPS, native _headers & _redirects, $0 free tier.
Forms & Bot DefenseCloudflare Turnstile + Worker/Form endpointZero WordPress database or plugin attack surface.
AccessibilityWCAG 2.2 AA TargetSemantic landmarks, >= 4.5:1 contrast, visible keyboard focus, labeled inputs.

Standard repository structure

Reference Astro repository layout
my-business-website/
├── public/
│   ├── images/
│   ├── favicon.svg
│   ├── robots.txt
│   ├── sitemap.xml
│   ├── _headers
│   └── _redirects
├── src/
│   ├── components/
│   ├── layouts/
│   ├── pages/
│   ├── data/
│   └── styles/
├── .github/workflows/validate.yml
├── .gitignore
├── .node-version
├── AGENTS.md
├── astro.config.mjs
├── package.json
├── package-lock.json
└── README.md

Standard astro.config.mjs

astro.config.mjs
import { defineConfig } from 'astro/config';

export default defineConfig({
  site: 'https://yourbusiness.com',
  output: 'static',
  trailingSlash: 'always',
});

Standard Cloudflare security headers (public/_headers)

public/_headers
/*
  X-Content-Type-Options: nosniff
  Referrer-Policy: strict-origin-when-cross-origin
  X-Frame-Options: DENY
  Permissions-Policy: camera=(), microphone=(), geolocation=()
  Strict-Transport-Security: max-age=31536000; includeSubDomains