Files
website/src/components/sections/GraphNotChain.astro
T
chrnx 7238819520
CI / build (pull_request) Successful in 12s
content: sell foundation ownership, not the absence of middleware
The homepage led with 'your API is a graph, not a middleware chain' — the
origin problem stated as the whole product philosophy. Middleware ordering is
what green-tea started from, not what it is for, and a visitor who has never
felt that specific pain reads it as a framework defined by what it lacks.

Reframes the page around what the framework takes off the application: it
derives execution from declared dependencies, validates the wiring before
traffic, runs only the slice a route asks for, and then shows its work. Two
sections are new because nothing on the page carried the argument — an
ownership list that ends at 'business rules: you', and the two route slices
that make dependency-driven execution concrete rather than abstract.

The dependency count moves from hero to evidence, with the nuance it was
missing: reflect-metadata is the only runtime dependency, ws and busboy are
optional peers. Beta honesty gains the API-stability caveat.

Follows .specs/reports/green_tea_website_copy_strategy_zen.md, whose
guardrails were re-checked against the built page — no zero-dependency claim,
no compile-time overclaim, mesh still alpha, edge limits still stated.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-18 09:29:53 -05:00

132 lines
3.3 KiB
Plaintext

---
import GraphMotif from '../GraphMotif.astro';
---
<section class="graph-idea section--panel">
<GraphMotif class="graph-idea__motif" width={520} height={440} opacity={0.14} />
<div class="wrap graph-idea__inner">
<p class="kicker">The idea</p>
<h2>Declare what your code needs. Not when it should run.</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>
</p>
<ul class="graph-idea__examples">
<li>
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.
</li>
<li>Add a <code>friends</code> provider, then ask for <code>friends</code> — and the user arrives with the friend list.</li>
</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.
</p>
</div>
</section>
<style>
.graph-idea {
position: relative;
overflow: hidden;
}
:global(.graph-idea__motif) {
position: absolute;
top: 50%;
right: -4%;
transform: translateY(-50%);
width: min(520px, 55vw);
height: auto;
pointer-events: none;
}
.graph-idea__inner {
position: relative;
max-width: 62ch;
}
.graph-idea__inner h2 {
max-width: 16ch;
}
.graph-idea__body {
color: var(--dim);
font-size: 1.1rem;
margin-bottom: 1.75rem;
}
.graph-idea__examples {
list-style: none;
margin: 0 0 2rem;
padding: 0;
display: flex;
flex-direction: column;
gap: 1.1rem;
}
.graph-idea__examples li {
position: relative;
padding-left: 1.5rem;
color: var(--ink);
line-height: 1.7;
}
.graph-idea__examples li::before {
content: '';
position: absolute;
left: 0;
top: 0.55em;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--matcha);
}
.graph-idea__examples code {
background: var(--base);
border-radius: 4px;
padding: 0.15em 0.4em;
font-size: 0.9em;
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;
border-left: 3px solid var(--violet);
background: color-mix(in srgb, var(--violet) 8%, transparent);
border-radius: 0 8px 8px 0;
font-family: var(--font-heading);
font-weight: 700;
font-size: 1.1rem;
line-height: 1.6;
color: var(--ink);
}
@media (max-width: 900px) {
:global(.graph-idea__motif) {
display: none;
}
}
</style>