The site hangs off the expressive-tea.io cPanel as green-tea.expressive-tea.io. A four-level docs.green-tea.expressive-tea.io subdomain reads badly and would need its own AutoSSL cert (the *.expressive-tea.io wildcard stops one level up). A /docs subfolder needs no extra host, DNS, or cert — it's a path — and is what most projects do. So the docs site now builds with base: '/docs' (its dist/ contents drop into the subdomain's docs/ folder in cPanel), the 77 hard-coded content links are prefixed, and the two hero actions Starlight doesn't rewrite are fixed by hand. Verified: /docs/ serves, / 404s, no unprefixed internal href remains. README points at the new docs URL. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
48 lines
2.4 KiB
Plaintext
48 lines
2.4 KiB
Plaintext
---
|
|
title: Green Tea.
|
|
description: A zen, opinionated, type-safe framework — your API is a graph you can see, slice, and trust, not a chain.
|
|
template: splash
|
|
hero:
|
|
image:
|
|
file: ../../assets/logo.svg
|
|
alt: Green Tea
|
|
tagline: A zen, opinionated, type-safe framework. Your API is a dependency graph you can see, slice, and trust — not a mutable bag threaded through positional middleware. That's the tea. 🍵
|
|
actions:
|
|
- text: Get started
|
|
link: /docs/getting-started/
|
|
icon: right-arrow
|
|
variant: primary
|
|
- text: The idea
|
|
link: /docs/concepts/the-graph/
|
|
icon: open-book
|
|
variant: minimal
|
|
---
|
|
|
|
import { Card, CardGrid } from '@astrojs/starlight/components';
|
|
|
|
## Less to hold in your head
|
|
|
|
Most frameworks make you keep the whole request in your head: which middleware ran, whether `req.user` exists by now, what fired in what order. green-tea puts the request **on the page** — you declare what each step _needs_ and _produces_, and the framework computes the order, type-checks the wiring, and can print the whole thing.
|
|
|
|
<CardGrid stagger>
|
|
<Card title="A graph, not a chain" icon="puzzle">
|
|
Declare `needs`/`provides`; green-tea topologically sorts it. No ordering bugs, no positional guesswork — each route runs only its slice of the graph.
|
|
</Card>
|
|
<Card title="The type is the contract" icon="approve-check">
|
|
In the typed `flow` core, a handler that reads `ctx.user` **fails to compile** if no step produces `user`. "It was undefined in prod" disappears at build time.
|
|
</Card>
|
|
<Card title="See the request before it runs" icon="magnifier">
|
|
`app.explain('/users/:id')` prints the ordered chain; `GET /__graph__` renders it as a live diagram. Onboarding and audits are reading, not archaeology.
|
|
</Card>
|
|
<Card title="One primitive for real-time" icon="rocket">
|
|
Declare `@Sse`, `@Stream`, or `@Ws` and return an `AsyncIterable` — the transport streams it (SSE, ndjson, or a WebSocket duplex) with backpressure and cleanup handled. No separate gateway.
|
|
</Card>
|
|
<Card title="Runs wherever JS runs" icon="laptop">
|
|
Node, Deno, Bun, and the edge — the same app, you only swap the entry point. HTTP, SSE, and WebSocket behave identically on all four.
|
|
</Card>
|
|
</CardGrid>
|
|
|
|
:::note[Beta]
|
|
green-tea is **beta**, on the RC track. One runtime dependency (`reflect-metadata`); `ws` and `busboy` are optional peers. [mesh](/docs/guides/mesh/) is alpha and gated behind an explicit opt-in.
|
|
:::
|