Files
website/.specs/2026-07-10-green-tea-site-plan.md
T
2026-07-10 18:48:25 -05:00

18 KiB
Raw Blame History

Green Tea marketing site + blog — Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: superpowers:subagent-driven-development. Steps use checkbox (- [ ]) syntax.

Goal: A serious, on-brand Astro landing site that sells + informs what Green Tea is, plus a git-based blog with one launch post. Repo: green-tea-site.

Architecture: Static Astro site. Landing = section components with locked copy. Blog = content collections (MDX in git, zod schema) + RSS + sitemap. Dark-only, brand-consistent with the docs. No CMS, no deploy CI (manual Cloudflare Pages).

Tech stack: Astro (latest stable, align with docs major ^7), @astrojs/mdx, @astrojs/sitemap, @astrojs/rss, TypeScript.

Global Constraints

  • English copy. Calm, zen, confident — NOT hypey. Match the voice of the copy blocks in this plan verbatim; don't rewrite them punchier.
  • Palette (exact hex): base #0D1117, panel #161B22, matcha #5FB88A, matcha-deep #3FA873, violet #7C6CF0 (graph accents only), ink #E6EDF3, dim #8B949E. Dark-only (no light mode).
  • Fonts: Zen Maru Gothic (wordmark + h1–h3), system/Inter stack for body. Load via Google Fonts <link> (as the docs do).
  • Brand assets copied from the framework repo docs: /Users/chrnx/projects/expressive-tea/green-tea/website/src/styles/brand.css, .../src/assets/logo.svg, .../public/favicon.svg.
  • Canonical site URL https://green-tea.dev; docs link out to https://docs.green-tea.dev; GitHub + npm links use placeholders https://github.com/… / https://www.npmjs.com/package/@green-tea/core (leave as clearly-marked placeholders — the repo is private Gitea and npmjs isn't published yet).
  • No deploy automation. No CI. A README documents the manual build + Cloudflare Pages steps.
  • Verify each task with npm run build (must succeed) + a Playwright screenshot at 1440×900 (desktop) and 390×844 (mobile) of the affected page.
  • Sign-off phrase used once, in the footer/close: "That's the tea." 🍵
  • Commit conventionally, git commit -s (DCO), NO AI co-author.

Files:

  • Create: package.json, astro.config.mjs, tsconfig.json, .gitignore
  • Create: src/styles/global.css (palette vars + base + prose), copy src/styles/brand.css
  • Create: public/favicon.svg, src/assets/logo.svg (copied)
  • Create: src/components/{Header,Footer,GraphMotif}.astro
  • Create: src/layouts/Base.astro
  • Create: src/pages/index.astro (temporary placeholder: <Base><h1>Green Tea.</h1></Base>)

Deliverable: npm run build produces a static site; the shell (header with wordmark + nav, footer) renders on-brand.

  • Step 1: Scaffold Astro + integrations
cd /Users/chrnx/projects/expressive-tea/green-tea-site
npm create astro@latest . -- --template minimal --no-install --no-git --typescript strict --yes
npx astro add mdx sitemap --yes
npm install @astrojs/rss

If npm create refuses a non-empty dir (.specs/, .git/ exist), scaffold in a temp dir and move files in, or create package.json/astro.config.mjs/tsconfig.json by hand (minimal Astro). Ensure astro.config.mjs sets site: 'https://green-tea.dev' and includes mdx() and sitemap().

  • Step 2: Copy brand assets
D=/Users/chrnx/projects/expressive-tea/green-tea/website
mkdir -p src/styles src/assets public
cp "$D/src/styles/brand.css" src/styles/brand.css
cp "$D/src/assets/logo.svg" src/assets/logo.svg
cp "$D/public/favicon.svg" public/favicon.svg
  • Step 3: src/styles/global.css — CSS custom properties for the exact palette above, body{background:var(--base);color:var(--ink);font-family:...}, a .wrap{max-width:1120px;margin:0 auto;padding:0 24px} container, prose defaults, and heading font = Zen Maru Gothic. Import brand.css. Generous line-height, zen spacing.

  • Step 4: src/components/GraphMotif.astro — a reusable, subtle SVG venation-graph motif (matcha lines + nodes + one violet node), the same visual language as the video slide backgrounds. Accepts props for position/opacity. Used as ambient section decoration. Reference geometry (adapt): a midrib path with branch veins ending in small circles, one #7C6CF0 node.

  • Step 5: Header.astro — sticky top bar: leaf logo + Green Tea. wordmark (matcha, violet period on the .), nav links: Docs (https://docs.green-tea.dev), Blog (/blog), GitHub (placeholder), npm (placeholder). Mobile: collapses to logo + a simple menu (or just wrap links).

  • Step 6: Footer.astro — Green Tea. + tagline "A zen, opinionated, type-safe framework.", link columns (Docs · Blog · GitHub · npm), bottom line © 2026 · MIT · That's the tea. 🍵.

  • Step 7: Base.astro layout — <head> with charset/viewport, <title>/<meta description> from props, Open Graph + Twitter card tags (title, description, image /og.png placeholder), favicon link, Google Fonts <link> for Zen Maru Gothic, imports global.css. Slots Header + <slot/> + Footer.

  • Step 8: temp index.astro using Base with a placeholder <h1>Green Tea.</h1>.

  • Step 9: Build + screenshot + commit

npm run build
npx playwright screenshot --viewport-size 1440,900 "file://$PWD/dist/index.html" /tmp/site-shell.png
git add -A && git commit -s -m "chore: scaffold Astro site + brand shell (header, footer, layout, motif)"

Expected: build succeeds; screenshot shows branded header + footer, dark base.


Task 2: Landing page (/) — the pitch

Files:

  • Create: src/components/sections/{Hero,GraphNotChain,RunsEverywhere,RealTime,Batteries,SeeIt,HonestBeta}.astro
  • Modify: src/pages/index.astro (compose the sections)

Deliverable: npm run build; the landing reads as serious + on-brand and lands the composition pitch above the fold.

Use this copy VERBATIM (calm voice — do not rewrite punchier):

  • Step 1: Hero.astro

    • Wordmark Green Tea. (violet period) + logo.
    • H1: A zen, opinionated, type-safe framework.
    • Subhead: Your API is a graph, not a middleware chain. You declare what each step needs — the framework computes the order. One runtime dependency. Runs wherever JavaScript runs.
    • CTAs: Get started → https://docs.green-tea.dev · GitHub (placeholder) · npm (placeholder).
    • Micro line: Beta · calm by design.
    • Ambient GraphMotif to one side; center/left text safe.
  • Step 2: GraphNotChain.astro (the headline idea)

    • Kicker: The idea
    • H2: A graph, not a chain.
    • Body: 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.
    • Two example lines (styled as a list):
      • Need an ACL check on a user? The ACL is a step that itself needs the user. Ask for the ACL — the user is pulled in for you.
      • Add a friends provider, then ask for friends — and the user arrives with the friend list.
    • Punch: This is pure composition. No other framework shows it, because no one else has the graph.
  • Step 3: RunsEverywhere.astro

    • Kicker: Runtime-agnostic
    • H2: Write it once. Run it everywhere.
    • Body: Node, Deno, Bun — and the edge. The same src/ runs on all of them; the only line that changes is how you serve it.
    • Four code chips: app.listen(port) · serveDeno(app) · serveBun(app) · edgeHandler(app).
    • Micro: Built on web standards. Not hostage to a runtime's fate.
  • Step 4: RealTime.astro

    • Kicker: Real-time
    • H2: One primitive for real-time.
    • Body: SSE, ndjson, or a duplex WebSocket — return an AsyncIterable. One mental model, one line. No separate gateway, no bolt-on package.
  • Step 5: Batteries.astro — a 6-card grid:

    • Secure by default — hardening headers, native TLS, CORS done right.
    • Real validation — Standard Schema; bring zod, valibot, or arktype. The core stays dependency-free.
    • OpenAPI 3.1 — projected from the same graph. No extra decorators.
    • See the graph — interactive, served by your app. Not behind a paywall.
    • Loud boot — a missing dependency fails at startup, not in production.
    • One dependency — no Express, no Inversify. Maintenance is the framework's job, not yours.
    • Section H2: Serious defaults. Zero ceremony. · Kicker Batteries, calm by design.
  • Step 6: SeeIt.astro — Kicker See it, H2 The whole model, in one screen., then this code block (syntax-highlighted via Astro's built-in Shiki, dark theme):

import { createApp, Provider, Step, Route, Get, Module, needs } from '@green-tea/core';

@Provider({ provides: 'db' })
class Database {
  provide() { return { db: connect() }; }
}

@Step({ provides: 'user', needs: ['db', 'req'] })
class Authenticate {
  run(ctx) { return { user: ctx.db.find(ctx.req.headers['x-token']) }; }
}

@Route('/me')
class MeController {
  @Get('/')
  me(@needs('user') user) {
    return user;              // ask for `user` — the graph wires db + auth for you
  }
}

Caption: Declare what you need. The framework figures out the order.

  • Step 7: HonestBeta.astro

    • H2: Honest: it's beta.
    • Body: 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.
    • CTAs: Read the docs · Star on GitHub (placeholder).
    • Sign-off (matcha, larger): That's the tea. 🍵
  • Step 8: Compose in index.astro in the order Hero → GraphNotChain → RunsEverywhere → RealTime → Batteries → SeeIt → HonestBeta. Set the page <title> = Green Tea. — A zen, opinionated, type-safe framework and a strong meta description.

  • Step 9: Build + screenshots (desktop + mobile) + commit

npm run build
npx playwright screenshot --viewport-size 1440,900 --full-page "file://$PWD/dist/index.html" /tmp/landing-desktop.png
npx playwright screenshot --viewport-size 390,844 --full-page "file://$PWD/dist/index.html" /tmp/landing-mobile.png
git add -A && git commit -s -m "feat: landing page — the pitch (graph, runtime-agnostic, real-time, batteries)"

Expected: build succeeds; both screenshots show a cohesive, calm, on-brand landing; hero + "A graph, not a chain" read clearly; responsive (no horizontal overflow on mobile).


Task 3: Blog system (collection, index, post layout, RSS)

Files:

  • Create: src/content.config.ts (or src/content/config.ts per Astro version) — blog collection + zod schema
  • Create: src/pages/blog/index.astro (list)
  • Create: src/pages/blog/[...slug].astro (post)
  • Create: src/layouts/Post.astro
  • Create: src/pages/rss.xml.js
  • Create: src/content/blog/.gitkeep (empty for now; post lands in Task 4)

Deliverable: npm run build; /blog renders (empty-state ok), post route + layout compile, /rss.xml valid.

  • Step 1: Collection schema — blog collection, type: 'content', zod: title string, description string, pubDate z.coerce.date(), updatedDate optional date, author string default 'Diego Reséndez', tags z.array(z.string()).optional(), draft boolean default false, heroImage optional string.

  • Step 2: Post.astro layout — extends Base; renders title (Zen Maru h1), a meta row (formatted date · author · reading time), the article prose (branded .prose), and a "← Back to the blog" link. Compute reading time from rendered text length (~200 wpm; a small inline helper is fine).

  • Step 3: /blog/index.astro — getCollection('blog', ({data}) => !data.draft), sort by pubDate desc, render a card list (title link, date, description, tags). Page title "Blog — Green Tea." + description. If empty, a calm "No posts yet." line.

  • Step 4: /blog/[...slug].astro — getStaticPaths from the collection, render body through Post.astro.

  • Step 5: rss.xml.js — @astrojs/rss: title "Green Tea — Blog", the site description, site from context, items from non-draft posts (link /blog/<slug>/, pubDate, description). Ensure it's linked in Base.astro head (<link rel="alternate" type="application/rss+xml">).

  • Step 6: Build + commit

npm run build
npx playwright screenshot --viewport-size 1440,900 "file://$PWD/dist/blog/index.html" /tmp/blog-index.png
git add -A && git commit -s -m "feat(blog): content collection, index, post layout, RSS"

Expected: build succeeds; /blog renders the empty-state; dist/rss.xml exists and is well-formed.


Task 4: Launch post — "Why I rebuilt my framework from scratch"

Files:

  • Create: src/content/blog/why-i-rebuilt-my-framework.mdx

Deliverable: the post renders in /blog, at its slug, and in RSS. It's the cornerstone that informs + convinces.

  • Step 1: Write the post — frontmatter: title: "Why I rebuilt my framework from scratch", description: "I built a decorator framework on Express and Inversify. Then the foundation kept moving under me. So I rebuilt the idea from zero — as a graph.", pubDate: 2026-07-10, author: "Diego Reséndez", tags: ["green-tea", "story", "architecture"].

    Body — calm founder voice (first person, short paragraphs, no hype), covering this arc. Write full prose from these beats (each beat ≈ 1–2 short paragraphs):

    1. The ground moved. I built a framework, Expressive Tea — decorators on Express, dependency injection from Inversify. It shipped to production and it worked. Until the foundation started shifting under me.
    2. Framework on a framework. Migrating to Express 5 meant chasing the base and every breaking change it pushed into my chain. When your framework lives on another framework, you inherit its churn.
    3. The DI rug-pull. Then Inversify 6 was hard-deprecated — no more development — and the jump to v7 forced a refactor. The dependency-injection foundation was abandoned under me.
    4. The papercuts. Middleware ordering as a permanent chore. Typing that got complicated keeping that order straight. Decorators that were already chaotic. Real-time and SSE as bolt-on packages you wire up yourself.
    5. The realization. I was spending my time maintaining someone else's foundation. So I rebuilt the idea from zero — everything in-house.
    6. What it became — Green Tea. The request pipeline is an explicit dependency graph, not a mutable middleware chain. You declare what each step needs; the framework computes the order. Real-time is one primitive — return an AsyncIterable. It runs on Node, Deno, Bun, and the edge, on web standards. One runtime dependency.
    7. Why "graph" matters. Because you compose by asking for the highest-level thing you need — and its dependencies resolve transitively. That's the part no chain-based framework can show.
    8. Honest close. Green Tea is in beta. It doesn't have a decade of ecosystem. You come for the model and the ergonomics. If you're tired of maintaining someone else's foundation, come try it. That's the tea. 🍵

    Keep it ~600–900 words. Use a couple of small inline code spans (@needs('user'), AsyncIterable) but no long code blocks (this is a story post). End with the sign-off.

  • Step 2: Build + screenshot + commit

npm run build
SLUG=$(ls dist/blog | grep -v index | head -1)
npx playwright screenshot --viewport-size 1440,900 --full-page "file://$PWD/dist/blog/why-i-rebuilt-my-framework/index.html" /tmp/post.png
git add -A && git commit -s -m "content(blog): launch post — why I rebuilt my framework"

Expected: post renders with title, date, reading time, prose; appears on /blog; in dist/rss.xml.


Task 5: Polish — 404, SEO/OG, README, final pass

Files:

  • Create: src/pages/404.astro
  • Create: public/og.png (a branded 1200×630 OG image — reuse a slide-style background + wordmark; can be generated the same way as the video slides, or a simple branded Astro→screenshot)
  • Create: README.md
  • Create: public/robots.txt
  • Review/adjust: responsive + a11y across pages

Deliverable: cohesive, shippable site.

  • Step 1: 404.astro — branded, calm: "This page steeped too long." / "Nothing here." + link home + a small motif. Uses Base.

  • Step 2: OG image — a 1200×630 public/og.png: dark base + graph motif + Green Tea. wordmark + tagline. (Author an HTML like the video slides and screenshot at 1200,630, or reuse bg-hero styling.) Reference it in Base.astro OG/Twitter tags.

  • Step 3: robots.txt — allow all, point to https://green-tea.dev/sitemap-index.xml.

  • Step 4: README.md — what the repo is; npm install / npm run dev / npm run build; manual Cloudflare Pages deploy: framework preset = Astro, build command npm run build, output dir dist, set the custom domain green-tea.dev; note the GitHub/npm link placeholders to fill when public.

  • Step 5: Final responsive/a11y pass — headings hierarchy, color contrast (ink on base passes AA), focus states on links/buttons, images have alt, no horizontal scroll at 390px. Fix anything found.

  • Step 6: Build + full screenshots + commit

npm run build
npx playwright screenshot --viewport-size 1440,900 --full-page "file://$PWD/dist/index.html" /tmp/final-desktop.png
npx playwright screenshot --viewport-size 390,844 --full-page "file://$PWD/dist/index.html" /tmp/final-mobile.png
git add -A && git commit -s -m "polish: 404, OG image, README (manual CF Pages deploy), a11y pass"

Expected: build clean; site cohesive on desktop + mobile; README documents manual deploy.


Self-Review

Coverage vs design: Hero + 6 pitch sections (Task 2) ✅; blog collection/index/post/RSS (Task 3) ✅; launch post (Task 4) ✅; brand shell/nav/footer/motif (Task 1) ✅; 404/OG/SEO/README-manual-deploy (Task 5) ✅. Docs stay external (linked, not rebuilt) ✅. EN copy, dark-only, no CMS, no deploy CI — all honored.

Placeholder scan: GitHub/npm links are intentional, clearly-marked placeholders (repo private, npmjs unpublished) — documented in Global Constraints + README. No TBD in copy; all section + post copy is provided.

Consistency: palette hex, wordmark Green Tea. (violet period), sign-off "That's the tea." used once (footer + honest-beta close), Zen Maru for headings — consistent across tasks.

Scope: one cohesive site; non-goals (comments, search, i18n, pagination, analytics, deploy CI) explicitly deferred.