diff --git a/.superpowers/sdd/progress.md b/.superpowers/sdd/progress.md index f0ced7a..75fba27 100644 --- a/.superpowers/sdd/progress.md +++ b/.superpowers/sdd/progress.md @@ -5,3 +5,11 @@ Design: .specs/2026-07-10-green-tea-site-design.md Stack: Astro static + mdx/sitemap/rss. EN, dark-only, no CMS, manual CF Pages deploy. 5 tasks. (tasks pending) + +Task 1: complete (commit 0969882, review clean — spec PASS) + Astro ^7.0.7 static + mdx/sitemap, @astrojs/rss dep. Exact palette in global.css, dark-only. Base.astro (OG/Twitter/favicon/ZenMaru font/RSS-alternate), Header (wordmark violet period, nav Docs/Blog/GitHub/npm), Footer (tagline + Thats the tea), GraphMotif.astro (matcha+1 violet node), brand assets copied, .gitignore ok. Build clean. + CARRY-FORWARD for later tasks: (1) screenshots MUST use `astro preview` over HTTP, NOT file:// (Astro root-absolute asset paths break under file://). (2) use --violet from global.css, NOT brand.css --gt-purple (dark #a78bfa, inert but confusing). (3) npm placeholder should be @green-tea/core (impl guessed @expressive-tea/core). (4) rss.xml + og.png still missing (Tasks 3/5). + +Task 2: complete (landing page, spec PASS) + 7 sections in src/components/sections/ (Hero, GraphNotChain, RunsEverywhere, RealTime, Batteries, SeeIt, HonestBeta), composed in index.astro. Verbatim copy per brief. Shared .kicker/.btn/.btn-row primitives added to global.css for reuse across sections. Hero: wordmark lockup + H1 + subhead + 3 CTAs + GraphMotif ambient (right side desktop, shrunk+faded below content on mobile). GraphNotChain: faint full-bleed GraphMotif behind text (opacity .14) + violet-bordered punch line. SeeIt: astro:components Code with theme="github-dark", exact snippet from brief. All CTAs use @green-tea/core (npm) and expressive-tea/green-tea (GitHub) placeholders per instruction, not Header's existing @expressive-tea/core. Build clean; 390px and 1440px verified zero horizontal overflow (scrollWidth === clientWidth) via headless Playwright; screenshots via astro preview over HTTP (not file://) per Task 1 carry-forward. + CARRY-FORWARD: Header/Footer still reference @expressive-tea/core npm placeholder (Task 1 artifact, out of scope here) — inconsistent with @green-tea/core now used on the landing page; worth reconciling in a later task. diff --git a/src/components/sections/Batteries.astro b/src/components/sections/Batteries.astro new file mode 100644 index 0000000..5870420 --- /dev/null +++ b/src/components/sections/Batteries.astro @@ -0,0 +1,86 @@ +--- +const cards = [ + { title: 'Secure by default', body: 'Hardening headers, native TLS, CORS done right.' }, + { + title: 'Real validation', + 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." }, +]; +--- + +
+
+
+

Batteries, calm by design

+

Serious defaults. Zero ceremony.

+
+ + +
+
+ + diff --git a/src/components/sections/GraphNotChain.astro b/src/components/sections/GraphNotChain.astro new file mode 100644 index 0000000..e77a079 --- /dev/null +++ b/src/components/sections/GraphNotChain.astro @@ -0,0 +1,115 @@ +--- +import GraphMotif from '../GraphMotif.astro'; +--- + +
+ + +
+

The idea

+

A graph, not a chain.

+ +

+ 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. +

+ +
    +
  • + 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.
  • +
+ +

+ This is pure composition. No other framework shows it, because no one else has the graph. +

+
+
+ + diff --git a/src/components/sections/Hero.astro b/src/components/sections/Hero.astro new file mode 100644 index 0000000..64a0bc5 --- /dev/null +++ b/src/components/sections/Hero.astro @@ -0,0 +1,130 @@ +--- +import logoUrl from '../../assets/logo.svg?url'; +import GraphMotif from '../GraphMotif.astro'; +--- + +
+
+
+ + +

A zen, opinionated, type-safe framework.

+ +

+ 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. +

+ + + +

Beta · calm by design

+
+ + +
+
+ + diff --git a/src/components/sections/HonestBeta.astro b/src/components/sections/HonestBeta.astro new file mode 100644 index 0000000..e66ec11 --- /dev/null +++ b/src/components/sections/HonestBeta.astro @@ -0,0 +1,50 @@ +--- +--- + +
+
+

Honest: it's beta.

+ +

+ 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. +

+ + + +

That's the tea. 🍵

+
+
+ + diff --git a/src/components/sections/RealTime.astro b/src/components/sections/RealTime.astro new file mode 100644 index 0000000..1111b0d --- /dev/null +++ b/src/components/sections/RealTime.astro @@ -0,0 +1,37 @@ +--- +--- + +
+
+

Real-time

+

One primitive for real-time.

+ +

+ SSE, ndjson, or a duplex WebSocket — return an AsyncIterable. One mental model, one line. No + separate gateway, no bolt-on package. +

+
+
+ + diff --git a/src/components/sections/RunsEverywhere.astro b/src/components/sections/RunsEverywhere.astro new file mode 100644 index 0000000..324ce07 --- /dev/null +++ b/src/components/sections/RunsEverywhere.astro @@ -0,0 +1,71 @@ +--- +const chips = ['app.listen(port)', 'serveDeno(app)', 'serveBun(app)', 'edgeHandler(app)']; +--- + +
+
+

Runtime-agnostic

+

Write it once. Run it everywhere.

+ +

+ Node, Deno, Bun — and the edge. The same src/ runs on all of them; the only line that changes is + how you serve it. +

+ + + +

Built on web standards. Not hostage to a runtime's fate.

+
+
+ + diff --git a/src/components/sections/SeeIt.astro b/src/components/sections/SeeIt.astro new file mode 100644 index 0000000..7aba24e --- /dev/null +++ b/src/components/sections/SeeIt.astro @@ -0,0 +1,77 @@ +--- +import { Code } from 'astro:components'; + +const snippet = `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 + } +}`; +--- + +
+
+
+

See it

+

The whole model, in one screen.

+
+ +
+ +
+ +

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

+
+
+ + diff --git a/src/pages/index.astro b/src/pages/index.astro index 5f7237f..4206ec3 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,24 @@ --- import Base from '../layouts/Base.astro'; +import Hero from '../components/sections/Hero.astro'; +import GraphNotChain from '../components/sections/GraphNotChain.astro'; +import RunsEverywhere from '../components/sections/RunsEverywhere.astro'; +import RealTime from '../components/sections/RealTime.astro'; +import Batteries from '../components/sections/Batteries.astro'; +import SeeIt from '../components/sections/SeeIt.astro'; +import HonestBeta from '../components/sections/HonestBeta.astro'; + +const title = 'Green Tea. — A zen, opinionated, type-safe framework'; +const description = + '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.'; --- - -

Green Tea.

+ + + + + + + + diff --git a/src/styles/global.css b/src/styles/global.css index d7bc886..974b0ba 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -134,4 +134,71 @@ a:focus-visible { section { padding-block: clamp(3rem, 8vw, 6rem); + overflow-x: clip; +} + +/* Shared marketing primitives — used across landing sections */ +.section--panel { + background: var(--panel); +} + +.kicker { + display: inline-block; + font-size: 0.8rem; + font-weight: 600; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--matcha); + margin: 0 0 0.85em; +} + +.btn { + display: inline-flex; + align-items: center; + gap: 0.4em; + padding: 0.7em 1.4em; + border-radius: 8px; + font-weight: 600; + font-size: 0.95rem; + border: 1px solid transparent; + line-height: 1.2; + transition: + background-color 0.15s ease, + border-color 0.15s ease, + color 0.15s ease; +} + +.btn:hover, +.btn:focus-visible { + text-decoration: none; +} + +.btn--primary { + background: var(--matcha); + color: var(--base); +} + +.btn--primary:hover, +.btn--primary:focus-visible { + background: var(--matcha-deep); + color: var(--base); +} + +.btn--ghost { + background: transparent; + border-color: color-mix(in srgb, var(--dim) 45%, transparent); + color: var(--ink); +} + +.btn--ghost:hover, +.btn--ghost:focus-visible { + border-color: var(--matcha); + color: var(--matcha); +} + +.btn-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.9rem; }