Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions specs/epics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ folder is the adoption; the merge creates the epic in the workspace.

| Epic | Cluster | Status | What it is |
|------|---------|--------|------------|
| [`astrowind/`](./astrowind/) | **AW** | In progress (AW0) | Vercel's AstroWind template, built static and served as Cloudflare Workers Static Assets behind one Worker — and an Orun baseline that instantiates it (AW2) |

As-built ≠ intent: what shipped lives in each epic's `IMPLEMENTATION-STATUS.md`.
11 changes: 11 additions & 0 deletions specs/epics/astrowind/IMPLEMENTATION-STATUS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# astrowind — implementation status

| Milestone | State | Landed |
|---|---|---|
| AW0 — the spec | ✅ | the repository's first commit, and this doc set (AW-1) |
| AW1 — the site on Workers | planned | AW-2 |
| AW2 — a baseline | planned | AW-3 |

## Departures from the upstream template

Recorded as they land, from AW1 on.
32 changes: 32 additions & 0 deletions specs/epics/astrowind/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# astrowind — Vercel's AstroWind template on Cloudflare Workers

**AstroWind builds fully static, so the port is where it is served: `dist/`
as Cloudflare Workers Static Assets behind one small Worker, deployed by Orun
to stage and prod on every merge — and the baseline that makes a copy of it
somebody else's site in one landing.**

| | |
|---|---|
| Status | In progress — AW0 on main |
| Upstream | [arthelokyo/astrowind](https://github.com/arthelokyo/astrowind) (MIT), at `14e1a69` (2026-09-12) |
| Reference | [astro-boilerplate](https://github.com/sourceplane/astro-boilerplate) — the same scaffolding, tests and bootstrap |
| Key | `AW` |

## Read in this order

1. [design.md](design.md) — the template, how each Vercel piece maps to
Cloudflare, the repository and the build, and the alternative rejected.
2. [implementation-plan.md](implementation-plan.md) — the milestones and
what each one lands.
3. [risks-and-open-questions.md](risks-and-open-questions.md) — what is not
proven, and what was accepted.
4. [IMPLEMENTATION-STATUS.md](IMPLEMENTATION-STATUS.md) — what shipped, and
every departure from the upstream template.

## Milestones

| Milestone | What it lands | Task |
|---|---|---|
| AW0 — the spec | the repository, its intent, CI, tooling and spec index; this doc set | AW-1 |
| AW1 — the site on Workers | the template in `apps/web`, built static, served as assets behind one Worker | AW-2 |
| AW2 — a baseline | the console card, the build document, the context pack and the baseline's tests | AW-3 |
71 changes: 71 additions & 0 deletions specs/epics/astrowind/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# astrowind — design

## The template

[AstroWind](https://github.com/arthelokyo/astrowind) is a free Astro 7 +
Tailwind CSS 4 template: a home page and four alternative homes (SaaS,
startup, mobile app, personal), about, pricing, services and contact pages,
six landing-page demos (sales, product, pre-launch, lead generation,
subscription, click-through), terms and privacy, and a blog from Markdown
and MDX posts in `src/data/post/` with category and tag pages, related
posts, an RSS feed and a sitemap. Its site name, URL, metadata, blog options
and analytics are `src/config.yaml`, read by a small integration in
`vendor/integration` into a virtual module the components import.

It is `output: 'static'`: every route is HTML at build time. Its README
deploys it to Vercel, Netlify, or Cloudflare Workers as static assets with
no adapter.

## How it maps to Cloudflare

| Vercel | Here | Why |
|---|---|---|
| Static output on Vercel's CDN | `dist/` as Workers Static Assets, uploaded with `<repo>-web-<env>` | The template is static; the assets are the site |
| — | One Worker, `apps/web/worker/index.ts`, hands unmatched requests to the assets | The `cloudflare-workers-assets-turbo` composition deploys a Worker with its assets; a request no file matches reaches it and gets the site's 404 |
| `vercel.json` `cleanUrls`, `trailingSlash: false` | `assets.html_handling: drop-trailing-slash` | `/about` serves `about/index.html`; `/about/` redirects |
| `vercel.json` `/_astro/*` cache header | `public/_headers` (shipped upstream for Netlify and Cloudflare) | The assets upload honours `_headers` |
| Vercel's 404 | `not_found_handling: 404-page` → `dist/404.html` with a 404 | The template's own 404 page |
| Image optimisation | Unchanged: sharp at `astro build`, Unpic for remote CDNs | Nothing is optimised at request time |
| `site: https://astrowind.vercel.app` | `PUBLIC_SITE_URL` per deploy: the environment's `SITE_URL`, else its workers.dev URL; `site:` (`<repo>.example.com`) for a local build | Canonical links, the sitemap and the RSS feed need an origin at build |

## The repository

The same as astro-boilerplate's: `apps/web` is the only component (type
`cloudflare-workers-assets-turbo`, lane `isolated`, deployed on stage and
prod on a push to `main`, verified on dev and on pull requests), its tests
live in the app because Astro components render only under Astro's Vite
config, and there is no infrastructure: no database, no bucket, no runtime
secret. The site's name is one seam, `SITE_NAME` in `src/site.ts`, which the
theme's config builder reads as the site name, the default title and the
title template, so `src/config.yaml` no longer spells it.

This baseline's slug is the template's own name, and the template spells it
in code: its virtual module was `astrowind:config` and its integration was
imported as `astrowind`, which the rename would rewrite into the product's
hyphenated slug (an invalid identifier). Both are `theme` here. Its demo
pages link to `arthelokyo/astrowind` and two of its posts are named for it;
the rename engine masks those as the template's credit.

## The build

`repo-blueprint.yaml` is astro-boilerplate's: one landing (`01-product`)
places, brands and lands the whole tree, one convergence builds and deploys
stage and prod side by side, and `03-docs` records what went live. The
smoke checks the home page is the template's, that `/blog` lists its posts,
and that an unknown path is a 404.

## Out of scope

- A CMS: the template documents Decap CMS (`public/decapcms`), which needs a
Git gateway and an identity provider; it ships, unconfigured.
- Form handling: the contact and lead-generation forms post nowhere, as
upstream. The Worker is where a handler would go.

## The alternative rejected

**Astro's Cloudflare adapter**, as astro-boilerplate uses. It would move the
build's prerendering into workerd through the Cloudflare Vite plugin, emit a
server entry nothing calls, generate a second wrangler config the e2e tier
would have to hold to the committed one, and take image optimisation out of
Node — all for a site with no on-demand route. A static build with a Worker
in front of it is what the template's own README describes.
30 changes: 30 additions & 0 deletions specs/epics/astrowind/epic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# The epic's declaration. metadata.name equals the directory name; metadata.key
# is the task-key prefix this epic reserves (AW → AW-1, AW-2, …). Owner, target
# date and health are the platform's — never written here.
apiVersion: orun.io/v1
kind: Epic
metadata:
name: astrowind
key: AW
spec:
title: "Vercel's AstroWind template on Cloudflare Workers"
summary: "AstroWind — a free Astro + Tailwind CSS marketing site and blog (home, about, pricing, services and contact pages, landing and home demos, a Markdown/MDX blog with categories, tags, RSS and a sitemap) — builds fully static and is served as Cloudflare Workers Static Assets behind one small Worker, inside the Cirrus baseline's repository conventions, and becomes an Orun baseline that takes a new site from nothing to live on stage and prod in one landing."
state: started
milestones:
- name: "AW0 — the spec"
exitCriteria:
- "the repository is born with its intent, CI, tooling and spec index, and this doc set and the task contracts are on main"
tasks: [AW-1]
- name: "AW1 — the site on Workers"
exitCriteria:
- "apps/web is the upstream template, built static, with one Worker in front of dist/ as Workers Static Assets"
- "`pnpm typecheck`, `pnpm lint`, `pnpm test` and `pnpm build` are green"
- "`wrangler dev` serves every page, post, demo, feed and sitemap, clean URLs, the immutable asset cache and the site's own 404"
- "the README says how to run, test, preview and deploy it, and how every Vercel piece maps to Cloudflare"
tasks: [AW-2]
- name: "AW2 — a baseline"
exitCriteria:
- "blueprint.yaml (the console card) and repo-blueprint.yaml (the build) take a new site from nothing to live on stage and prod in one landing, then record it"
- "a site built from it carries the site only, renamed throughout to its own name, repository and Worker, with the template's credit intact"
- "Baseline CI is green: contract tests, generated component docs, the blueprint read by the pinned orun, the leak gate, the offline bootstrap and the end-to-end tier"
tasks: [AW-3]
34 changes: 34 additions & 0 deletions specs/epics/astrowind/implementation-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# astrowind — implementation plan

Three milestones, each one reviewed pull request (AW0 is the repository's
first commit), each green before it merges.

## AW0 — the spec (AW-1)

The repository is born: `intent.yaml` with the placeholder workspace
`ws_CHANGE_ME`, `ci.yml` (byte for byte turso-starter's, which plans nothing
until the workspace is set), the shared TypeScript and ESLint configuration,
the spec index, this doc set and the task contracts.

## AW1 — the site on Workers (AW-2)

- The template's `src/`, `public/`, `vendor/`, `astro.config.ts`, ESLint and
Prettier configuration in `apps/web`, its dependencies in
`apps/web/package.json`, its npm `overrides` as pnpm `overrides`.
- `worker/index.ts` and `wrangler.jsonc`: the Worker in front of `dist/`,
clean URLs, the 404 page.
- The site's name in `src/site.ts`, read by the theme's config builder; the
theme's virtual module and integration renamed `theme`.
- `component.yaml`: the deploy contract and its smoke.
- Tests (`src/test`): the name seam, the header, the Worker.
- The README's "How it maps to Vercel".

## AW2 — a baseline (AW-3)

astro-boilerplate's machinery, renamed: `blueprint.yaml`,
`repo-blueprint.yaml`, `.baseline/` (identity, product README, task
contracts), `tooling/rebrand` (with the template's credit masked),
`tooling/bootstrap`, `hooks/render-deployment-docs.sh` (probing `/` and
`/blog`), `docs/phases/`, the context pack, `testing/` (the leak and
placement gates on this tree's files; the e2e tier reading every route the
site promises) and `baseline.yml` / `tag.yml`.
11 changes: 11 additions & 0 deletions specs/epics/astrowind/risks-and-open-questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# astrowind — risks and open questions

| ID | Risk | State | Notes |
|---|---|---|---|
| AW-A | `baseline-v1` is not yet proven live | OPEN | Proven offline in Baseline CI: the offline bootstrap with the blueprint's own hooks, the stage lane's own steps in a staged job tree, the site served by `wrangler dev` and smoke-tested with the component's own command. A console bootstrap closes it |
| AW-B | A Worker in front of a static site | ACCEPTED | The composition deploys a Worker with its assets; this one only hands unmatched requests back to the assets. It costs nothing a request that matches a file pays: those are served without reaching it |
| AW-C | Absolute links are built in, per environment | ACCEPTED | Canonical links, the sitemap and the RSS feed carry the origin the deploy built for: the environment's `SITE_URL` (a custom domain), else its workers.dev URL. Attaching a domain is setting `SITE_URL` and merging; a local build uses `src/config.yaml`'s `site:` |
| AW-D | The tests live in the app | ACCEPTED | Astro components render only under Astro's Vite config (the container API); a `tests/web` package would need it anyway |
| AW-E | The build fetches its font over the network | ACCEPTED | Astro's Fonts API downloads Inter from Fontsource at build time, as upstream; every lane has the network |
| AW-F | stack-tectonic 0.19.0, not 0.20.0 | ACCEPTED | 0.20.0's lane-shared install links each job's `node_modules` out of its tree; the siblings pin 0.19.0 for it and the site would save nothing |
| AW-G | The slug is the template's own name | RESOLVED | The theme's module and integration are `theme`; the template's credit (its repository, two post URLs) is masked from the rename and allowed in the leftover sweep. `testing/rebrand.test.sh` holds both |
15 changes: 15 additions & 0 deletions tasks/AW-1.TaskContract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: orun.io/v1
kind: TaskContract
metadata:
name: AW-1
title: "The spec"
spec:
goal: The astrowind repository is born with its intent, CI, tooling and spec index, and the astrowind epic — declaration, doc set and task contracts — is on main
affects:
- specs/epics/astrowind
- specs/epics/README.md
- tasks
doneWhen:
- epic.yaml, README, design, implementation plan, risks and status are on main
- the three task contracts exist
gates: []
17 changes: 17 additions & 0 deletions tasks/AW-2.TaskContract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: orun.io/v1
kind: TaskContract
metadata:
name: AW-2
title: "The site on Workers"
spec:
goal: AstroWind runs on Cloudflare Workers + Static Assets — built static, served as assets behind one Worker — with its README saying how it maps to Vercel
affects:
- apps/web
- pnpm-lock.yaml
- pnpm-workspace.yaml
- README.md
- .gitignore
doneWhen:
- pnpm typecheck, lint, test and build are green
- wrangler dev serves every route the template has, its 404 and its asset cache header
gates: []
28 changes: 28 additions & 0 deletions tasks/AW-3.TaskContract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: orun.io/v1
kind: TaskContract
metadata:
name: AW-3
title: "astrowind becomes an Orun baseline"
spec:
goal: blueprint.yaml and repo-blueprint.yaml take a new AstroWind site from nothing to live on stage and prod in one landing, held by Baseline CI
affects:
- blueprint.yaml
- repo-blueprint.yaml
- BOOTSTRAP.md
- .baseline
- .github/workflows/baseline.yml
- .github/workflows/tag.yml
- ai/context
- docs/phases
- hooks
- testing
- tooling/rebrand
- tooling/bootstrap
- tooling/catalog
- apps/web/docs
- specs/epics/astrowind
- README.md
doneWhen:
- every Baseline CI tier is green
- a site placed from it carries the site only, branded, with the template's credit intact
gates: []
Loading