From 0218508a967f8fb6c021b5f77a515d187a1b88f9 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Mon, 17 Aug 2026 13:21:44 -0500 Subject: [PATCH] docs(readme): lead with what the framework owns, not with what it is not MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follows the website copy strategy, translated from marketing register into the one this file is read in. The strategy's own summary of the change applies here too: stop selling simplicity because the framework is small, start selling simplicity because the framework carries the infrastructure. The hero led with "not a mutable bag threaded through positional middleware". Middleware ordering was the origin problem, not the whole of what this does, and a reader who has never hit that pain learns only what green-tea is against. It now says what it is for: declare what a step needs and produces, and the framework derives the order, validates the wiring before traffic, and runs only the slice a route requires. Added "Who does the work?", the section the strategy ranks first and the file never had. It is a table of which side of the import each infrastructure decision lives on, ending with business rules on yours — and it is where the single runtime dependency now sits, as evidence rather than as a headline. The number was never the point: fewer moving parts to understand, upgrade, coordinate and debug is. A framework owning less does not delete that work, it moves it into your application. "Batteries included — still one dependency" did both of the things the strategy says to demote in one heading. It is now "What the foundation already carries", which is the same list making the ownership argument instead of a bloat-adjacent one. Accuracy guardrails re-checked after editing rather than assumed: compile-time guarantees stay scoped to the typed flow core with decorator wiring boot-validated, mesh stays alpha, no zero-dependency claim, no benchmark leadership, no anti-Web-Standards framing. Signed-off-by: Diego Resendez --- README.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9232a26..2f8d9fb 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,13 @@

A zen, opinionated, type-safe framework.

- Your API is an explicit dependency graph you can see, slice, and trust —
- not a mutable bag threaded through positional middleware. That's the tea. 🍵 + Declare intent. Derive execution.
+ You declare what each step needs and produces; green-tea derives the order,
+ validates the wiring before it serves traffic, and runs only the slice each route requires. +

+ +

+ Less infrastructure in your application. Less infrastructure in your head. 🍵

--- @@ -55,6 +60,32 @@ npm install busboy # multipart/form-data file uploads - **A remote dependency looks like a local one.** `@needs('billing')` resolves the same whether `billing` lives in this process or on another node (mesh, experimental). *Why it matters:* no gRPC layer or message-pattern DSL to learn — there's the graph, and some nodes happen to live elsewhere. - **Plugins can't sabotage you.** A plugin gets `bus.on(...)` (observe), `scope.add(...)` (extend its own scope) and `onShutdown(...)` (release what it opened). There is no API to reorder or delete another scope's steps. *Why it matters:* installing a plugin can't break your body parser. +## Who does the work? + +Every backend has the same set of infrastructure decisions. The question is which side of the +`import` they live on. + +| Decision | Owned by | +|---|---| +| Execution order | green-tea — derived from `needs`/`provides`, never maintained by hand | +| Dependency validation | green-tea — boot fails when nothing provides a key | +| Which steps a route runs | green-tea — the graph slice its handler actually depends on | +| Streaming mechanics — framing, backpressure, cleanup, disconnects | green-tea | +| OpenAPI projection | green-tea — from the same metadata that runs the app | +| Secure transport defaults | green-tea — headers, CORS, TLS | +| Runtime serving boundary | green-tea — `listen`, `fetch`, `upgrade` per runtime | +| Shutdown sequencing | green-tea — drain, then teardown, inside one deadline | +| **Business rules** | **you** | + +That division is the whole design, and it is why `reflect-metadata` is the only runtime dependency: +the goal is not a small number for its own sake, it is **fewer moving parts your team has to +understand, upgrade, coordinate and debug**. A framework that owns less pushes the difference into +your application, where it becomes your maintenance instead of disappearing. + +Automated does not mean invisible. `app.explain()` prints the ordered chain, `app.graph()` renders +the live graph, and `app.openapi()` projects the same metadata — the graph is not documentation drawn +after the fact, it is the structure green-tea validates and executes. + ## Real-time is a primitive, not a second framework Most stacks treat "push data over time" as a bolt-on: Express reaches for a `ws` or SSE library, Fastify for a plugin, NestJS for a separate **WebSocket Gateway** with its own adapter and decorators. That's a second mental model, a second error surface, glued to your HTTP app. @@ -98,9 +129,10 @@ class Live { Same `@Route`, same handler shape, same `AsyncIterable` — real-time is not a separate framework you also have to learn. -## Batteries included — still one dependency +## What the foundation already carries -Beta shipped the parts a real API needs, without growing the runtime dependency tree past `reflect-metadata`: +The parts a real API needs, owned by the framework rather than assembled in your application — and +without growing the runtime dependency tree past `reflect-metadata`: - **TLS → https/wss** natively, plus proxy-aware `trustProxy` (`X-Forwarded-*` → `ctx.protocol`/`ctx.ip`). - **Secure by default.** `nosniff`, `X-Frame-Options`, `Referrer-Policy`, HSTS-when-secure — on every response, opt-out with one flag.