Compare commits

..
Author SHA1 Message Date
chrnx 6e78fce659 chore: version to CalVer 26.7.0-beta.0
CI / build (pull_request) Successful in 18s
Aligns website with the org-wide CalVer scheme; every package's first tag is v26.7.0-beta.0 (no production yet).

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-18 15:00:16 -05:00
chrnx deac98a63c Merge pull request 'ci: build gate + promote + release workflows (two-forge)' (#1) from chore/ci-workflows into main
CI / build (push) Successful in 12s
Promote → GitHub / push-github (push) Successful in 7s
2026-07-18 18:53:56 +00:00
chrnx f65fc3742c ci: bump Node to 22 (Astro 7 requires >=22.12)
CI / build (pull_request) Successful in 19s
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-18 13:51:08 -05:00
chrnx 92815796e6 ci: add build gate + promote + release workflows (two-forge)
CI / build (pull_request) Failing after 24s
ci.yml: astro build on PR/push to main. promote.yml (Gitea-only): mirror main + tags to Expressive-Tea/green-tea-site. release.yml (GitHub-only): on a v* tag, build and attach dist as a .tar.gz to the GitHub release for the cPanel deploy.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-18 13:47:50 -05:00
chrnx f52d493ea1 docs(blog): honest benchmarks — what a real network does to "faster"
Over two real machines the throughput race compresses and the server sits idle; the runtime-agnostic edge (Bun/Deno ~1.6x Node, same app) is the part no Node-only framework can show; and the O(n^2) I found and fixed in my own pipeline while stress-testing.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 19:09:39 -05:00
chrnx 731631ecd5 feat(site): email launch-list capture with a PHP/MySQL endpoint
A signup form in the closing section posts to subscribe.php (ships in the build): PDO/MySQL, honeypot, idempotent insert, optional mail() notify. DB creds live in a gitignored config kept above the web root; schema and setup in server/.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 19:09:39 -05:00
chrnx 7f4b6c3092 feat(site): sharpen the hero, intent-keyword titles, and a beta FAQ
Hero H1 leads with the differentiator (a graph, not a middleware chain) instead of three adjectives; page titles carry search-intent keywords; a beta-scoped FAQ answers production-readiness, Express migration, performance and dependency questions; the footer credits the Expressive Tea Team.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 19:09:39 -05:00
chrnx af376a26b4 feat(site): add a How-it-compares table so the difference lands
The landing explained what Green Tea is but never set it beside Express,
Fastify, or NestJS — so 'it's different' was told, not shown, and it read
like one more framework. The core README already carries an honest
comparison; this lifts its most load-bearing rows (pipeline model, does
req.user exist, seeing the pipeline, real-time, runtimes, deps) into a
curated four-column table with the Green Tea column lit.

Responsive: the table scrolls inside its own overflow-x container so the
page body never scrolls sideways on mobile. Copy is pulled from the
verified README rows — nothing new claimed.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 10:35:59 -05:00
chrnx e083f244c0 docs(site): sell real-time and the graph honestly
Two claims a skeptic would catch. RealTime still said 'return an
AsyncIterable' with no mention of declaring the transport — the same
implicit-return the framework now rejects with TransportMismatchError; the
honest version (declare the transport, the contract is never a surprise)
sells harder anyway. And GraphNotChain's 'no one else has the graph' invited
the obvious 'Angular and Nest have a DI graph' — so say the real,
unrefutable thing: they resolve a graph of services, this resolves your
request pipeline. Same fix in the founder post.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 10:16:47 -05:00
chrnx 482bbab0ae docs(site): move to green-tea.expressive-tea.io, docs at /docs
The site hangs off the expressive-tea.io cPanel now, not the placeholder
.dev domain. Docs live at /docs on the same subdomain (a separate build,
not a nested sub-subdomain), so every cross-link to the docs points there.
robots.txt sitemap and the README deploy steps follow — cPanel upload, two
folders, one cert.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 10:13:18 -05:00
chrnx f274a7cbe7 docs(site): point at the real GitHub org, and admit what the edge can't do
Green Tea ships under the Expressive-Tea org — the framework it grew out
of lives there, and the founder story the launch post tells is easier to
follow when both are in the same house. The green-tea-dev placeholder was
never going to exist.

RunsEverywhere claimed the same src/ runs everywhere, full stop. It
doesn't: the edge has no filesystem, so file-backed views and static
serving don't go. A landing page that oversells gets found out on day
one, and this project's whole pitch is that it tells you the truth.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 09:36:57 -05:00
chrnx e3cb7f1d90 chore: untrack internal specs and SDD ledger (gitignored)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 21:18:01 -05:00
chrnx c349dbd514 fix: post date off-by-one and inconsistent placeholder links
Post/blog-index dates formatted pubDate in the local timezone, so a
UTC-midnight date like 2026-07-10 rendered as July 9 anywhere west
of UTC. Format with timeZone: 'UTC' to match the stored date.

Also normalizes the npm package to @green-tea/core everywhere (Header
and Footer still pointed at @expressive-tea/core) and settles on a
single GitHub placeholder (https://github.com/green-tea-dev/green-tea)
across Header, Footer, Hero, and HonestBeta — documented in the README
as unconfirmed until launch. Docs CTAs in Hero and HonestBeta now open
in a new tab with rel="noopener noreferrer", matching Header/Footer.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 19:21:26 -05:00
chrnx 383c859666 polish: 404 page, branded OG image, robots.txt, README
Rounds out the site for launch: a calm branded 404 (with the graph
motif and a way back home), a proper 1200x630 OG/Twitter card so
shared links look right, robots.txt pointing at the sitemap, and a
README covering local dev and the manual Cloudflare Pages deploy
flow (no deploy CI is configured).

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 19:21:18 -05:00
chrnx ca7cfab246 content(blog): launch post — why I rebuilt my framework
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 19:15:24 -05:00
chrnx 4f131eba43 feat(blog): content collection, index, post layout, RSS
Adds the blog system ahead of the launch post: a zod-typed `blog`
content collection (content layer glob loader), a card-list index
with a calm empty state, the post route/layout with reading time,
and an RSS feed — all wired to the existing Base shell and palette.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 19:11:19 -05:00
chrnx 479a3012c4 feat: landing page — the pitch (graph, runtime-agnostic, real-time, batteries)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 19:02:25 -05:00
chrnx 0969882f97 chore: scaffold Astro site + brand shell (header, footer, layout, motif)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 18:52:47 -05:00
chrnx c064791675 docs: site design + implementation plan
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-10 18:48:25 -05:00
44 changed files with 1027 additions and 4115 deletions

No files matched your search

-58
View File
@@ -1,58 +0,0 @@
name: Dependency audit
# Weekly, on GITEA ONLY — this is maintenance, so it belongs in the internal tracker.
#
# This is the counterpart that makes release.yml's relaxed gate safe rather than
# negligent. Advisories still get found; they just arrive as an issue on Monday
# morning instead of as a failed release on a Friday afternoon. Learning about a
# vulnerability and being unable to publish should not be the same event.
on:
schedule:
- cron: '0 13 * * 1' # Mondays, 07:00 America/Mexico_City
workflow_dispatch: # so it can be run — and tested — on demand
jobs:
audit:
if: ${{ github.server_url != 'https://github.com' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '22'
check-latest: true # the runner's cached 22 can lag behind Astro's minimum
- run: npm ci
- name: Audit
id: audit
run: |
if npm audit --audit-level=moderate > audit.txt 2>&1; then
echo 'clean=true' >> "$GITHUB_OUTPUT"
else
echo 'clean=false' >> "$GITHUB_OUTPUT"
fi
cat audit.txt
- name: File an issue
if: steps.audit.outputs.clean == 'false'
env:
GT_TOKEN: ${{ github.token }}
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
TITLE: 'Dependency advisories: npm audit is failing'
run: |
set -eu
# One open issue at a time. A weekly cron must not file 52 duplicates.
open=$(curl -sSL -H "Authorization: token $GT_TOKEN" \
"$API/issues?state=open&type=issues" \
| jq --arg t "$TITLE" '[.[] | select(.title == $t)] | length')
if [ "$open" != "0" ]; then
echo "An issue is already open. Nothing to file."
exit 0
fi
body=$(printf '`npm audit --audit-level=moderate` failed on the scheduled run.\n\nThe release gate does not fail on this by design — see the comment in `release.yml`. A static site ships built HTML, not `node_modules`, so a build-time advisory does not reach a visitor. This issue is how it reaches you instead.\n\nFix it in a normal PR, on your own schedule.\n\n```\n%s\n```\n' "$(head -c 4000 audit.txt)")
jq -n --arg t "$TITLE" --arg b "$body" '{title: $t, body: $b}' \
| curl -sS -X POST -H "Authorization: token $GT_TOKEN" \
-H 'Content-Type: application/json' -d @- "$API/issues" > /dev/null
echo "Issue filed."
+3 -13
View File
@@ -7,23 +7,13 @@ on:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
check-latest: true # the runner's cached 22 can lag behind Astro's minimum
- run: npm ci
# Only a critical advisory blocks, as in release.yml. The site ships built files, not
# node_modules; a build-time advisory with no published fix would otherwise block every PR.
# audit.yml still files an issue for moderate and up, and the full report prints here.
- run: npm audit --audit-level=critical
- run: npm audit
continue-on-error: true
- run: npm run check
- run: npm run build
+4 -9
View File
@@ -1,12 +1,6 @@
name: Promote → GitHub
# Runs on GITEA ONLY. Mirrors main, and each version tag as it is created, to the public GitHub
# repo. On GitHub a v* tag runs release.yml, which attaches the dist.tar.gz the cPanel deploy uses.
#
# A tag is pushed only on its own event, by name. The branch push used to add `git push --tags`,
# which is refused whenever any old tag points at different objects on the two forges
# (v26.8.1-beta.0 and v26.8.2-beta.0 do), so every promotion of main went red even though main had
# already arrived.
# Runs on GITEA ONLY. Mirrors only main + version tags to the public GitHub repo.
on:
push:
branches: [main]
@@ -17,10 +11,10 @@ jobs:
if: ${{ github.server_url != 'https://github.com' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push main or the new tag to GitHub
- name: Push main + tags to GitHub
env:
GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }}
run: |
@@ -29,4 +23,5 @@ jobs:
git push github "refs/tags/${{ github.ref_name }}"
else
git push github "HEAD:refs/heads/main"
git push github --tags
fi
+6 -26
View File
@@ -10,37 +10,17 @@ on:
jobs:
package:
if: ${{ github.server_url == 'https://github.com' }}
permissions:
contents: write
runs-on: ubuntu-latest
env:
ARCHIVE_NAME: green-tea-site-${{ github.ref_name }}.tar.gz
RELEASE_TAG: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
check-latest: true # the runner's cached 22 can lag behind Astro's minimum
- name: Validate release tag
run: npm run verify:release
- run: npm ci
# Deliberately `critical`, not `moderate`. npm audit reads a live advisory feed,
# so a release gated on it fails by calendar date rather than by anything the
# release changed — and it fails at the exact moment there is least time to judge
# whether a fix is safe. What ships here is built HTML, CSS and JS: Astro, js-yaml
# and friends are build-time tools that never reach a visitor. `critical` keeps a
# tripwire for the catastrophic case without breaking releases on routine noise.
# ci.yml gates every PR the same way, and audit.yml files an issue for moderate and up on a
# schedule, so advisories still surface — just not as a broken release.
- run: npm audit --audit-level=critical
- run: npm run check
- run: npm run build
- name: Package dist/
run: tar -czf "$ARCHIVE_NAME" -C dist .
- name: Verify .htaccess in archive
run: tar -tzf "$ARCHIVE_NAME" | grep -Fx './.htaccess'
run: tar -czf "green-tea-site-${{ github.ref_name }}.tar.gz" -C dist .
- name: Attach to GitHub release
uses: softprops/action-gh-release@v3
uses: softprops/action-gh-release@v2
with:
prerelease: true
files: ${{ env.ARCHIVE_NAME }}
files: green-tea-site-${{ github.ref_name }}.tar.gz
-3
View File
@@ -11,9 +11,6 @@ node_modules/
.superpowers/
.specs/
# isolated feature worktrees
.worktrees/
# environment variables
.env
.env.production
@@ -1,72 +0,0 @@
# SEO and performance improvement design
Date: 2026-08-02
## Goal
Make the public site easier for search engines to understand and faster on a cold mobile load. Preserve the current visual design, static Astro architecture, and two-forge release flow.
## Baseline
Lighthouse 13 measured the deployed home page at 96 performance, 96 accessibility, 100 best practices, and 100 SEO on mobile. The desktop scores were 95, 96, 100, and 100. Mobile FCP and LCP were 2.3 seconds, TBT was 0 milliseconds, and CLS was 0.001.
The audit found five material gaps:
- Google Fonts blocks rendering and accounts for about 990 milliseconds of estimated savings.
- Hashed CSS and SVG assets have no explicit browser cache lifetime.
- HTTP serves a second working copy instead of redirecting to HTTPS.
- Pages lack product and article structured data.
- Two text treatments fail WCAG color contrast checks.
The sitemap, canonical URLs, robots file, HTTPS pages, and real 404 status already work.
## Design
### Metadata and structured data
Extend `Base.astro` with explicit page type, robots, publication metadata, and JSON-LD inputs. The home page will describe Green Tea as a software application and website. Blog posts will emit `BlogPosting` data, `og:type=article`, publication and modification dates, author, and tags. The 404 page will emit `noindex, follow`.
Keep canonical URLs derived from `Astro.site`. Serialize structured data from trusted build-time objects and render it as an `application/ld+json` script.
### Font delivery and accessibility
Remove the Google Fonts stylesheet from the page and unused Starlight brand imports from the marketing site's global CSS. Host only the WOFF2 files required for Zen Maru Gothic weights 500 and 700 under `public/fonts`, declare them with `font-display: swap`, and preload only the heading face needed above the fold.
Adjust the muted runtime caveat and syntax-comment colors until Lighthouse reports sufficient contrast. Do not change layout, spacing, copy, or component structure.
### Apache behavior
Add `public/.htaccess` so Astro copies it to `dist/.htaccess`. It will:
- redirect HTTP requests to the same HTTPS URL;
- assign a long immutable cache lifetime to hashed `/_astro/` assets;
- assign shorter cache lifetimes to fonts and static images;
- enable compression when the host provides `mod_deflate` or `mod_brotli`;
- avoid changing routes or the existing 404 behavior.
Every directive that depends on an optional Apache module will use an `IfModule` guard. The release must remain compatible with the current cPanel Apache host.
### Release boundary
GitHub remains the only forge that packages a production artifact. `.github/workflows/release.yml` already restricts its package job to `github.com` and creates `green-tea-site-<tag>.tar.gz` with `tar -C dist .`, which includes dotfiles.
Add a release validation step after the build that fails unless `dist/.htaccess` exists. Gitea will continue to run the shared build gate and promotion workflow, but it will not package or publish a release artifact.
## Verification
Run a clean production build and verify:
- `dist/.htaccess` exists and appears in a locally created tar listing;
- every indexable page has one canonical URL, description, and valid JSON-LD;
- the 404 page has `noindex, follow`;
- the sitemap lists only indexable public pages;
- no generated page requests Google Fonts;
- internal production links return expected statuses;
- Lighthouse mobile and desktop improve or hold their baseline scores;
- Lighthouse reports no automated SEO or contrast failures.
The final report will separate local build results from behavior that requires the new artifact to be deployed on Apache.
## Non-goals
This change will not redesign the site, add analytics, create keyword-stuffed copy, submit the site to Search Console, modify the documentation build under `/docs`, or create release archives in Gitea.
@@ -1,366 +0,0 @@
# SEO and Performance Improvements Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Improve search-engine metadata, remove the render-blocking font dependency, fix automated contrast failures, and ship Apache redirects and caching inside the GitHub release artifact.
**Architecture:** Keep Astro's static output and extend the existing base layout with typed metadata and build-time JSON-LD. Vendor the two Latin WOFF2 font files, copy Apache configuration from `public/`, and verify generated HTML with a dependency-free Node script. Preserve the shared Gitea/GitHub build gate while keeping production packaging exclusive to GitHub.
**Tech Stack:** Astro 7, TypeScript, plain CSS, Node.js assertions, Apache `.htaccess`, GitHub Actions, Lighthouse 13.
---
### Task 1: Add a failing generated-site verifier
**Files:**
- Create: `scripts/verify-build.mjs`
- Modify: `package.json`
**Step 1: Create the verifier**
Write a Node script that reads `dist/index.html`, `dist/404.html`, the blog index, and every generated blog post. Use `node:assert/strict` to require:
- one canonical URL and one meta description per HTML page;
- parseable JSON-LD on the home page and each blog post;
- `SoftwareApplication` in the home JSON-LD graph;
- `BlogPosting`, article Open Graph metadata, dates, and author on each post;
- `noindex, follow` on the 404 page;
- no reference to `fonts.googleapis.com` or `fonts.gstatic.com`;
- a generated `dist/.htaccess` file.
The script should end with `Verified generated SEO and deploy metadata.` and exit nonzero on the first failed assertion.
**Step 2: Add build-check scripts**
Add these entries to `package.json`:
```json
"check": "npm run build && npm run verify:build",
"verify:build": "node scripts/verify-build.mjs"
```
**Step 3: Run the verifier against the current build**
Run: `npm run build && npm run verify:build`
Expected: FAIL because the current output has no JSON-LD and no `dist/.htaccess`.
**Step 4: Commit the failing verifier**
```bash
git add package.json scripts/verify-build.mjs
git commit -m "test: verify generated SEO metadata"
```
### Task 2: Add typed global and home-page SEO metadata
**Files:**
- Modify: `src/layouts/Base.astro`
- Modify: `src/pages/index.astro`
**Step 1: Extend the base layout contract**
Add these optional props:
```ts
type OpenGraphType = 'website' | 'article';
type StructuredData = Record<string, unknown>;
interface Props {
title?: string;
description?: string;
image?: string;
ogType?: OpenGraphType;
robots?: string;
publishedTime?: Date;
updatedTime?: Date;
author?: string;
tags?: string[];
structuredData?: StructuredData;
}
```
Default `ogType` to `website` and `robots` to `index, follow`. Convert the canonical and image URLs to strings before using them in metadata.
Emit:
```astro
<meta name="robots" content={robots} />
<meta property="og:type" content={ogType} />
{
ogType === 'article' && (
<>
{publishedTime && <meta property="article:published_time" content={publishedTime.toISOString()} />}
{updatedTime && <meta property="article:modified_time" content={updatedTime.toISOString()} />}
{author && <meta property="article:author" content={author} />}
{tags?.map((tag) => <meta property="article:tag" content={tag} />)}
</>
)
}
{structuredData && (
<script
type="application/ld+json"
set:html={JSON.stringify(structuredData).replace(/</g, '\\u003c')}
/>
)}
```
Keep the existing title, description, canonical, Open Graph image, Twitter card, RSS, favicon, and generator metadata.
**Step 2: Add home-page JSON-LD**
In `src/pages/index.astro`, construct a single `@context` object with an `@graph` containing:
- a `WebSite` node with the canonical URL, name, and page description;
- a `SoftwareApplication` node with name, description, application category, cross-platform operating system, canonical URL, repository URL, MIT license URL, and a zero-price `Offer`.
Pass that object through `structuredData` on `<Base>`.
**Step 3: Build and inspect the home page**
Run: `npm run build`
Expected: PASS. `dist/index.html` contains one canonical tag, `robots=index, follow`, and parseable JSON-LD containing `WebSite` and `SoftwareApplication`.
**Step 4: Commit global and home metadata**
```bash
git add src/layouts/Base.astro src/pages/index.astro
git commit -m "feat: add structured product metadata"
```
### Task 3: Add article metadata and exclude the 404 page
**Files:**
- Modify: `src/layouts/Post.astro`
- Modify: `src/pages/404.astro`
**Step 1: Construct article JSON-LD**
In `Post.astro`, derive absolute canonical and hero-image URLs from `Astro.url.pathname` and `Astro.site`. Create a `BlogPosting` object containing:
```ts
const structuredData = {
'@context': 'https://schema.org',
'@type': 'BlogPosting',
headline: title,
description,
image: absoluteHeroImage,
datePublished: pubDate.toISOString(),
dateModified: (updatedDate ?? pubDate).toISOString(),
author: { '@type': 'Person', name: author },
publisher: { '@type': 'Organization', name: 'Expressive Tea Team' },
mainEntityOfPage: canonicalURL,
keywords: tags?.join(', '),
};
```
Pass `ogType="article"`, dates, author, tags, and `structuredData` to `Base`.
**Step 2: Mark the 404 page for exclusion**
Pass `robots="noindex, follow"` to `Base` in `src/pages/404.astro`.
**Step 3: Build and inspect posts and 404 output**
Run: `npm run build`
Expected: PASS. Each post contains article metadata and parseable `BlogPosting` JSON-LD. `dist/404.html` contains `noindex, follow` and no indexable structured-data entity.
**Step 4: Commit article and 404 metadata**
```bash
git add src/layouts/Post.astro src/pages/404.astro
git commit -m "feat: describe blog posts to search engines"
```
### Task 4: Self-host the heading font and fix contrast
**Files:**
- Create: `public/fonts/zen-maru-gothic-latin-500.woff2`
- Create: `public/fonts/zen-maru-gothic-latin-700.woff2`
- Create: `public/fonts/OFL.txt`
- Modify: `src/layouts/Base.astro`
- Modify: `src/styles/global.css`
- Modify: `src/components/sections/RunsEverywhere.astro`
- Modify: `src/components/sections/SeeIt.astro`
**Step 1: Vendor the exact Latin font files**
Download the Google Fonts v19 Latin WOFF2 assets and the Zen Maru Gothic OFL license. Record and verify these SHA-256 hashes:
```text
2c5953da616e5e6dcad34ae8b744f7e759f1647c041389681fa2360908508d55 zen-maru-gothic-latin-500.woff2
9d65f92a3e11edcef9d73694b5b73cb6888243aee54e8034b162eb368c6ff3ed zen-maru-gothic-latin-700.woff2
```
**Step 2: Declare local font faces**
Remove `@import './brand.css';` from `src/styles/global.css`. Add two `@font-face` rules using the local files, `font-style: normal`, weights 500 and 700, `font-display: swap`, and the Latin unicode range supplied by Google Fonts.
The detached `src/styles/brand.css` belongs to the separate Starlight docs theme and must not load in this marketing build.
**Step 3: Remove the external font connection**
Delete the Google Fonts preconnect and stylesheet tags from `Base.astro`. Add one preload:
```astro
<link
rel="preload"
href="/fonts/zen-maru-gothic-latin-700.woff2"
as="font"
type="font/woff2"
crossorigin
/>
```
**Step 4: Fix both Lighthouse contrast findings**
Remove `opacity: 0.75` from `.runs__caveat` so it inherits the accessible `--dim` color at full opacity. Change the Astro `Code` theme in `SeeIt.astro` from `github-dark` to `github-dark-high-contrast`.
**Step 5: Build and check output dependencies**
Run: `npm run build && ! rg 'fonts\\.(googleapis|gstatic)\\.com' dist`
Expected: PASS. The font files exist under `dist/fonts`, and no generated page references Google-hosted fonts.
**Step 6: Commit font and contrast changes**
```bash
git add public/fonts src/layouts/Base.astro src/styles/global.css \
src/components/sections/RunsEverywhere.astro src/components/sections/SeeIt.astro
git commit -m "perf: self-host heading fonts"
```
### Task 5: Ship Apache behavior in the static build
**Files:**
- Create: `public/.htaccess`
**Step 1: Add the canonical HTTPS redirect**
Use `mod_rewrite` under `IfModule`. When `%{HTTPS}` is not `on`, redirect with status 301 to `https://green-tea.expressive-tea.io%{REQUEST_URI}`. Use `NE` and `L` flags.
**Step 2: Add guarded caching and compression**
Under guarded `mod_expires` and `mod_headers` blocks:
- cache fingerprinted CSS, JavaScript, SVG, and image assets for one year with `immutable`;
- cache WOFF2 files for one year;
- cache ordinary images and icons for seven days;
- mark HTML as immediately stale with `public, max-age=0, must-revalidate`.
Use `mod_deflate` for HTML, CSS, JavaScript, JSON, XML, SVG, and plain text. Do not add rewrites for Astro routes.
**Step 3: Verify Astro copies the dotfile**
Run: `npm run check`
Expected: PASS and print `Verified generated SEO and deploy metadata.` Confirm `test -f dist/.htaccess` exits zero.
**Step 4: Commit Apache configuration**
```bash
git add public/.htaccess
git commit -m "perf: ship Apache caching and HTTPS redirect"
```
### Task 6: Keep packaging exclusive to GitHub and enforce the artifact contract
**Files:**
- Modify: `.github/workflows/ci.yml`
- Modify: `.github/workflows/release.yml`
**Step 1: Run generated-output checks in the shared build gate**
Replace `npm run build` with `npm run check` in `ci.yml`. This check may run on GitHub and Gitea; it creates no release artifact.
**Step 2: Verify the release archive in the GitHub-only job**
Keep the existing job condition:
```yaml
if: ${{ github.server_url == 'https://github.com' }}
```
Replace the release build command with `npm run check`. After packaging, add:
```yaml
- name: Verify package contents
run: tar -tzf "green-tea-site-${{ github.ref_name }}.tar.gz" | grep -Fx './.htaccess'
```
Do not change `.github/workflows/promote.yml` and do not add a Gitea artifact job.
**Step 3: Inspect the workflow diff**
Run: `git diff --check && git diff -- .github/workflows/ci.yml .github/workflows/release.yml`
Expected: both workflows use `npm run check`; only `release.yml` contains `tar`, `softprops/action-gh-release`, and the `github.com` job guard.
**Step 4: Commit workflow verification**
```bash
git add .github/workflows/ci.yml .github/workflows/release.yml
git commit -m "ci: verify the GitHub release artifact"
```
### Task 7: Run final build and Lighthouse verification
**Files:**
- Modify if needed: files changed in Tasks 1-6
**Step 1: Run repository checks**
Run:
```bash
npm run check
git diff --check
```
Expected: both commands pass.
**Step 2: Reproduce the GitHub archive locally**
Run:
```bash
tar -czf /tmp/green-tea-site-seo-audit.tar.gz -C dist .
tar -tzf /tmp/green-tea-site-seo-audit.tar.gz | grep -Fx './.htaccess'
```
Expected: `./.htaccess`.
**Step 3: Serve the production build**
Run: `npm run preview -- --host 127.0.0.1`
Keep the preview process running for the next two steps.
**Step 4: Run mobile Lighthouse**
Run Lighthouse 13 against `http://127.0.0.1:4321/` with mobile simulated throttling and JSON output.
Expected: 100 SEO, 100 best practices, no color-contrast failure, no Google Fonts request, TBT of 0 milliseconds, and performance at or above the deployed baseline of 96 when measured under equivalent settings.
**Step 5: Run desktop Lighthouse**
Run Lighthouse 13 with the desktop preset.
Expected: 100 SEO, 100 best practices, no color-contrast failure, and performance at or above the deployed baseline of 95 when measured under equivalent settings.
**Step 6: Inspect generated metadata and Git state**
Run:
```bash
rg -n 'application/ld\\+json|article:published_time|noindex, follow' dist/index.html dist/blog dist/404.html
git status --short --branch
```
Expected: all metadata is present and only intentional changes remain.
**Step 7: Commit any verification-driven correction**
If Lighthouse required a correction, stage only that correction and commit it with a focused message. Do not create an empty verification commit.
@@ -1,46 +0,0 @@
# Green Tea Site 26.8.0-beta.0 Release Design
## Goal
Publish an accurate release story for Green Tea `26.8.0-beta.0` and make the
site artifact impossible to tag with a version that disagrees with
`package.json`.
## Release flow
Development happens on `feature/26.8.0-beta.0-release` in Gitea. A pull request
merges the branch into Gitea `main`; the existing promotion workflow mirrors
that commit to GitHub. Only after promotion is complete is
`v26.8.0-beta.0` created on GitHub. The GitHub tag builds and attaches
`green-tea-site-v26.8.0-beta.0.tar.gz` to the release.
No tag is created in Gitea and no `develop` branch is introduced for this site.
## Content
The release post will explain the safe constrained-route subset, deterministic
route precedence, strict path validation, HEAD and OPTIONS semantics, OpenAPI
projection, runtime parity, and dependency remediation. It will explicitly say
that route matching remains a linear scan and that a radix tree is future work.
Landing-page corrections stay narrow: name the four validated targets instead
of claiming every JavaScript runtime, distinguish zero validation-library
dependencies from the single runtime dependency, and qualify transport security
features that differ by runtime.
## Release integrity and security
A dependency-free Node script will compare the GitHub tag to
`v${package.json.version}`. Unit tests cover a matching tag, a mismatched version,
and malformed/missing tags. The GitHub release workflow will run this guard
before packaging.
Astro and MDX will receive compatible updates that pull patched PostCSS, SVGO,
and XML-parser transitives. Gitea/GitHub CI and the GitHub release will run
`npm audit --audit-level=moderate` after `npm ci`.
## Validation
The release branch must pass the tag-guard tests, a clean npm audit, the Astro
build, generated SEO/deploy checks, workflow syntax inspection, and a final
review of all changed claims against the core `26.8.0-beta.0` changelog and docs.
-140
View File
@@ -1,140 +0,0 @@
# Green Tea Site 26.8.0-beta.0 Release Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Publish an accurate `26.8.0-beta.0` release post, align site claims with the core, remediate site dependency advisories, and enforce tag/package version agreement.
**Architecture:** Keep the existing Gitea-main-to-GitHub promotion unchanged. Add a small dependency-free release metadata guard, wire security gates into existing workflows, and rely on Astro's content collection plus the existing generated-site verifier for the new post.
**Tech Stack:** Astro 7, MDX, Node.js 22, `node:test`, npm, Gitea Actions, GitHub Actions.
---
### Task 1: Guard release version metadata
**Files:**
- Create: `scripts/verify-release-tag.mjs`
- Create: `scripts/verify-release-tag.test.mjs`
- Modify: `package.json`
- Modify: `.github/workflows/release.yml`
**Step 1: Write failing tests**
Test that `assertReleaseTag('v26.8.0-beta.0', '26.8.0-beta.0')` succeeds and that missing `v`, a different version, a slash, or an empty tag throws an error naming the expected tag.
**Step 2: Verify RED**
Run: `node --test scripts/verify-release-tag.test.mjs`
Expected: FAIL because `verify-release-tag.mjs` does not exist.
**Step 3: Implement the guard**
Export `assertReleaseTag(tag, version)`, load `package.json` when run as a script, and require exact equality with `v${version}`. Add `verify:release` and `test` scripts, then replace the workflow's slash-only shell check with `npm run verify:release`.
**Step 4: Verify GREEN**
Run: `npm test`
Expected: all release-tag tests pass.
### Task 2: Remediate dependency advisories
**Files:**
- Modify: `package.json`
- Modify: `package-lock.json`
**Step 1: Capture the vulnerable baseline**
Run: `npm audit --audit-level=moderate`
Expected: FAIL with advisories for Astro, PostCSS, SVGO, and fast-xml-parser.
**Step 2: Apply compatible updates**
Update Astro to `^7.1.6` and `@astrojs/mdx` to `^7.0.5`, regenerating the lockfile without changing the site's CalVer.
**Step 3: Verify remediation**
Run: `npm audit --audit-level=moderate`
Expected: 0 vulnerabilities.
### Task 3: Align landing-page claims
**Files:**
- Modify: `src/components/sections/Hero.astro`
- Modify: `src/components/sections/Batteries.astro`
- Modify: `src/components/sections/RunsEverywhere.astro`
**Step 1: Replace over-broad claims**
Name Node, Deno, Bun, and Cloudflare Workers explicitly; say that validation adds no validator dependency to core; qualify native TLS as a Node-adapter capability.
**Step 2: Review against core documentation**
Compare every changed sentence with `../green-tea/README.md`, `CHANGELOG.md`, and runtime/security guides.
### Task 4: Publish the release post
**Files:**
- Create: `src/content/blog/green-tea-26-8-0-beta-0.mdx`
**Step 1: Write the release narrative**
Use English to match the site. Cover safe constrained parameters, static-to-catch-all precedence, rejected repeated slashes and malformed encoding, HEAD/OPTIONS behavior, OpenAPI patterns, four runtime targets, and dependency audit work.
**Step 2: State beta limits explicitly**
Document that constraints are a bounded safe subset rather than arbitrary regex, matching is still a linear scan, and a radix tree remains post-beta work.
**Step 3: Verify generated content**
Run: `npm run check`
Expected: the new post route builds and generated SEO/deploy metadata verifies.
### Task 5: Enforce supply-chain checks in automation
**Files:**
- Modify: `.github/workflows/ci.yml`
- Modify: `.github/workflows/release.yml`
**Step 1: Add audit gates**
Run `npm audit --audit-level=moderate` after `npm ci` in CI and immediately before the release build.
**Step 2: Preserve forge boundaries**
Confirm CI remains dual-forge, promotion remains Gitea-only, and release remains GitHub-only on `v*` tags.
### Task 6: Final verification and handoff
**Files:**
- Review: all changed files
**Step 1: Run complete verification**
Run: `npm ci && npm test && npm audit --audit-level=moderate && npm run check`
Expected: clean install, all tests pass, 0 vulnerabilities, site and metadata checks pass.
**Step 2: Exercise tag validation**
Run: `RELEASE_TAG=v26.8.0-beta.0 npm run verify:release`
Expected: exact version accepted.
Run: `RELEASE_TAG=v26.8.0-beta.1 npm run verify:release`
Expected: non-zero exit and a message expecting `v26.8.0-beta.0`.
**Step 3: Review Git state**
Run: `git diff --check && git status --short && git diff --stat`
Expected: no whitespace errors and only planned files changed.
**Step 4: Commit and publish branch**
Create focused commits without co-author trailers, push `feature/26.8.0-beta.0-release` to Gitea, and open a PR to `main`. Do not create the GitHub release tag until promotion completes.
+935 -1369
View File
File diff suppressed because it is too large. Load diff
+4 -8
View File
@@ -1,24 +1,20 @@
{
"name": "green-tea-site",
"type": "module",
"version": "26.11.0-rc.1",
"version": "26.7.0-beta.0",
"engines": {
"node": ">=22.12.0"
},
"scripts": {
"dev": "astro dev",
"build": "astro build",
"check": "npm run build && npm run verify:build",
"test": "node --test scripts/*.test.mjs",
"verify:build": "node scripts/verify-build.mjs",
"verify:release": "node scripts/verify-release-tag.mjs",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^7.0.8",
"@astrojs/mdx": "^7.0.2",
"@astrojs/rss": "^4.0.19",
"@astrojs/sitemap": "^3.7.4",
"astro": "^7.3.5"
"@astrojs/sitemap": "^3.7.3",
"astro": "^7.0.7"
}
}
-49
View File
@@ -1,49 +0,0 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://green-tea.expressive-tea.io%{REQUEST_URI} [R=301,L]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType text/css "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType image/avif "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
ExpiresByType image/svg+xml "access plus 7 days"
ExpiresByType image/webp "access plus 7 days"
ExpiresByType image/x-icon "access plus 7 days"
<FilesMatch "\.[A-Za-z0-9_-]{8,}\.(?:avif|css|eot|gif|ico|jpe?g|js|mjs|otf|png|svg|ttf|webp|woff2?)$">
ExpiresActive Off
</FilesMatch>
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.html?$">
Header set Cache-Control "public, max-age=0, must-revalidate"
</FilesMatch>
<FilesMatch "\.woff2$">
Header set Cache-Control "public, max-age=31536000"
</FilesMatch>
<FilesMatch "\.(?:avif|gif|ico|jpe?g|png|svg|webp)$">
Header set Cache-Control "public, max-age=604800"
</FilesMatch>
<FilesMatch "\.[A-Za-z0-9_-]{8,}\.(?:avif|css|eot|gif|ico|jpe?g|js|mjs|otf|png|svg|ttf|webp|woff2?)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml
AddOutputFilterByType DEFLATE application/javascript application/x-javascript application/json application/ld+json
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/atom+xml image/svg+xml
</IfModule>
-93
View File
@@ -1,93 +0,0 @@
Copyright 2021 The Zen Maru Gothic Project Authors (https://github.com/googlefonts/zen-marugothic)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
-12
View File
@@ -1,12 +0,0 @@
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import test from 'node:test';
test('publishes beta tags as GitHub prereleases', async () => {
const workflow = await readFile(new URL('../.github/workflows/release.yml', import.meta.url), 'utf8');
assert.match(
workflow,
/uses: softprops\/action-gh-release@v2[\s\S]*?with:\s*\n\s+prerelease: true\s*\n\s+files:/,
);
});
-408
View File
@@ -1,408 +0,0 @@
import assert from 'node:assert/strict';
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
import { join, relative, resolve } from 'node:path';
const distDir = resolve('dist');
const productionOrigin = 'https://green-tea.expressive-tea.io';
const homeCanonical = `${productionOrigin}/`;
function readHtml(filePath) {
assert.ok(existsSync(filePath), `Missing generated HTML: ${relative(distDir, filePath)}`);
return readFileSync(filePath, 'utf8');
}
function tags(html, tagName) {
return html.match(new RegExp(`<${tagName}\\b[^>]*>`, 'gi')) ?? [];
}
function attribute(tag, name) {
const match = tag.match(
new RegExp(`\\s${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`, 'i'),
);
return match?.[1] ?? match?.[2] ?? match?.[3];
}
function metaTags(html, attributeName, attributeValue) {
return tags(html, 'meta').filter(
(tag) => attribute(tag, attributeName)?.toLowerCase() === attributeValue.toLowerCase(),
);
}
function metaDescription(html, label) {
const descriptions = metaTags(html, 'name', 'description');
assert.equal(descriptions.length, 1, `${label} must have exactly one meta description`);
const description = attribute(descriptions[0], 'content')?.trim();
assert.ok(description, `${label} meta description must not be empty`);
return description;
}
function expectedCanonicalFor(label) {
const generatedPath = label.replaceAll('\\', '/');
if (generatedPath === 'index.html') return homeCanonical;
if (generatedPath === '404.html') return `${productionOrigin}/404/`;
assert.ok(
generatedPath.endsWith('/index.html'),
`Cannot derive a canonical route from generated page ${generatedPath}`,
);
return `${productionOrigin}/${generatedPath.slice(0, -'index.html'.length)}`;
}
function requireAbsoluteHttps(value, message) {
let parsedUrl;
assert.doesNotThrow(
() => {
parsedUrl = new URL(value);
},
`${message} must be a valid absolute URL`,
);
assert.equal(parsedUrl.protocol, 'https:', `${message} must use HTTPS`);
return value;
}
function verifyPageMetadata({ label, generatedPath = label, html, isPost = false }) {
const expectedCanonical = expectedCanonicalFor(generatedPath);
const canonicals = tags(html, 'link').filter((tag) =>
attribute(tag, 'rel')
?.toLowerCase()
.split(/\s+/)
.includes('canonical'),
);
assert.equal(canonicals.length, 1, `${label} must have exactly one canonical URL`);
const canonicalUrl = attribute(canonicals[0], 'href');
assert.equal(
canonicalUrl,
expectedCanonical,
`${label} canonical URL must match its generated route`,
);
requireAbsoluteHttps(canonicalUrl, `${label} canonical URL`);
const description = metaDescription(html, label);
const robots = metaTags(html, 'name', 'robots');
assert.equal(robots.length, 1, `${label} must have exactly one robots meta tag`);
assert.equal(
attribute(robots[0], 'content')?.toLowerCase(),
generatedPath === '404.html' ? 'noindex, follow' : 'index, follow',
`${label} robots metadata has an unexpected value`,
);
requireSingleMeta(html, label, 'og:type', isPost ? 'article' : 'website');
const ogUrl = attribute(requireSingleMeta(html, label, 'og:url'), 'content');
assert.equal(ogUrl, canonicalUrl, `${label} og:url must match its canonical URL`);
assert.ok(
attribute(requireSingleMeta(html, label, 'og:title'), 'content')?.trim(),
`${label} og:title must not be blank`,
);
assert.equal(
attribute(requireSingleMeta(html, label, 'og:description'), 'content'),
description,
`${label} og:description must match its meta description`,
);
const ogImage = attribute(requireSingleMeta(html, label, 'og:image'), 'content');
requireAbsoluteHttps(ogImage, `${label} og:image`);
return { canonicalUrl, description, ogImage };
}
function findGeneratedTextAssets(directory) {
return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {
const entryPath = join(directory, entry.name);
if (entry.isDirectory()) return findGeneratedTextAssets(entryPath);
return entry.isFile() && /\.(?:html|css|js|mjs|svg|xml|json)$/i.test(entry.name)
? [entryPath]
: [];
});
}
function parseJsonLd(html, label) {
const scripts = [];
const scriptPattern = /<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi;
let match;
while ((match = scriptPattern.exec(html)) !== null) {
if (attribute(`<script${match[1]}>`, 'type')?.toLowerCase() === 'application/ld+json') {
scripts.push(match[2]);
}
}
assert.ok(scripts.length > 0, `${label} must have parseable JSON-LD`);
return scripts.map((source, index) => {
try {
return JSON.parse(source);
} catch (error) {
assert.fail(`${label} JSON-LD script ${index + 1} is invalid: ${error.message}`);
}
});
}
function findNodesByType(value, expectedType, matches = []) {
if (Array.isArray(value)) {
for (const item of value) findNodesByType(item, expectedType, matches);
return matches;
}
if (value === null || typeof value !== 'object') return matches;
const types = Array.isArray(value['@type']) ? value['@type'] : [value['@type']];
if (types.includes(expectedType)) matches.push(value);
for (const item of Object.values(value)) findNodesByType(item, expectedType, matches);
return matches;
}
function requireValidDate(value, message) {
assert.equal(typeof value, 'string', `${message} must be a string`);
assert.match(
value,
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/,
`${message} must use ISO-8601 UTC format`,
);
const parsedDate = new Date(value);
assert.ok(!Number.isNaN(parsedDate.valueOf()), `${message} must be a valid date`);
assert.equal(parsedDate.toISOString(), value, `${message} must not normalize an impossible date`);
}
function requireSingleMeta(html, label, property, expectedContent) {
const matching = metaTags(html, 'property', property);
assert.equal(matching.length, 1, `${label} must have exactly one ${property} meta tag`);
if (expectedContent !== undefined) {
assert.equal(
attribute(matching[0], 'content')?.toLowerCase(),
expectedContent.toLowerCase(),
`${label} ${property} must be ${expectedContent}`,
);
} else {
assert.ok(attribute(matching[0], 'content')?.trim(), `${label} ${property} must not be empty`);
}
return matching[0];
}
assert.ok(existsSync(distDir), 'Missing generated dist directory');
const generatedTextAssets = findGeneratedTextAssets(distDir);
const htmlPages = generatedTextAssets
.filter((filePath) => filePath.toLowerCase().endsWith('.html'))
.map((filePath) => ({
label: relative(distDir, filePath),
path: filePath,
html: readHtml(filePath),
}));
assert.ok(htmlPages.length > 0, 'Expected at least one generated HTML page');
function requirePage(relativePath, label) {
const page = htmlPages.find((candidate) => candidate.label === relativePath);
assert.ok(page, `Missing generated ${label}: ${relativePath}`);
return { ...page, generatedPath: relativePath, label };
}
const home = requirePage('index.html', 'home page');
const notFound = requirePage('404.html', '404 page');
requirePage(join('blog', 'index.html'), 'blog index');
const postPages = htmlPages
.map((page) => ({ ...page, route: page.label.replaceAll('\\', '/') }))
.filter(
(page) =>
page.route.startsWith('blog/') &&
page.route.endsWith('/index.html') &&
page.route !== 'blog/index.html',
)
.map((page) => ({
...page,
generatedPath: page.route,
label: `blog post ${page.route.slice('blog/'.length, -'/index.html'.length)}`,
}));
assert.ok(postPages.length > 0, 'Expected at least one generated blog post');
const homeJsonLd = parseJsonLd(home.html, home.label);
assert.equal(homeJsonLd.length, 1, 'home page must have exactly one JSON-LD script');
const homeMetadata = verifyPageMetadata(home);
const websites = findNodesByType(homeJsonLd, 'WebSite');
assert.equal(websites.length, 1, 'home page JSON-LD must contain exactly one WebSite');
const [website] = websites;
assert.equal(website.name, 'Green Tea', 'home page WebSite name must be Green Tea');
assert.equal(
website.description,
homeMetadata.description,
'home page WebSite description must match the meta description',
);
assert.equal(website.url, homeCanonical, 'home page WebSite URL must be canonical');
requireAbsoluteHttps(website.url, 'home page WebSite URL');
const softwareApplications = findNodesByType(homeJsonLd, 'SoftwareApplication');
assert.equal(
softwareApplications.length,
1,
'home page JSON-LD must contain exactly one SoftwareApplication',
);
const [softwareApplication] = softwareApplications;
assert.equal(softwareApplication.name, 'Green Tea', 'SoftwareApplication name must be Green Tea');
assert.equal(
softwareApplication.description,
homeMetadata.description,
'SoftwareApplication description must match the meta description',
);
assert.equal(softwareApplication.url, homeCanonical, 'SoftwareApplication URL must be canonical');
requireAbsoluteHttps(softwareApplication.url, 'SoftwareApplication URL');
assert.equal(
softwareApplication.applicationCategory,
'DeveloperApplication',
'SoftwareApplication category must be DeveloperApplication',
);
assert.equal(
softwareApplication.operatingSystem,
'Cross-platform',
'SoftwareApplication operating system must be cross-platform',
);
assert.equal(
softwareApplication.sameAs,
'https://github.com/Expressive-Tea/green-tea',
'SoftwareApplication sameAs must reference the GitHub repository',
);
assert.equal(
softwareApplication.license,
'https://github.com/Expressive-Tea/green-tea/blob/main/LICENSE',
'SoftwareApplication license must reference the MIT license',
);
requireAbsoluteHttps(softwareApplication.license, 'SoftwareApplication license URL');
assert.equal(typeof softwareApplication.offers, 'object', 'SoftwareApplication must have an Offer');
assert.ok(
!Array.isArray(softwareApplication.offers) && softwareApplication.offers !== null,
'SoftwareApplication Offer must be an object',
);
assert.equal(softwareApplication.offers['@type'], 'Offer', 'SoftwareApplication offer type must be Offer');
assert.equal(softwareApplication.offers.price, '0', 'SoftwareApplication offer price must be zero');
assert.equal(
softwareApplication.offers.priceCurrency,
'USD',
'SoftwareApplication offer currency must be USD',
);
for (const page of htmlPages) {
if (page.path === home.path || postPages.some((post) => post.path === page.path)) continue;
verifyPageMetadata(page);
}
for (const post of postPages) {
const postMetadata = verifyPageMetadata({ ...post, isPost: true });
const jsonLd = parseJsonLd(post.html, post.label);
const blogPostings = findNodesByType(jsonLd, 'BlogPosting');
assert.equal(blogPostings.length, 1, `${post.label} JSON-LD must contain one BlogPosting`);
const [blogPosting] = blogPostings;
assert.ok(
typeof blogPosting.headline === 'string' && blogPosting.headline.trim(),
`${post.label} BlogPosting headline must not be empty`,
);
assert.equal(
blogPosting.description,
postMetadata.description,
`${post.label} BlogPosting description must match the meta description`,
);
assert.equal(
blogPosting.image,
postMetadata.ogImage,
`${post.label} BlogPosting image must match og:image`,
);
requireAbsoluteHttps(blogPosting.image, `${post.label} BlogPosting image`);
assert.equal(
blogPosting.mainEntityOfPage,
postMetadata.canonicalUrl,
`${post.label} BlogPosting mainEntityOfPage must match the canonical URL`,
);
requireValidDate(blogPosting.datePublished, `${post.label} BlogPosting datePublished`);
requireValidDate(blogPosting.dateModified, `${post.label} BlogPosting dateModified`);
assert.equal(typeof blogPosting.author, 'object', `${post.label} BlogPosting author must be an object`);
assert.ok(
!Array.isArray(blogPosting.author) && blogPosting.author !== null,
`${post.label} BlogPosting author must be an object`,
);
assert.equal(blogPosting.author['@type'], 'Person', `${post.label} BlogPosting author must be a Person`);
assert.ok(
typeof blogPosting.author.name === 'string' && blogPosting.author.name.trim(),
`${post.label} BlogPosting author.name must not be empty`,
);
assert.equal(typeof blogPosting.publisher, 'object', `${post.label} publisher must be an object`);
assert.ok(
!Array.isArray(blogPosting.publisher) && blogPosting.publisher !== null,
`${post.label} publisher must be an object`,
);
assert.equal(
blogPosting.publisher['@type'],
'Organization',
`${post.label} publisher must be an Organization`,
);
assert.equal(
blogPosting.publisher.name,
'Expressive Tea Team',
`${post.label} publisher must be Expressive Tea Team`,
);
const publishedTime = requireSingleMeta(post.html, post.label, 'article:published_time');
const modifiedTime = requireSingleMeta(post.html, post.label, 'article:modified_time');
const articleAuthors = metaTags(post.html, 'property', 'article:author');
for (const articleAuthor of articleAuthors) {
const authorUrl = attribute(articleAuthor, 'content');
assert.ok(authorUrl?.trim(), `${post.label} article:author must not be empty`);
let parsedAuthorUrl;
assert.doesNotThrow(
() => {
parsedAuthorUrl = new URL(authorUrl);
},
`${post.label} article:author must be a valid absolute URL`,
);
assert.ok(
['https:', 'http:'].includes(parsedAuthorUrl.protocol),
`${post.label} article:author must use HTTP or HTTPS`,
);
}
const publishedTimeContent = attribute(publishedTime, 'content');
const modifiedTimeContent = attribute(modifiedTime, 'content');
requireValidDate(publishedTimeContent, `${post.label} article:published_time content`);
requireValidDate(modifiedTimeContent, `${post.label} article:modified_time content`);
assert.equal(
publishedTimeContent,
blogPosting.datePublished,
`${post.label} article:published_time must match BlogPosting datePublished`,
);
assert.equal(
modifiedTimeContent,
blogPosting.dateModified,
`${post.label} article:modified_time must match BlogPosting dateModified`,
);
const articleTags = metaTags(post.html, 'property', 'article:tag').map((tag) =>
attribute(tag, 'content')?.trim(),
);
assert.ok(articleTags.every(Boolean), `${post.label} article:tag values must not be empty`);
assert.equal(
new Set(articleTags).size,
articleTags.length,
`${post.label} article:tag values must not contain duplicates`,
);
const keywordTags =
typeof blogPosting.keywords === 'string'
? blogPosting.keywords.split(',').map((keyword) => keyword.trim())
: [];
assert.ok(keywordTags.every(Boolean), `${post.label} BlogPosting keywords must not be empty`);
assert.equal(
new Set(keywordTags).size,
keywordTags.length,
`${post.label} BlogPosting keywords must not contain duplicates`,
);
assert.deepEqual(
keywordTags,
articleTags,
`${post.label} BlogPosting keywords must match article:tag metadata`,
);
}
for (const assetPath of generatedTextAssets) {
const source = readFileSync(assetPath, 'utf8');
for (const forbiddenHost of ['fonts.googleapis.com', 'fonts.gstatic.com']) {
assert.ok(
!source.toLowerCase().includes(forbiddenHost),
`${relative(distDir, assetPath)} must not reference ${forbiddenHost}`,
);
}
}
assert.ok(existsSync(join(distDir, '.htaccess')), 'Missing generated dist/.htaccess');
assert.ok(statSync(join(distDir, '.htaccess')).isFile(), 'Generated dist/.htaccess must be a file');
console.log('Verified generated SEO and deploy metadata.');
-24
View File
@@ -1,24 +0,0 @@
import { readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import { pathToFileURL } from 'node:url';
export function assertReleaseTag(tag, version) {
const expected = `v${version}`;
if (tag !== expected) {
const received = tag || 'an empty tag';
throw new Error(`Release tag mismatch: expected ${expected}, received ${received}.`);
}
}
async function main() {
const packageUrl = new URL('../package.json', import.meta.url);
const packageJson = JSON.parse(await readFile(packageUrl, 'utf8'));
assertReleaseTag(process.env.RELEASE_TAG, packageJson.version);
console.log(`Verified release tag v${packageJson.version}.`);
}
const entryUrl = process.argv[1] ? pathToFileURL(resolve(process.argv[1])).href : undefined;
if (entryUrl === import.meta.url) {
await main();
}
-36
View File
@@ -1,36 +0,0 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { assertReleaseTag } from './verify-release-tag.mjs';
test('accepts the exact v-prefixed package version', () => {
assert.doesNotThrow(() => assertReleaseTag('v26.8.0-beta.0', '26.8.0-beta.0'));
});
test('rejects a different prerelease version', () => {
assert.throws(
() => assertReleaseTag('v26.8.0-beta.1', '26.8.0-beta.0'),
/expected v26\.8\.0-beta\.0.*received v26\.8\.0-beta\.1/i,
);
});
test('rejects a tag without the v prefix', () => {
assert.throws(
() => assertReleaseTag('26.8.0-beta.0', '26.8.0-beta.0'),
/expected v26\.8\.0-beta\.0.*received 26\.8\.0-beta\.0/i,
);
});
test('rejects a malformed tag containing a slash', () => {
assert.throws(
() => assertReleaseTag('release/v26.8.0-beta.0', '26.8.0-beta.0'),
/expected v26\.8\.0-beta\.0.*received release\/v26\.8\.0-beta\.0/i,
);
});
test('rejects an empty tag', () => {
assert.throws(
() => assertReleaseTag('', '26.8.0-beta.0'),
/expected v26\.8\.0-beta\.0.*received an empty tag/i,
);
});
+3 -21
View File
@@ -1,21 +1,17 @@
---
import Icon from './Icon.astro';
const linkColumns = [
{
heading: 'Learn',
links: [
{ label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true },
{ label: 'Plugins', href: '/plugins/', external: false },
{ label: 'Blog', href: '/blog', external: false },
],
},
{
heading: 'Code',
links: [
{ label: 'GitHub', href: 'https://github.com/Expressive-Tea/green-tea', external: true, icon: 'github' as const },
{ label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true, icon: 'npm' as const },
{ label: 'JSR', href: 'https://jsr.io/@green-tea/core', external: true, icon: 'jsr' as const },
{ label: 'GitHub', href: 'https://github.com/Expressive-Tea/green-tea', external: true },
{ label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true },
],
},
];
@@ -39,13 +35,7 @@ const year = new Date().getFullYear();
<ul>
{column.links.map((link) => (
<li>
<a
class={link.icon ? 'site-footer__link--mark' : undefined}
href={link.href}
target={link.external ? '_blank' : undefined}
rel={link.external ? 'noopener noreferrer' : undefined}
>
{link.icon && <Icon name={link.icon} size={15} />}
<a href={link.href} target={link.external ? '_blank' : undefined} rel={link.external ? 'noopener noreferrer' : undefined}>
{link.label}
</a>
</li>
@@ -151,12 +141,4 @@ const year = new Date().getFullYear();
gap: 2rem;
}
}
/* Icon beside the word, never instead of it. A footer is scanned, and a column of bare
glyphs makes the reader stop and decode where they were skimming. */
.site-footer__link--mark {
display: inline-flex;
align-items: center;
gap: 0.45rem;
}
</style>
+4 -39
View File
@@ -1,16 +1,11 @@
---
import logoUrl from '../assets/logo.svg?url';
import Icon from './Icon.astro';
// `icon` marks the links that become a mark on desktop. Their `label` is still the accessible
// name — an icon-only link without one is a link a screen reader announces as its href.
const navLinks = [
{ label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true },
{ label: 'Plugins', href: '/plugins/', external: false },
{ label: 'Blog', href: '/blog', external: false },
{ label: 'GitHub', href: 'https://github.com/Expressive-Tea/green-tea', external: true, icon: 'github' as const },
{ label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true, icon: 'npm' as const },
{ label: 'JSR', href: 'https://jsr.io/@green-tea/core', external: true, icon: 'jsr' as const },
{ label: 'GitHub', href: 'https://github.com/Expressive-Tea/green-tea', external: true },
{ label: 'npm', href: 'https://www.npmjs.com/package/@green-tea/core', external: true },
];
---
@@ -33,15 +28,8 @@ const navLinks = [
{
navLinks.map((link) => (
<li>
<a
href={link.href}
target={link.external ? '_blank' : undefined}
rel={link.external ? 'noopener noreferrer' : undefined}
aria-label={link.icon ? link.label : undefined}
class={link.icon ? 'site-nav__mark' : undefined}
>
{link.icon && <Icon name={link.icon} />}
<span class={link.icon ? 'site-nav__mark-text' : undefined}>{link.label}</span>
<a href={link.href} target={link.external ? '_blank' : undefined} rel={link.external ? 'noopener noreferrer' : undefined}>
{link.label}
</a>
</li>
))
@@ -121,23 +109,6 @@ const navLinks = [
text-decoration: none;
}
.site-nav__mark {
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
/* The mark carries the meaning on desktop, where the row is short and the three logos read
faster than three words. The label is not removed from the DOM: it is the accessible name
the collapsed menu shows back. */
.site-nav__mark-text {
display: none;
}
.site-nav ul {
gap: 1.75rem;
}
.nav-toggle {
display: none;
}
@@ -177,12 +148,6 @@ const navLinks = [
padding-block: 1rem;
}
/* Inside the drawer the row is vertical and there is room, so the mark stops standing in
for the word and stands next to it. Three unlabelled logos stacked read as decoration. */
.site-nav__mark-text {
display: inline;
}
.nav-toggle:checked ~ .site-nav {
display: block;
}
-49
View File
@@ -1,49 +0,0 @@
---
// Inline marks for the three places a package of ours can be reached. Three icons did not
// justify an icon library: `astro-icon` and friends pull a resolver and a set to ship what
// fits in this file, and every one of them ends up inlining the same paths anyway.
//
// `currentColor` rather than a fixed fill, so a mark takes the colour of the link it sits in
// and needs no separate rule per surface — the header, the hero's ghost buttons and the
// footer all tint it differently today.
//
// The SVG is `aria-hidden`: the accessible name belongs to the anchor, which knows where it
// goes. A `<title>` here would announce "GitHub" twice on a link already labelled GitHub.
interface Props {
name: 'github' | 'npm' | 'jsr';
size?: number;
class?: string;
}
const { name, size = 18, class: className } = Astro.props;
// Optical sizing, not geometric. GitHub and npm fill their 24×24 box; JSR's wordmark is wide
// and short and covers about half its height, so at an equal `size` it reads as the small one
// of the three. The multiplier matches apparent weight, which is what a row of marks is judged
// on — nobody measures them, they just notice one looks wrong.
const scale: Record<Props['name'], number> = { github: 1, npm: 1, jsr: 1.4 };
const box = Math.round(size * scale[name]);
// The marks are the official ones, taken from simple-icons rather than redrawn. Hand-drawn
// approximations of npm and JSR were tried first and rendered as illegible shapes: a
// third-party mark is either theirs or it is noise.
const paths: Record<Props['name'], string> = {
github:
'M12 .5C5.37.5 0 5.87 0 12.5c0 5.3 3.44 9.8 8.21 11.39.6.11.82-.26.82-.58 0-.29-.01-1.24-.02-2.25-3.34.73-4.04-1.42-4.04-1.42-.55-1.39-1.34-1.76-1.34-1.76-1.09-.75.08-.73.08-.73 1.2.08 1.84 1.24 1.84 1.24 1.07 1.83 2.81 1.3 3.5.99.11-.78.42-1.3.76-1.6-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.13-.3-.54-1.52.11-3.18 0 0 1.01-.32 3.3 1.23a11.5 11.5 0 0 1 6.01 0c2.29-1.55 3.3-1.23 3.3-1.23.65 1.66.24 2.88.12 3.18.77.84 1.23 1.91 1.23 3.22 0 4.61-2.8 5.62-5.48 5.92.43.37.81 1.1.81 2.22 0 1.6-.01 2.9-.01 3.29 0 .32.21.7.82.58A12 12 0 0 0 24 12.5C24 5.87 18.63.5 12 .5Z',
npm: 'M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z',
// the others rather than carrying its own viewBox.
jsr: 'M3.692 5.538v3.693H0v7.384h7.385v1.847h12.923v-3.693H24V7.385h-7.385V5.538Zm1.846 1.847h1.847v7.384H1.846v-3.692h1.846v1.846h1.846zm3.693 0h5.538V9.23h-3.692v1.846h3.692v5.538H9.231V14.77h3.692v-1.846H9.231Zm7.384 1.846h5.539v3.692h-1.846v-1.846h-1.846v5.538h-1.847z',
};
---
<svg
class={className}
width={box}
height={box}
viewBox="0 0 24 24"
fill="currentColor"
aria-hidden="true"
focusable="false"
>
<path d={paths[name]} />
</svg>
-43
View File
@@ -1,43 +0,0 @@
---
// Site-wide notice of the API freeze and the deprecation policy (core CARD-22, D18). It sits above
// the header on every page because it is a promise about the product, not a feature of one section.
// The full policy lives in the docs; this states only what a reader needs before upgrading.
const policyURL = 'https://green-tea.expressive-tea.io/docs/stability/';
---
<aside class="stability" aria-label="API stability">
<p class="wrap stability__text">
<strong>The API is frozen at RC.1.</strong> Until stable, releases are fixes only. After stable, nothing
is removed without at least two releases' notice.{' '}
<a href={policyURL}>Read the stability policy</a>
</p>
</aside>
<style>
.stability {
background: color-mix(in srgb, var(--matcha) 12%, var(--base));
border-bottom: 1px solid color-mix(in srgb, var(--matcha) 35%, transparent);
}
.stability__text {
margin: 0 auto;
padding-block: 0.6rem;
color: var(--ink);
font-size: 0.9rem;
line-height: 1.5;
text-align: center;
}
.stability__text strong {
color: var(--matcha);
}
.stability__text a {
color: var(--matcha);
white-space: nowrap;
}
.stability__text a::after {
content: ' →';
}
</style>
+8 -30
View File
@@ -1,37 +1,22 @@
---
const cards = [
{ title: 'Derive execution', body: 'Green Tea topologically sorts the graph. Stop maintaining execution order by hand.' },
{
title: 'Fail before traffic',
body: 'A missing dependency or an ambiguous route fails loudly at boot, not in production.',
},
{ title: 'Secure by default', body: 'Hardening headers, native TLS, CORS done right.' },
{
title: 'Real validation',
body: 'Standard Schema; bring zod, valibot, or arktype. No validator dependency in core.',
},
{
title: 'See what was derived',
body: 'Print the ordered pipeline, open the live graph, project the same metadata into OpenAPI 3.1.',
},
{ title: 'Secure by default', body: 'Hardened response headers and CORS; native TLS on Node.' },
{
title: 'A small foundation',
body: 'reflect-metadata is the only runtime dependency; ws and busboy are optional peers for sockets and uploads.',
body: 'Standard Schema; bring zod, valibot, or arktype. The core stays dependency-free.',
},
{ title: 'OpenAPI 3.1', body: 'Projected from the same graph. No extra decorators.' },
{ title: 'See the graph', body: 'Interactive, served by your app. Not behind a paywall.' },
{ title: 'Loud boot', body: 'A missing dependency fails at startup, not in production.' },
{ title: 'One dependency', body: "No Express, no Inversify. Maintenance is the framework's job, not yours." },
];
---
<section class="batteries">
<div class="wrap">
<div class="batteries__head">
<p class="kicker">Foundation ownership</p>
<h2>We maintain the foundation. You maintain the product.</h2>
<p class="batteries__lede">
Routing, graph execution, validation integration, streaming, security defaults, errors, OpenAPI, lifecycle,
runtime adapters — the framework work your application would otherwise assemble and then keep working. The
goal isn't fewer dependencies for a badge; it's fewer moving parts your team has to understand, upgrade and
debug.
</p>
<p class="kicker">Batteries, calm by design</p>
<h2>Serious defaults. Zero ceremony.</h2>
</div>
<ul class="batteries__grid">
@@ -58,13 +43,6 @@ const cards = [
margin-bottom: 0;
}
.batteries__lede {
margin: 1rem 0 0;
max-width: 46rem;
color: var(--dim);
line-height: 1.75;
}
.batteries__grid {
list-style: none;
margin: 0;
+6 -6
View File
@@ -4,7 +4,7 @@
const items = [
{
q: 'Is Green Tea ready for production?',
a: `It's a release candidate: the API is frozen, and until stable every release is a fix. It fits greenfield services, internal tools, and side projects where you own the deploy. If you need a decade of third-party middleware today, stay on Express for now.`,
a: `It's beta, on the RC track — the API can still shift between releases. It fits greenfield services, internal tools, and side projects where you own the deploy and can pin versions. If you need a decade of third-party middleware today, stay on Express for now.`,
},
{
q: 'Can I drop it into my existing Express app?',
@@ -12,7 +12,7 @@ const items = [
},
{
q: 'How does it perform against Express or Fastify?',
a: `Performance isn't the pitch — the model is — but there's a reproducible benchmark in the core repo (BENCHMARKS.md), written to be hard on us, not flattering. On a single-box harness green-tea is level with Fastify on a plain JSON route, a few percent behind it on routing and pipelines, and behind it on validation; it runs about three times faster than Express. Read the caveats there: it's loopback on one machine, so trust the ratios between frameworks, not the absolute numbers. The graph is topologically sorted once at boot, not per request — you don't pay for it on the hot path.`,
a: `Performance isn't the pitch — the model is — but there's a reproducible benchmark in the core repo (BENCHMARKS.md), written to be hard on us, not flattering. On a single-box harness green-tea keeps pace with Fastify and runs several times faster than Express, behind only raw Node http. Read the caveats there: it's loopback on one machine, so trust the ratios between frameworks, not the absolute numbers. The graph is topologically sorted once at boot, not per request — you don't pay for it on the hot path.`,
},
{
q: 'What will it add to my dependency tree?',
@@ -20,11 +20,11 @@ const items = [
},
{
q: 'Is mesh (multi-service) ready to use?',
a: `Not yet. Mesh is alpha, gated behind an explicit opt-in, and outside the API freeze, so it may change in any release. What does not change is everything around it: mesh adapts to the stable API rather than altering it, so an app that does not use mesh is never affected by a mesh release. Build on the single-service core for now, and treat mesh as a preview, not a foundation.`,
a: `Not yet — mesh is alpha and gated behind an explicit opt-in. Build on the single-service core for now, and treat mesh as a preview, not a foundation.`,
},
{
q: 'What does the API freeze promise?',
a: `From RC.1 to the stable release, nothing in the public API is added, removed or renamed — releases are fixes only, and every API change would have to show up as a diff to the committed API report, which CI checks. After stable, nothing is removed without being deprecated first: at least two monthly releases of notice, a @deprecated tag naming the replacement, and a single warning in your logger. Mesh is experimental and outside the promise.`,
q: 'What does "beta" mean for breaking changes?',
a: `Expect occasional breaking changes on the RC track, called out in the changelog. Pin your version and read the release notes before upgrading, and you won't be surprised.`,
},
];
---
@@ -33,7 +33,7 @@ const items = [
<div class="wrap faq__inner">
<div class="faq__head">
<p class="kicker">Straight answers</p>
<h2>Questions worth asking about a release candidate.</h2>
<h2>Questions worth asking about a beta.</h2>
</div>
<ul class="faq__list">
-109
View File
@@ -1,109 +0,0 @@
---
const slices = [
{
route: 'GET /prices',
chain: ['market', 'handler'],
note: 'A public endpoint never asks for a user, so authentication is not in its graph slice.',
},
{
route: 'GET /portfolio',
chain: ['session', 'auth', 'user', 'portfolio', 'handler'],
note: 'A protected endpoint needs the user, so Green Tea follows the graph and includes it.',
},
];
---
<section class="demand section--panel">
<div class="wrap demand__inner">
<div class="demand__head">
<p class="kicker">Route slicing</p>
<h2>Run what the route needs. Not everything registered around it.</h2>
</div>
<ul class="demand__slices">
{
slices.map((slice) => (
<li class="demand__slice">
<p class="demand__route"><code>{slice.route}</code></p>
<p class="demand__chain">
{slice.chain.map((node, i) => (
<>
{i > 0 && <span class="demand__arrow" aria-hidden="true">→</span>}
<code>{node}</code>
</>
))}
</p>
<p class="demand__note">{slice.note}</p>
</li>
))
}
</ul>
<p class="demand__punch">
Routes don't inherit infrastructure just because it was registered nearby. Execution follows dependency
demand.
</p>
</div>
</section>
<style>
.demand {
padding-block: clamp(3rem, 8vw, 5.5rem);
}
.demand__head {
margin-bottom: 2.2rem;
max-width: 46rem;
}
.demand__head h2 {
margin-bottom: 0;
}
.demand__slices {
list-style: none;
margin: 0 0 2rem;
padding: 0;
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.demand__slice {
padding: 1.3rem 1.4rem;
border: 1px solid color-mix(in srgb, var(--dim) 18%, transparent);
border-radius: 12px;
}
.demand__route {
margin: 0 0 0.8rem;
font-family: var(--font-heading);
font-weight: 600;
}
.demand__chain {
margin: 0 0 0.9rem;
line-height: 2.1;
font-size: 0.95rem;
}
.demand__arrow {
color: var(--matcha);
margin-inline: 0.35rem;
}
.demand__note {
margin: 0;
color: var(--dim);
line-height: 1.7;
font-size: 0.95rem;
}
.demand__punch {
margin: 0;
max-width: 46rem;
font-size: 1.05rem;
line-height: 1.7;
color: var(--ink);
}
</style>
+6 -20
View File
@@ -7,17 +7,11 @@ import GraphMotif from '../GraphMotif.astro';
<div class="wrap graph-idea__inner">
<p class="kicker">The idea</p>
<h2>Declare what your code needs. Not when it should run.</h2>
<h2>A graph, not a chain.</h2>
<p class="graph-idea__body">
A handler needs <code>user</code>. Authorization needs <code>user</code>. User comes from authentication.
Authentication needs a session. That is already enough information to describe execution order — so Green Tea
builds the graph from it, validates the wiring at boot, and runs only the slice the route requires.
</p>
<p class="graph-idea__chain" aria-label="session, then auth, then user, then authorization, then permissions, then handler">
<code>session</code> → <code>auth</code> → <code>user</code> → <code>authorization</code> →
<code>permissions</code> → <code>handler</code>
Express-style frameworks make ordering your job — what runs here, what runs there, where you wire it. Green
Tea inverts it. You ask for the highest-level thing you need, and its dependencies resolve transitively.
</p>
<ul class="graph-idea__examples">
@@ -29,10 +23,9 @@ import GraphMotif from '../GraphMotif.astro';
</ul>
<p class="graph-idea__punch">
You describe the application; the framework derives the pipeline. DI frameworks resolve a graph of <em
>services</em
> — Green Tea resolves your <em>request pipeline</em> the same way, from what each route asks for rather than
from the order you happened to write things in.
This is pure composition. DI frameworks resolve a graph of <em>services</em>; Green Tea resolves your <em
>request pipeline</em
> the same way — the steps a route runs are computed from what it asks for, not the order you wrote them in.
</p>
</div>
</section>
@@ -103,13 +96,6 @@ import GraphMotif from '../GraphMotif.astro';
color: var(--ink);
}
.graph-idea__chain {
margin: 0 0 1.6rem;
font-size: 0.95rem;
line-height: 2.1;
color: var(--dim);
}
.graph-idea__punch {
margin: 0;
padding: 1.25rem 1.5rem;
+9 -35
View File
@@ -1,6 +1,5 @@
---
import logoUrl from '../../assets/logo.svg?url';
import Icon from '../Icon.astro';
import GraphMotif from '../GraphMotif.astro';
---
@@ -12,32 +11,26 @@ import GraphMotif from '../GraphMotif.astro';
<span class="hero__wordmark">Green Tea<span class="hero__dot">.</span></span>
</div>
<h1>Declare intent. Derive execution. Build your product.</h1>
<h1>Your API is a graph, not a middleware chain.</h1>
<p class="hero__subhead">
A zen, opinionated, type-safe TypeScript framework that turns what your code needs into a validated
execution graph. Green Tea derives the order, runs only the dependencies each route actually requires,
and shows you exactly what it built.
Green Tea is a zen, opinionated, type-safe framework: you declare what each step needs — it computes the
order. One runtime dependency. Runs wherever JavaScript runs.
</p>
<p class="hero__promise">You focus on business logic. Green Tea maintains the foundation.</p>
<div class="btn-row hero__ctas">
<a class="btn btn--primary" href="https://green-tea.expressive-tea.io/docs" target="_blank" rel="noopener noreferrer">
Get started
</a>
<a class="btn btn--ghost btn--mark" href="https://github.com/Expressive-Tea/green-tea" target="_blank" rel="noopener noreferrer" aria-label="GitHub">
<Icon name="github" size={20} />
<a class="btn btn--ghost" href="https://github.com/Expressive-Tea/green-tea" target="_blank" rel="noopener noreferrer">
GitHub
</a>
<a class="btn btn--ghost btn--mark" href="https://www.npmjs.com/package/@green-tea/core" target="_blank" rel="noopener noreferrer" aria-label="npm">
<Icon name="npm" size={20} />
</a>
<a class="btn btn--ghost btn--mark" href="https://jsr.io/@green-tea/core" target="_blank" rel="noopener noreferrer" aria-label="JSR">
<Icon name="jsr" size={20} />
<a class="btn btn--ghost" href="https://www.npmjs.com/package/@green-tea/core" target="_blank" rel="noopener noreferrer">
npm
</a>
</div>
<p class="hero__micro">Release candidate · API frozen · Node · Deno · Bun · Edge</p>
<p class="hero__micro">Beta · calm by design</p>
</div>
<GraphMotif class="hero__motif" width={460} height={400} opacity={0.55} />
@@ -94,26 +87,7 @@ import GraphMotif from '../GraphMotif.astro';
color: var(--dim);
font-size: 1.1rem;
line-height: 1.7;
margin-bottom: 1.1rem;
}
.hero__promise {
margin: 0 0 2rem;
font-family: var(--font-heading);
font-size: 1.02rem;
line-height: 1.6;
color: var(--ink);
}
/* Square rather than pill: with the text gone the ghost button's horizontal padding left a
wide box around a small mark. Equal padding keeps the three the same size whatever the
glyph's width. */
.btn--mark {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.65rem;
aspect-ratio: 1;
margin-bottom: 2rem;
}
.hero__ctas {
+5 -8
View File
@@ -3,18 +3,15 @@
<section class="honest">
<div class="wrap honest__inner">
<h2>Honest: it's a release candidate.</h2>
<h2>Honest: it's beta.</h2>
<p class="honest__body">
Express and Fastify have a decade of ecosystem behind them; NestJS has mature enterprise tooling. Green Tea
doesn't pretend otherwise. Choose it today because the model fits your application — explicit dependencies,
derived execution, inspectable infrastructure, one real-time mental model, and a foundation you don't have to
assemble. If your team needs a large plugin catalogue today, that gap is real. What is no longer moving is the
API: it is frozen at RC.1, and until stable every release is a fix.
Express and Fastify have a decade of ecosystem. Green Tea doesn't — yet. You come for the model and the
ergonomics. If you're tired of maintaining someone else's foundation, come try it.
</p>
<form class="subscribe" action="/subscribe.php" method="post">
<p class="subscribe__lead">Not ready yet? Get one email when the stable release ships — nothing else.</p>
<p class="subscribe__lead">Not ready yet? Get one email when 1.0 ships — nothing else.</p>
<div class="subscribe__row">
<label class="sr-only" for="sub-email">Email address</label>
<input
@@ -29,7 +26,7 @@
/>
<!-- honeypot: real people never fill this -->
<input class="subscribe__hp" type="text" name="website" tabindex="-1" autocomplete="off" aria-hidden="true" />
<button class="btn btn--primary" type="submit">Notify me at stable</button>
<button class="btn btn--primary" type="submit">Notify me at 1.0</button>
</div>
<p class="subscribe__msg" role="status" aria-live="polite"></p>
</form>
-110
View File
@@ -1,110 +0,0 @@
---
// The way into the plugin listing, which is its own build under /plugins (green-tea-marketplace).
// The descriptions are each package's own, as the listing shows them. When a plugin is added
// there, it does not appear here: this is a sample, and the listing is the index.
const plugins = [
{ name: '@green-tea/jwt', slug: 'jwt', body: 'Loads JWT signing keys at boot and publishes a sign/verify registry into the graph.' },
{ name: '@green-tea/metrics', slug: 'metrics', body: "Counts green-tea's lifecycle events and renders them in the Prometheus text format." },
{ name: '@green-tea/rate-limit', slug: 'rate-limit', body: 'A per-request rate limiter with a branded 429 and a swept in-memory store.' },
];
---
<section class="plugins section--panel">
<div class="wrap">
<div class="plugins__head">
<p class="kicker">Plugins</p>
<h2>Extend it with plugins.</h2>
<p class="plugins__lede">
A plugin is one object, <code>&#123; name, mount &#125;</code>, that adds providers and steps to your graph.
There are three official ones so far. Each has a page with its README, its versions and the runtimes it
supports, and yours can sit next to them.
</p>
</div>
<ul class="plugins__grid">
{
plugins.map((plugin) => (
<li class="plugins__card">
<a href={`/plugins/${plugin.slug}/`}>
<h3>{plugin.name}</h3>
<p>{plugin.body}</p>
</a>
</li>
))
}
</ul>
<div class="btn-row plugins__ctas">
<a class="btn btn--primary" href="/plugins/">Browse plugins</a>
<a class="btn btn--ghost" href="/plugins/#contribute">List yours</a>
</div>
</div>
</section>
<style>
.plugins__head {
max-width: 52ch;
margin: 0 auto 3rem;
text-align: center;
}
.plugins__head h2 {
margin-bottom: 0;
}
.plugins__lede {
margin: 1rem 0 0;
color: var(--dim);
line-height: 1.75;
}
.plugins__grid {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
}
.plugins__card a {
display: block;
height: 100%;
padding: 1.75rem;
background: var(--base);
border: 1px solid color-mix(in srgb, var(--dim) 18%, transparent);
border-radius: 12px;
color: inherit;
text-decoration: none;
}
.plugins__card a:hover,
.plugins__card a:focus-visible {
border-color: var(--matcha);
}
.plugins__card h3 {
color: var(--matcha);
font-size: 0.98rem;
margin-bottom: 0.5em;
word-break: break-word;
}
.plugins__card p {
margin: 0;
color: var(--dim);
font-size: 0.95rem;
line-height: 1.65;
}
.plugins__ctas {
justify-content: center;
margin-top: 2.5rem;
}
@media (max-width: 860px) {
.plugins__grid {
grid-template-columns: 1fr;
}
}
</style>
+5 -17
View File
@@ -4,30 +4,18 @@
<section class="realtime section--panel">
<div class="wrap realtime__inner">
<p class="kicker">Real-time</p>
<h2>One mental model. Different transports.</h2>
<h2>One primitive for real-time.</h2>
<p class="realtime__body">
Your business code has one idea — values arriving over time — and in Green Tea that idea is an <code
>AsyncIterable</code
>. Declare the transport with a decorator (<code>@Sse</code>, <code>@Ws</code>, <code>@Stream</code>) and
return the stream; the framework handles framing, backpressure, cleanup and disconnects. Only that one line
changes between them, and your wire contract is what you declared — never a surprise sprung by a return value.
</p>
<p class="realtime__tree">
<code>AsyncIterable</code> → <code>SSE</code> · <code>NDJSON</code> · <code>WebSocket</code>
SSE, ndjson, or a duplex WebSocket — one primitive, an <code>AsyncIterable</code>. You declare the transport
with a decorator (<code>@Sse</code>, <code>@Ws</code>, <code>@Stream</code>); only that one line changes. No
separate gateway, no bolt-on package — and your wire contract is what you declared, never a surprise sprung by
a return value.
</p>
</div>
</section>
<style>
.realtime__tree {
margin: 1.2rem 0 0;
font-size: 0.95rem;
line-height: 2.1;
color: var(--dim);
}
.realtime__inner {
max-width: 60ch;
margin: 0 auto;
+7 -7
View File
@@ -4,13 +4,12 @@ const chips = ['app.listen(port)', 'serveDeno(app)', 'serveBun(app)', 'edgeHandl
<section class="runs">
<div class="wrap runs__inner">
<p class="kicker">Portability</p>
<h2>Your application model shouldn't belong to a runtime.</h2>
<p class="kicker">Runtime-agnostic</p>
<h2>Write it once. Run it everywhere.</h2>
<p class="runs__body">
The graph, routes, validation and business logic stay the same on Node, Deno, Bun and Cloudflare Workers.
Runtime-specific serving is isolated at the transport boundary — the only line that changes is how the
application is served.
Node, Deno, Bun — and the edge. The same <code>src/</code> runs on all of them; the only line that changes is
how you serve it.
</p>
<ul class="runs__chips">
@@ -18,8 +17,8 @@ const chips = ['app.listen(port)', 'serveDeno(app)', 'serveBun(app)', 'edgeHandl
</ul>
<p class="runs__micro">
Your product code shouldn't have to care which runtime won this year. <span class="runs__caveat"
>(The edge has no filesystem or mesh, so those features stay on the server runtimes. Native TLS is Node's; on Deno, Bun and the edge, terminate TLS in the runtime or a proxy.)</span
Built on web standards. Not hostage to a runtime's fate. <span class="runs__caveat"
>(The edge has no filesystem, so file-backed views and static serving stay on the server runtimes.)</span
>
</p>
</div>
@@ -79,5 +78,6 @@ const chips = ['app.listen(port)', 'serveDeno(app)', 'serveBun(app)', 'edgeHandl
display: block;
margin-top: 0.5rem;
font-size: 0.8rem;
opacity: 0.75;
}
</style>
+6 -22
View File
@@ -26,34 +26,18 @@ class MeController {
<div class="wrap see-it__inner">
<div class="see-it__head">
<p class="kicker">See it</p>
<h2>The signature is the contract.</h2>
<p class="see-it__lede">
If your handler needs it, it says so. Green Tea knows what the handler requires, which steps produce those
values, and what those steps need in turn — and if the graph can't satisfy that contract, it fails before
serving traffic. No hoping auth ran first, no archaeology through <code>app.use()</code>.
</p>
<h2>The whole model, in one screen.</h2>
</div>
<div class="see-it__code">
<Code code={snippet} lang="ts" theme="github-dark-high-contrast" />
<Code code={snippet} lang="ts" theme="github-dark" />
</div>
<p class="see-it__caption">
Then make the framework show its work: <code>app.explain()</code> prints the ordered pipeline, the live graph
is served by your own app, and the same metadata projects into OpenAPI. Automated does not have to mean
invisible.
</p>
<p class="see-it__caption">Declare what you need. The framework figures out the order.</p>
</div>
</section>
<style>
.see-it__lede {
margin: 1rem 0 0;
max-width: 46rem;
color: var(--dim);
line-height: 1.75;
}
.see-it__inner {
max-width: 780px;
margin: 0 auto;
@@ -84,10 +68,10 @@ class MeController {
}
.see-it__caption {
margin: 1.5rem auto 0;
max-width: 46rem;
margin: 1.5rem 0 0;
text-align: center;
color: var(--dim);
line-height: 1.75;
font-style: italic;
font-size: 0.95rem;
}
</style>
@@ -1,121 +0,0 @@
---
const rows = [
{ job: 'Execution order', owner: 'Green Tea' },
{ job: 'Dependency validation', owner: 'Green Tea' },
{ job: 'Route-specific pipeline', owner: 'Green Tea' },
{ job: 'Missing dependency checks', owner: 'Green Tea' },
{ job: 'Streaming mechanics', owner: 'Green Tea' },
{ job: 'OpenAPI projection', owner: 'Green Tea' },
{ job: 'Secure transport defaults', owner: 'Green Tea' },
{ job: 'Runtime serving boundary', owner: 'Green Tea' },
];
---
<section class="who">
<div class="wrap who__inner">
<div class="who__head">
<p class="kicker">Ownership</p>
<h2>Who should do the infrastructure work?</h2>
</div>
<dl class="who__list">
{
rows.map((row) => (
<div class="who__row">
<dt>{row.job}</dt>
<dd>{row.owner}</dd>
</div>
))
}
<div class="who__row who__row--you">
<dt>Business rules</dt>
<dd>You</dd>
</div>
</dl>
<p class="who__punch">
The framework should carry framework complexity. Your application should carry product complexity.
</p>
</div>
</section>
<style>
.who {
padding-block: clamp(3rem, 8vw, 5.5rem);
}
.who__head {
margin-bottom: 2.2rem;
}
.who__head h2 {
margin-bottom: 0;
}
.who__list {
margin: 0 0 2rem;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: clamp(2rem, 6vw, 4.5rem);
}
.who__row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
padding-block: 0.75rem;
border-bottom: 1px solid color-mix(in srgb, var(--dim) 18%, transparent);
}
.who__row dt {
margin: 0;
color: var(--dim);
}
.who__row dd {
margin: 0;
font-family: var(--font-heading);
font-weight: 600;
color: var(--matcha);
white-space: nowrap;
}
.who__row--you {
grid-column: 1 / -1;
border-bottom: none;
border-top: 1px solid var(--matcha);
margin-top: 1.4rem;
padding-top: 1.2rem;
}
.who__row--you dt {
color: var(--ink);
font-size: 1.05rem;
}
.who__row--you dd {
color: var(--violet);
font-size: 1.35rem;
}
.who__punch {
margin: 0;
max-width: 52rem;
font-size: 1.05rem;
line-height: 1.7;
color: var(--ink);
}
@media (max-width: 700px) {
.who__list {
grid-template-columns: minmax(0, 1fr);
}
}
@media (max-width: 480px) {
.who__row {
font-size: 0.95rem;
}
}
</style>
@@ -1,107 +0,0 @@
---
title: "Green Tea 26.8.0-beta.0: the router stops guessing"
description: "Safe constrained routes, strict paths, complete HEAD and OPTIONS semantics, four runtime targets, and the limits we are deliberately leaving visible."
pubDate: 2026-08-02
author: "Diego Reséndez"
tags: ["green-tea", "release", "routing", "security"]
---
A beta should not mean “we will figure out the boundaries later.” It should mean the boundaries are visible, tested,
and still allowed to move.
Green Tea `26.8.0-beta.0` closes the largest gap in its HTTP surface: the router now understands constrained
parameters, chooses routes deterministically, handles `HEAD` and `OPTIONS` as first-class HTTP methods, and rejects
paths that would otherwise be normalized into something the caller did not send.
It also keeps an important limit in plain sight: this is still a small linear matcher, not a radix tree pretending to
be one.
## Constrained routes, with a deliberately boring regex subset
Routes can now constrain a parameter to one decoded path segment:
```ts
@Get('/users/:id(\\d+)')
findUser(@Param('id') id: string) {
return users.find(id);
}
```
The constraint is anchored to the complete segment automatically. Green Tea accepts character classes, escaped
classes such as `\d`, literal atoms, and bounded simple quantifiers. It rejects groups, alternation, lookarounds,
backreferences, anchors, oversized expressions, and unsafe adjacent unbounded quantifiers at boot.
That is intentional. This feature handles useful typed-looking route shapes without turning application startup into
an arbitrary-regex or obvious ReDoS surface.
When several routes could match, specificity is deterministic:
```text
static segment > constrained parameter > plain parameter > catch-all
```
Registration order is no longer a hidden tie-breaker. Ambiguous routes with the same method and shape fail during
boot instead of waiting for production traffic to discover them.
## A path is either the path you sent, or a 400
`/path` and `/path/` remain equivalent. Repeated separators such as `/path//item` do not. Green Tea rejects repeated
slashes and malformed percent encoding with `400 Bad Request` across Node and Fetch-based adapters, while retaining
the configured security and CORS headers.
The router will not silently collapse an ambiguous URL into a different one.
## HEAD and OPTIONS are HTTP behavior, not afterthoughts
This release adds explicit `@Head` and `@Options` decorators. Explicit handlers always win.
Without one, a buffered `GET` can provide a `HEAD` response with the same status and headers and no body. Streaming
GET routes do not become implicit HEAD routes. An existing path can answer `OPTIONS` automatically with `204` and a
deterministic `Allow` header; configured CORS preflight handling still takes priority.
OpenAPI follows the declarations rather than inventing operations. Constrained parameters become `{param}` path
parameters with `schema.pattern`, while only explicitly declared HEAD and OPTIONS handlers appear as operations.
## The same graph on four targets
The same application code now serves HTTP, SSE, and WebSocket traffic on Node, Deno, Bun, and Cloudflare Workers.
The entry point changes — `app.listen`, `serveDeno`, `serveBun`, or `edgeHandler` — but the route graph does not.
The runtime boundaries still matter. Edge deployments have no filesystem-backed HTML or static serving, and mesh is
limited to Node, Deno, and Bun. Deno also snapshots request and connection metadata before accepting a WebSocket
upgrade because Deno 2.9 invalidates that metadata afterward.
## The supply chain got the same treatment
The core, runtime, and documentation dependency trees were audited and updated before publication. While preparing
this release post, the public site's Astro toolchain was updated too, including patched PostCSS, SVGO, and XML parser
transitives. The automated builds now fail on moderate-or-higher npm advisories instead of leaving the check for the
next release.
Green Tea still has one runtime dependency: `reflect-metadata`. `ws` and `busboy` remain optional peers for
WebSockets and multipart uploads.
## What this release does not build
Route matching remains a linear scan. That is fine for the route tables this beta targets, but it is not the data
structure we would choose for an enormous generated API. A radix-tree matcher remains post-beta work.
Constraints are also a safe, bounded subset — not arbitrary JavaScript regular expressions. Expanding that surface
would require proving it stays predictable and resistant to pathological input; “accept every regex” is not a beta
checkbox.
Mesh remains alpha, and the core API can still shift between beta releases. Pin the version and read the changelog
before upgrading.
## Try it
```sh
npm install @green-tea/core@beta reflect-metadata
```
Then start with the [routing guide](https://green-tea.expressive-tea.io/docs/guides/routing/) or read the complete
[`26.8.0-beta.0` changelog](https://github.com/Expressive-Tea/green-tea/blob/main/CHANGELOG.md).
The router is still small. It is simply much harder to surprise now.
That's the tea. 🍵
@@ -1,138 +0,0 @@
---
title: "The release where I found out what I had shipped"
description: "A second registry I announced that did not work, three ways your own code could take the process down, and the two improvements my benchmark was too small to see."
pubDate: 2026-09-04
author: "Diego Reséndez"
tags: ["green-tea", "release", "performance", "reliability"]
draft: false
---
The last release gave green-tea a way to say what it was doing. This one is mostly about what I saw once it could.
`26.9.0-beta.1` is out on npm and JSR. It has one contributed feature, a handful of things you may have been
waiting for, and four corrections that exist because looking properly turned up problems that announcing loudly had
not.
## The second registry I announced did not work
In August I wrote that green-tea now publishes to JSR as well as npm. That was true. What I did not check is
whether anyone could use it.
JSR serves `src/` rather than the tsup build. My ESM build had extensionless relative imports — fine for a bundler,
fine for Node's resolution of a built package, and not something Deno will resolve. So `jsr:@green-tea/core`
installed and then failed on the first import. The npm package was fine the whole time, which is exactly why I did
not notice: every test I ran, and every runtime suite in CI, went through the built artifact.
It works now, and what actually fixed it was not the import rewrite. It was adding `deno publish --dry-run` to the
release workflow, before the npm publish, so JSR's checks — slow types, module analysis, things npm never looks at —
run while there is still something to do about them. Learning about them after npm has published leaves a version
half-shipped, and JSR versions are permanent.
I would rather tell you the registry was broken for two weeks than have you discover it in an evaluation.
## Three ways your own code could take the process down
The lifecycle stream from the last release is what made these findable. All three are the same shape: green-tea
called something you gave it, and did not consider that it might throw.
A `cors.origins` predicate runs per request. If yours threw — a malformed header, a regex on a value you did not
expect — the exception escaped into the request pipeline and the process went with it. A custom `onError` had the
same problem, and worse timing: the handler you wrote to keep a bad request from becoming an outage was itself an
outage. It now falls back to the built-in renderer and reports the failure, rather than losing the response.
The third is Node's connection cap. Reaching `maxConnections` destroyed the socket with no HTTP response and said
nothing at all, which from the client's side is indistinguishable from a network fault. It logs a warning naming
the dropped peer now, rate-limited to one a minute.
None of these were reported. They came from reading the code with a specific question, which is the same way the
mesh defects turned up in August. I am starting to think that is the only way I find anything.
## Your app boots in its longest chain, not the sum of it
Boot walked the topological order one provider at a time. Three providers that need nothing from each other, 200 ms
of work each, took **616 ms** — the sum. They now boot concurrently and take **210 ms**, which is the longest one
plus overhead.
The framework already computed the dependency graph. Booting the independent nodes together was not a new idea so
much as noticing that the information had been sitting there since the beginning. That is the second release in a
row where the fix was using something the graph already knew, and I do not think that is a coincidence: I keep
building the structure and then forgetting to ask what else it can answer.
The saving scales with how wide your graph is, so a small application will see very little, and an application with
a dozen independent providers will see most of its boot time disappear.
## The two improvements my benchmark was too small to see
Route matching is a linear scan. I have said so in the README for months, and three separate attempts to improve it
measured as *nothing*.
They measured as nothing because the benchmark used **six routes**. Every matcher cost scales with how many
candidates a request walks past, and at six there is nothing to walk past. Specificity ranking, a per-candidate
`decodeURIComponent`, settling the ranking at build time — all three were real, and all three sat below the
resolution of the instrument I was using to judge them.
`npm run bench:compare` now carries 50- and 200-route cases. The same change that measured as noise measures as
this:
| route table | Δ |
|---|---|
| 6 routes | nothing — every row overlaps |
| 50 routes | +3.3%, +3.5% across two runs |
| 200 routes | **+14.9%, +12.0%** — twelve rounds, not one crossing sample |
Route ranking is now settled when the route table is built rather than recomputed per request, and security and
CORS headers are computed once instead of twice. Neither is visible on a six-route table either.
The lesson I actually take from this is not about the router. It is that I spent months believing an optimisation
did not matter because I could not measure it, when what I could not measure was my own test.
## A budget, not a cap
`createApp({ limits: { maxConcurrentRequests } })` bounds how many handlers run at once, per server and per Fetch
adapter. Over the budget a request gets `503` with `Retry-After: 1` rather than queueing behind whatever is already
running.
It counts *executing handlers*, not open connections — so a long-lived SSE stream or a WebSocket upgrade does not
hold a slot for its lifetime, and on Node a client disconnect releases one early. A handler that never returns keeps
its slot forever, which is the honest behaviour for a budget of this shape rather than a bug I am hiding in a
paragraph.
This one is not mine. [@hgshreyas](https://github.com/hgshreyas) wrote it, across two issues and two pull requests,
on a project with no stars and no promise that anyone would review it. The second most useful thing in this release
was written by someone who did not have to.
## Smaller things you may have been waiting for
`createApp({ handleSignals: true })` registers `SIGINT` and `SIGTERM` to close and exit. Off by default, and that is
the design rather than caution — a library that installs process-wide handlers without being asked is a library
that fights your process manager.
`@Sse` can emit an `id:`, so an `EventSource` reconnect has a `Last-Event-ID` to resume from. Without it every
automatic reconnect rebuilt the stream from the start and lost the gap silently, which removes most of the reason to
choose SSE over a raw WebSocket.
The extension-point *types* are exported now, not just the extension points. `TransformerFn` could not be imported,
so a custom transformer had its shape redeclared inline or borrowed off a value with `typeof`. Checking the barrel
for the same oversight found four more: `PluginApi`, `ScopeApi`, `ScopeNode`, `Hooks` and `TeardownFn`.
And every `request:end` is now preceded by a `request:start` carrying the same `requestId`, which is what makes the
stream something you can build a collector on rather than something you can only log.
## Where this leaves the beta
The graph is settled. `createApp`'s options and the plugin API still move — and the plugin API is where I am going
next, because it is public, documented, and has exactly zero plugins written against it. Mesh is still alpha and
still frozen.
I am not freezing the API in a release whose main lesson was that I could not see what I had shipped.
## Try it
```sh
npm install @green-tea/core@beta reflect-metadata
```
Everything above, as a list rather than a story, is on the
[`26.9.0-beta.1` release](https://github.com/Expressive-Tea/green-tea/releases/tag/v26.9.0-beta.1).
That's the tea. 🍵
@@ -1,128 +0,0 @@
---
title: "The release where I took my own advice"
description: "Two breaking changes, one keyword each, both fixing the same thing: places where green-tea asked you to remember an order. Plus the benchmark claim my README carried for two months while the benchmark said otherwise."
pubDate: 2026-09-23
author: "Diego Reséndez"
tags: ["green-tea", "release", "runtimes", "benchmarks"]
draft: false
---
The argument for green-tea is that order should not be something you have to get right. You declare what a step
needs and what it provides, and the framework works out what runs when. No `app.use()` in the correct sequence, no
wondering which middleware already touched the body.
`26.9.0-beta.2` is out on npm and JSR. Both of its breaking changes exist because I had shipped two places where
that argument did not apply to my own code.
## The port that bound anyway
If you serve on Deno or Bun, you wrote this:
```ts
const server = serveDeno(app, { port });
```
And `serveDeno` did not boot your app. It bound the port and waited, and the providers ran on the first request that
arrived. The documented fix — on my own docs page, in a table I wrote — was to remember `await app.boot()` first.
Think about what that meant if you forgot. A missing signing key is not a failed deploy: the boot result is
memoized, rejection included, so the port opens, every request gets a 500 from the runtime, and not one of them
reaches your `onError`. Your logs are empty because the failure never entered the framework's error path. Your
health check passes, because something *is* listening on that port. The process looks fine and serves nothing.
That is precisely the class of bug this project exists to delete, and I had put it in a core helper and then
written a paragraph asking you to work around it. A framework that says order is not your problem should not ship
an entry point whose correct use depends on you having read a page.
They boot before they bind now. Migration is one keyword:
```diff
- const server = serveDeno(app, { port });
+ const server = await serveDeno(app, { port });
```
Both runtimes have top-level `await`, so a module that serves at import time needs nothing else, and the value you
get back is unchanged. A provider that cannot start now fails your deploy, where you will see it.
`edgeHandler` is deliberately untouched. On workerd there is no startup outside a request — there is no earlier
moment to move the failure to, so pretending otherwise would be decoration.
## The event that reported nothing
The second one is smaller and the same shape. A plugin was a function, and `plugin:mounted` — the event whose
entire job is to tell you which plugins mounted — took the name from `fn.name`. That is `""` for an arrow returned
by a factory, which is how every plugin I have written is built. `"plugin"` for a `const`. Whatever survives a
minifier, in production.
So the observability event for plugins named none of them. A plugin is a named object now:
```diff
- const jwt = (options) => ({ scope }) => { scope.add(node); };
+ const jwt = (options) => ({
+ name: options.provides ?? 'jwt',
+ mount({ scope }) { scope.add(node); },
+ });
```
The name is the author's word rather than a compiler artifact, a failed mount reads
`plugin "jwt" failed to mount: …` with the original error as its `cause`, and two plugins claiming the same name
fail `createApp` instead of quietly shadowing each other.
I am keeping this short on purpose. There is a plugin marketplace coming, and the interesting half of this story —
what a plugin ecosystem needs from a contract before strangers start publishing into it — belongs in that post
rather than this one.
`app.boot()` is public now too, for when you drive `app.fetch` from a server you own. And errors are recognised by
a brand rather than `instanceof`, so an `Unauthorized` thrown by a plugin holding its own copy of core stops
rendering as a `500`. Mesh, still alpha, stopped pretending a provider could cross a wire. The
[changelog](https://github.com/Expressive-Tea/green-tea/blob/main/CHANGELOG.md) has all of it.
## The number I had been repeating for two months
Now the part I did not enjoy writing.
Since 7 July my README had said green-tea handled more requests per second than every other framework in three of
four benchmark scenarios. `BENCHMARKS.md` — the file that sentence linked to, one click away — had stopped saying
that at some point over the following two months. Fastify rows had moved. NestJS-on-Fastify had been added. Parity
controls had been tightened. Nobody re-read the sentence, because a claim written into prose is not something
anyone re-measures.
I found it while regenerating the tables for this release, which is the only reason I found it at all.
Then it got worse, in an interesting way. I re-ran the suite on my laptop and green-tea came out *ahead* of Fastify
in three of four — the exact claim I was about to delete, apparently vindicated. It would have been very easy to
keep the sentence and move on.
Except green-tea had not moved. Its four numbers were within 1% of the run three weeks earlier. What had moved was
Fastify, down 7%, and when I lined the deltas up against the order the frameworks run in, they tracked position
rather than code: measured second, down 7%; measured last, up. A browser and the window server were taking about
60% of the machine the whole time. The "win" was my laptop being busy.
I re-ran it on an idle box instead. Coefficient of variation dropped from 4–6% to 0.1–1.3%, and the honest shape
came back: green-tea sits behind Fastify on the JSON, routing and pipeline scenarios, ahead of it on
POST-plus-validation, and roughly 2.8× ahead of Express. That shape reproduced on two very different CPUs. How far
behind did not — 2–8% on one machine, 7–15% on the other — which is why the README no longer quotes a percentage
at all and points at the table instead.
There is a separate question a release has to answer, and comparing this week's numbers against a table from three
weeks ago cannot answer it: *did these commits cost anything?* For that I run both trees on one box in one sitting,
alternating which side goes first. Ten cases. Nine overlapped, which is the result you want — the breaking changes
are boot-time work and none of it reached the per-request path.
The tenth came out **+4.3% in green-tea's favour**, with the two sides' sample ranges not overlapping at all. A
real-looking win. It had no mechanism — the only change that could produce it would have to show up even more
clearly at 200 routes, and that row said +0.1% — so I re-ran that case alone with seven rounds instead of three.
**+0.5%, overlapping.** It was chance, and it is written into `BENCHMARKS.md` as chance.
I want to be clear about why I chased a result that flattered me. A benchmark is for measuring, not for producing a
line to put on a homepage. An unexplained gain deserves the same suspicion as an unexplained loss, and usually
means the benchmark stopped measuring what it claims — a route that started 404ing, a server that booted with the
wrong config. A fast number that is wrong is the worst possible outcome, precisely because it looks like good news.
Two of the three problems in this post were things I had written down and then stopped reading: a table I told you
to remember, and a sentence I never re-measured. The code was not the hard part.
---
`npm i @green-tea/core@beta` — or `deno add jsr:@green-tea/core`. It is still beta, still one person's spare time,
and the [docs](https://green-tea.expressive-tea.io/docs/) describe this release.
-173
View File
@@ -1,173 +0,0 @@
---
title: "Trust is a feature, and I had shipped it as a TODO"
description: "What it took to make green-tea operable: an observability contract, shutdown that actually lets go, a routing difference between runtimes I did not know I had — and two people who contributed to a project with no stars."
pubDate: 2026-08-19
author: "Diego Reséndez"
tags: ["green-tea", "story", "observability", "contributors"]
draft: false
---
There is a difference between a framework you can demo and a framework you can run, and for most of this year
green-tea was firmly the first one.
The demo was good. Declare what a route needs, get a validated execution graph, run only the slice that route
requires. That part works and I still think it is the right idea. But when someone asked me the question every
serious evaluation asks in week one — *what is it doing in production?* — the honest answer was: I don't know, and
neither will you.
`26.8.0-beta.1` is about that gap and the two others hiding behind it.
## "No observability layer" was a sentence in my README for months
I want to be precise about how bad that was, because I was oddly proud of having written it down.
Declaring a gap is not the same as not having one. Every request that went through green-tea was anonymous. There
was no id to correlate a slow response with the step that caused it, no per-step timing, and — worst of the three —
the framework wrote to `console` in a handful of places, which means an application had no way to redirect its own
framework's output. You could ship it, but you could not operate it.
What shipped is a correlated event stream: an id per request, adopted from an incoming `x-request-id` when a gateway
already made one, carried on every event, alongside the matched route *pattern* rather than the concrete URL. That
last detail matters more than it looks — pattern cardinality is bounded, URL cardinality is not, and a metrics
backend fed the second one falls over.
The `console` calls are gone, and what replaced discipline is a lint rule over `src/**`. I do not trust myself to
remember, and neither should you.
What I did not build: a metrics registry, an OpenTelemetry exporter. Both were in the original issue and both would
have been the second runtime dependency this project has. A `traceparent` header is carried through untouched so an
exporter package can do that job. The framework ships the contract; the integration is somebody's package,
possibly mine, later.
I measured the cost instead of guessing at it — about 7% of the framework's own per-request work, roughly 2% once a
real socket is in the path. I mention the number because the first three times I measured it I got three different
wrong answers, one with the sign inverted. That is a story for another post.
## Shutdown: the framework was holding things it never let go of
The second gap was quieter. Green-tea would boot your providers, hand you a database pool, and then, at shutdown,
do nothing about it. `app.close()` drained requests and closed streams — it never told your code that the process
was going away. So every application built on it re-implemented the same `process.on('SIGTERM')` block, and every
one of them got the ordering slightly wrong, because the order you need is the reverse of the order things booted
in and nothing was telling you what that order was.
The framework already knew it. It computes a topological order to run your graph. Using it for teardown was not a
feature so much as an admission that the information was already sitting there.
Now a provider closes its pool in `dispose()`, a plugin registers `onShutdown`, an application passes `hooks`, and
all three land in one registry that awaits them in reverse boot order inside the existing deadline. A failure gets
logged, and the rest still run.
The part I want to flag is the one that is *not* symmetric: on the edge, none of this exists. Workerd has no
shutdown to hook into. I could have quietly no-opped it and let the docs imply parity. It says so instead.
## The bug I found by looking, and the bug CI found by not trusting me
While profiling the router I noticed `GET /public/../admin` returned 404 on Node. On Deno, Bun and Workers, the same
request reached `/admin`. The fetch-based runtimes resolve dot segments inside the `Request` constructor, before my
code ever sees the path.
So the same bytes on the wire were routing differently depending on where you deployed. A framework whose entire
pitch is *the same application model everywhere* had a silent routing divergence, and my own cross-runtime parity
tests could not catch it, because they go through `fetch()` — which normalizes the path before it hits the wire. The
new tests write the request line to a socket by hand.
The second one is more embarrassing and more useful. CI failed the observability work on Node 18 with
`ReferenceError: crypto is not defined`. The global `crypto` landed in Node 19. My `engines` field promises Node 18.
Every machine I own runs Node 20 or newer, and the other three runtimes have the global — so I had shipped code that
made the framework unusable on its own declared floor, and *nothing I could run locally would ever have told me*.
That job exists because I pinned it to the version I promise rather than the version I use. It is the single most
valuable thing in my CI configuration.
## Then I pointed the same question at the part I am proudest of
Mesh is the thing green-tea has that nothing else does: `@needs('billing')` resolves the same whether
billing runs in this process or on another machine. It is the idea I would put on a poster. It is
also the part nobody has run in anger, which — after a day of finding out what "we never checked
that" means — made it the obvious next place to look.
I found eight defects in about six hundred lines. Not one had been reported; all of them came from
going and looking.
The worst is the one that answers a question I had never thought to ask: **what happens if you export
a database connection?** The wire is JSON. A pool has methods and private state and JSON keeps
neither, so it serialized to `{}` — and `{}` is an object. It passed every `if (db)` check, it had no
methods, and it failed as `db.query is not a function` at a call site with no visible relationship to
the export that caused it. Status 200. No warning at either end, at any point.
That is not a bug in the transport. It is a *rule the framework never stated*: a mesh export carries
data, never behaviour. Export what the handle produces, not the handle. Writing that sentence down is
worth more than the guard that now enforces it, and the fact that it took me until now to write it is
the honest part of this story.
Second worst: **a dropped link never reconnected.** Not "reconnected badly" — there was no
reconnection code at all. Deploying a teapot meant restarting every teacup that depended on it, which
turns a routine deploy into a coordinated one and makes boot order part of your architecture. The
framework was quietly asking for an operational discipline it never mentioned.
And the one that stung, because it was fresh: **the request id I had just spent a release adding died
at the process boundary.** Every request got an identity, every event carried it, and the moment the
request crossed to another node the far side opened a new investigation. The one place a distributed
trace is the entire point was the one place it did not reach.
So mesh stays alpha, and I want to be precise about why, because "still alpha" usually means "not
finished". This is not that. The protocol is versioned and peers refuse each other on mismatch. The
secret is compared in constant time. Frames are shape-validated before they reach anything.
Ambiguous routes fail the boot rather than picking one. That is not careless code.
**The label is not about the code. It is about how much I know.** Everything above was found by
looking, which means the supply of things to find is set by how long I look, not by how many users
have complained. What a day added to what I know was almost entirely *here is another thing
distributed systems do to you*. It comes out of alpha when somebody runs it with two real services,
redeploys the teapot on a Tuesday, and tells me what broke — not when I run out of ideas.
## The part I actually want to write
Two people contributed code to this release. I want to be specific about why that matters, and it is not politeness.
This project had no stars, no discussion threads, and no visibility. Contributing to a project in that state buys
you nothing — no reputation, no line on a résumé anybody has heard of, no guarantee the maintainer will even reply.
You are betting your evening on a stranger's repository on the strength of the idea alone. I have been on the other
side of that decision and I usually decided not to.
**[@YxnnXriel](https://github.com/YxnnXriel)** added a timeout to `app.close()`. On the surface: one option. In
practice, every shutdown guarantee in this release is standing on it. The app-wide `shutdownTimeoutMs`, the bounded
`close()` on Deno and Bun, the teardown budget that stops a slow `dispose()` from holding a deploy hostage — all of
it is built on the deadline that pull request introduced. I did not plan that. It just turned out to be the piece
everything else needed.
**[@hgshreyas](https://github.com/hgshreyas)** capped concurrent connections on Node, which had been unbounded —
the framework had no answer whatsoever to load it could not serve. Then followed it with the fix that makes a
non-positive value mean *unlimited* rather than *zero*, which is what anyone typing `0` actually intends. The review
on that one taught me something about my own architecture: the counting cannot live in the shared `app.fetch` path,
because `app.fetch` is not on Node's `listen()` route. I did not know that cleanly until someone else's patch forced
me to say it out loud.
Both of them are still working on things. One of those pull requests is currently blocked on *me* — it needs a piece
of plumbing that does not exist yet, and telling a contributor "your change is right, the missing part is mine" is a
better use of a review than asking them to work around it.
If you are looking for somewhere to start, the honest answer today is that both open issues are already spoken
for — I would rather tell you that than have you find out after cloning. So open one instead. Whatever annoyed you
in the first ten minutes is usually a real bug, and I have yet to receive a report that was not worth having. The
contributing guide covers the branch model and the sign-off, and if you would rather not write the documentation
change, say so and I will. Being early costs something. I would rather say thank you in a way that names what you
built than in a badge.
## Where this leaves the beta
The graph is settled. The plugin API and `createApp`'s options still move. Mesh is still alpha. The API freeze
belongs to the release candidate, and freezing it before this release would have frozen a framework that still could
not tell you what it was doing.
## Try it
```sh
npm install @green-tea/core@beta reflect-metadata
```
Everything above, in the form of a list rather than a story, is on the
[`26.8.0-beta.1` release](https://github.com/Expressive-Tea/green-tea/releases/tag/v26.8.0-beta.1).
That's the tea. 🍵
-53
View File
@@ -1,53 +0,0 @@
---
title: "Where I went, and why RC.1 took longer"
description: "Two months of quiet: more work at my job, autistic burnout, and a record that was overdue. RC.1 is out now, and the wait was on purpose."
pubDate: 2026-11-17
author: "Diego Reséndez"
tags: ["green-tea", "personal", "release"]
---
The last post here went up on September 23, with beta.2. RC.1 was supposed to follow in October.
It came out today instead, as `26.11.0-rc.1` on npm and JSR. That gap deserves an explanation, so
here it is.
## My job needed more of me
Green Tea gets built in the hours my job leaves free. This autumn the workload there went up, and
those hours went with it. Nothing dramatic. There was just less time, and less of me left at the
end of the day to spend on a framework.
## Autistic burnout
This is the harder part to write. I'm autistic, and when the load stays high for long enough I hit
a kind of burnout that a weekend off doesn't fix. Things that are normally easy, like opening the
editor or reading an issue, start costing more than I have. What works for me is stepping back for
a while.
Being the only developer on Green Tea makes that complicated. There's no one to hand the work to,
so when I stop, the project stops. I decided to accept that. I don't want to build a framework that
ships on schedule because its maintainer pushed through burnout, and I wouldn't ask anyone to
depend on one.
## The No Names Sound Machine
The rest of the time went into my music project, [The No Names Sound Machine](https://thenonames.org/en/),
which was overdue for a release. Yes, yes, there's probably some AI slop in my soup. If you
want to listen anyway, it's on the site, or find it on Spotify, or wherever you get your music.
## Why I didn't just ship it
I could have pushed a tag at any point and called it a release candidate. But an RC only means
something if the API has actually stopped moving, so the freeze had to be real before the tag
went out.
So here is what RC.1 promises. The public API of `@green-tea/core`, `/deno`, `/bun` and `/edge` is
frozen. From now until stable, releases are fixes only: nothing gets added, removed, renamed or
narrowed. That isn't a promise you have to take on trust. Every entry point has a committed API
report, and CI fails when the code drifts from it. Mesh is still experimental and stays outside the
promise. The full policy is on the [stability page](https://green-tea.expressive-tea.io/docs/stability/).
## What happens now
Fixes until stable, at a pace I can sustain. Development has also moved into the open: it happens
on [GitHub](https://github.com/Expressive-Tea/green-tea) now, so issues and pull requests go there.
If something in RC.1 breaks for you, that's the place to say so.
+7 -52
View File
@@ -1,43 +1,22 @@
---
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import StabilityBanner from '../components/StabilityBanner.astro';
import '../styles/global.css';
type OpenGraphType = 'website' | 'article';
type StructuredData = Record<string, unknown>;
interface Props {
title?: string;
description?: string;
image?: string;
ogType?: OpenGraphType;
robots?: string;
publishedTime?: Date;
updatedTime?: Date;
authorUrl?: string;
tags?: string[];
structuredData?: StructuredData;
}
const {
title = 'Green Tea — A zen, type-safe graph-pipeline HTTP framework',
description = 'Green Tea is a dependency-driven TypeScript backend framework: declare what your code needs and it derives, validates and executes the graph. Runtime-agnostic, type-safe, calm by design.',
description = 'Green Tea is a graph-pipeline HTTP framework: declare what you need, not the order to build it. Runtime-agnostic, type-safe, calm by design.',
image = '/og.png',
ogType = 'website',
robots = 'index, follow',
publishedTime,
updatedTime,
authorUrl,
tags,
structuredData,
} = Astro.props;
const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
const ogImageURL = new URL(image, Astro.site).toString();
const serializedStructuredData = structuredData
? JSON.stringify(structuredData).replace(/</g, '\\u003c')
: undefined;
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const ogImageURL = new URL(image, Astro.site);
---
<!doctype html>
@@ -50,24 +29,13 @@ const serializedStructuredData = structuredData
<title>{title}</title>
<meta name="description" content={description} />
<meta name="robots" content={robots} />
<!-- Open Graph -->
<meta property="og:type" content={ogType} />
<meta property="og:type" content="website" />
<meta property="og:url" content={canonicalURL} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={ogImageURL} />
{
ogType === 'article' && (
<>
{publishedTime && <meta property="article:published_time" content={publishedTime.toISOString()} />}
{updatedTime && <meta property="article:modified_time" content={updatedTime.toISOString()} />}
{authorUrl && <meta property="article:author" content={authorUrl} />}
{tags?.map((tag) => <meta property="article:tag" content={tag} />)}
</>
)
}
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
@@ -75,30 +43,17 @@ const serializedStructuredData = structuredData
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={ogImageURL} />
{serializedStructuredData && <script type="application/ld+json" set:html={serializedStructuredData} />}
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="Green Tea. Blog" href="/rss.xml" />
<!-- Fonts -->
<link
rel="preload"
href="/fonts/zen-maru-gothic-latin-700.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700&display=swap" rel="stylesheet" />
<meta name="generator" content={Astro.generator} />
{/* GoatCounter — no cookies, no personal data, no consent banner needed. */}
<script
data-goatcounter="https://greentea.goatcounter.com/count"
async
src="//gc.zgo.at/count.js"></script>
</head>
<body>
<StabilityBanner />
<Header />
<main>
<slot />
+1 -31
View File
@@ -23,39 +23,9 @@ const dateFormat = new Intl.DateTimeFormat('en-US', {
const wordCount = body.trim().split(/\s+/).filter(Boolean).length;
const readingTime = Math.max(1, Math.round(wordCount / 200));
const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
const heroImageURL = new URL(heroImage ?? '/og.png', Astro.site).toString();
const structuredData = {
'@context': 'https://schema.org',
'@type': 'BlogPosting',
headline: title,
description,
image: heroImageURL,
datePublished: pubDate.toISOString(),
dateModified: (updatedDate ?? pubDate).toISOString(),
author: {
'@type': 'Person',
name: author,
},
publisher: {
'@type': 'Organization',
name: 'Expressive Tea Team',
},
mainEntityOfPage: canonicalURL,
...(tags && tags.length > 0 ? { keywords: tags.join(', ') } : {}),
};
---
<Base
title={`${title} — Green Tea. Blog`}
description={description}
image={heroImage}
ogType="article"
publishedTime={pubDate}
updatedTime={updatedDate ?? pubDate}
tags={tags}
structuredData={structuredData}
>
<Base title={`${title} — Green Tea. Blog`} description={description} image={heroImage}>
<article class="post section">
<div class="wrap prose">
<p class="post-nav"><a href="/blog/">← Back to the blog</a></p>
+1 -1
View File
@@ -6,7 +6,7 @@ const title = '404 — Green Tea.';
const description = 'This page steeped too long. It’s gone — but the rest of the garden is right here.';
---
<Base title={title} description={description} robots="noindex, follow">
<Base title={title} description={description}>
<section class="notfound section">
<div class="wrap notfound__inner">
<div class="notfound__text">
+6 -42
View File
@@ -1,64 +1,28 @@
---
import Base from '../layouts/Base.astro';
import Hero from '../components/sections/Hero.astro';
import WhoDoesTheWork from '../components/sections/WhoDoesTheWork.astro';
import GraphNotChain from '../components/sections/GraphNotChain.astro';
import FollowsDemand from '../components/sections/FollowsDemand.astro';
import HowItCompares from '../components/sections/HowItCompares.astro';
import RunsEverywhere from '../components/sections/RunsEverywhere.astro';
import RealTime from '../components/sections/RealTime.astro';
import Batteries from '../components/sections/Batteries.astro';
import Plugins from '../components/sections/Plugins.astro';
import SeeIt from '../components/sections/SeeIt.astro';
import Faq from '../components/sections/Faq.astro';
import HonestBeta from '../components/sections/HonestBeta.astro';
const title = 'Green Tea — Dependency-driven TypeScript backend framework';
const title = 'Green Tea — Type-safe graph-pipeline framework for Node, Deno & Bun';
const description =
'Build TypeScript backends with less infrastructure in your head. Declare what your code needs and Green Tea derives, validates and executes the graph across Node, Deno, Bun and the edge.';
const canonicalURL = new URL('/', Astro.site).toString();
const repositoryURL = 'https://github.com/Expressive-Tea/green-tea';
const structuredData = {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'WebSite',
'@id': `${canonicalURL}#website`,
url: canonicalURL,
name: 'Green Tea',
description,
},
{
'@type': 'SoftwareApplication',
'@id': `${canonicalURL}#software`,
name: 'Green Tea',
description,
applicationCategory: 'DeveloperApplication',
operatingSystem: 'Cross-platform',
url: canonicalURL,
sameAs: repositoryURL,
license: `${repositoryURL}/blob/main/LICENSE`,
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
},
],
};
'Your API is a graph, not a middleware chain. Declare what each step needs and Green Tea computes the order — one runtime dependency, type-safe, runtime-agnostic, calm by design.';
---
<Base title={title} description={description} structuredData={structuredData}>
<Base title={title} description={description}>
<Hero />
<WhoDoesTheWork />
<GraphNotChain />
<FollowsDemand />
<SeeIt />
<HowItCompares />
<RunsEverywhere />
<RealTime />
<Batteries />
<Plugins />
<RunsEverywhere />
<HowItCompares />
<SeeIt />
<Faq />
<HonestBeta />
</Base>
+1 -21
View File
@@ -1,25 +1,5 @@
/* Green Tea. — marketing site global styles */
@font-face {
font-family: 'Zen Maru Gothic';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/zen-maru-gothic-latin-500.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Zen Maru Gothic';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/zen-maru-gothic-latin-700.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
@import './brand.css';
:root {
--base: #0d1117;