feat: landing page — the pitch (graph, runtime-agnostic, real-time, batteries)

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-07-10 19:02:25 -05:00
1 parent 6e1888b8ff
commit adca1c5bdf
9 files changed
+652 -2

No files matched your search

+86
View File
@@ -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." },
];
---
<section class="batteries">
<div class="wrap">
<div class="batteries__head">
<p class="kicker">Batteries, calm by design</p>
<h2>Serious defaults. Zero ceremony.</h2>
</div>
<ul class="batteries__grid">
{
cards.map((card) => (
<li class="batteries__card">
<h3>{card.title}</h3>
<p>{card.body}</p>
</li>
))
}
</ul>
</div>
</section>
<style>
.batteries__head {
max-width: 52ch;
margin: 0 auto 3rem;
text-align: center;
}
.batteries__head h2 {
margin-bottom: 0;
}
.batteries__grid {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
}
.batteries__card {
padding: 1.75rem;
background: var(--panel);
border: 1px solid color-mix(in srgb, var(--dim) 18%, transparent);
border-radius: 12px;
}
.batteries__card h3 {
color: var(--matcha);
font-size: 1.05rem;
margin-bottom: 0.5em;
}
.batteries__card p {
margin: 0;
color: var(--dim);
font-size: 0.95rem;
line-height: 1.65;
}
@media (max-width: 860px) {
.batteries__grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 560px) {
.batteries__grid {
grid-template-columns: 1fr;
}
}
</style>
+115
View File
@@ -0,0 +1,115 @@
---
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>A graph, not a chain.</h2>
<p class="graph-idea__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.
</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">
This is pure composition. No other framework shows it, because no one else has the graph.
</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__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>
+130
View File
@@ -0,0 +1,130 @@
---
import logoUrl from '../../assets/logo.svg?url';
import GraphMotif from '../GraphMotif.astro';
---
<section class="hero">
<div class="wrap hero__grid">
<div class="hero__content">
<div class="hero__lockup" aria-hidden="true">
<img class="hero__logo" src={logoUrl} alt="" width="36" height="36" />
<span class="hero__wordmark">Green Tea<span class="hero__dot">.</span></span>
</div>
<h1>A zen, opinionated, type-safe framework.</h1>
<p class="hero__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.
</p>
<div class="btn-row hero__ctas">
<a class="btn btn--primary" href="https://docs.green-tea.dev">Get started</a>
<a class="btn btn--ghost" href="https://github.com/expressive-tea/green-tea" target="_blank" rel="noopener noreferrer">
GitHub
</a>
<a class="btn btn--ghost" href="https://www.npmjs.com/package/@green-tea/core" target="_blank" rel="noopener noreferrer">
npm
</a>
</div>
<p class="hero__micro">Beta · calm by design</p>
</div>
<GraphMotif class="hero__motif" width={460} height={400} opacity={0.55} />
</div>
</section>
<style>
.hero {
padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2.5rem, 6vw, 4rem);
}
.hero__grid {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
align-items: center;
gap: clamp(2rem, 6vw, 4rem);
}
.hero__content {
min-width: 0;
max-width: 46ch;
}
.hero__lockup {
display: inline-flex;
align-items: center;
gap: 0.6rem;
margin-bottom: 1.5rem;
}
.hero__logo {
width: 2rem;
height: 2rem;
flex-shrink: 0;
}
.hero__wordmark {
font-family: var(--font-heading);
font-weight: 700;
font-size: 1.05rem;
letter-spacing: 0.02em;
color: var(--matcha);
}
.hero__dot {
color: var(--violet);
}
.hero h1 {
margin-bottom: 0.6em;
}
.hero__subhead {
color: var(--dim);
font-size: 1.1rem;
line-height: 1.7;
margin-bottom: 2rem;
}
.hero__ctas {
margin-bottom: 1.4rem;
}
.hero__micro {
margin: 0;
color: var(--dim);
font-size: 0.85rem;
letter-spacing: 0.03em;
}
:global(.hero__motif) {
justify-self: center;
width: 100%;
max-width: 420px;
height: auto;
}
@media (max-width: 900px) {
.hero__grid {
grid-template-columns: 1fr;
}
.hero__content {
max-width: none;
}
:global(.hero__motif) {
max-width: 280px;
margin: 0 auto;
opacity: 0.35;
}
}
@media (max-width: 480px) {
:global(.hero__motif) {
max-width: 220px;
}
}
</style>
+50
View File
@@ -0,0 +1,50 @@
---
---
<section class="honest">
<div class="wrap honest__inner">
<h2>Honest: it's beta.</h2>
<p class="honest__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.
</p>
<div class="btn-row honest__ctas">
<a class="btn btn--primary" href="https://docs.green-tea.dev">Read the docs</a>
<a class="btn btn--ghost" href="https://github.com/expressive-tea/green-tea" target="_blank" rel="noopener noreferrer">
Star on GitHub
</a>
</div>
<p class="honest__signoff">That's the tea. 🍵</p>
</div>
</section>
<style>
.honest__inner {
max-width: 60ch;
margin: 0 auto;
text-align: center;
}
.honest__body {
color: var(--dim);
font-size: 1.1rem;
margin: 0 auto 2rem;
max-width: 52ch;
}
.honest__ctas {
justify-content: center;
margin-bottom: 2.5rem;
}
.honest__signoff {
margin: 0;
font-family: var(--font-heading);
font-weight: 700;
font-size: 1.5rem;
color: var(--matcha);
}
</style>
+37
View File
@@ -0,0 +1,37 @@
---
---
<section class="realtime section--panel">
<div class="wrap realtime__inner">
<p class="kicker">Real-time</p>
<h2>One primitive for real-time.</h2>
<p class="realtime__body">
SSE, ndjson, or a duplex WebSocket — return an <code>AsyncIterable</code>. One mental model, one line. No
separate gateway, no bolt-on package.
</p>
</div>
</section>
<style>
.realtime__inner {
max-width: 60ch;
margin: 0 auto;
text-align: center;
}
.realtime__body {
color: var(--dim);
font-size: 1.1rem;
margin: 0 auto;
max-width: 52ch;
}
.realtime__body code {
background: var(--base);
border-radius: 4px;
padding: 0.15em 0.4em;
font-size: 0.9em;
color: var(--ink);
}
</style>
@@ -0,0 +1,71 @@
---
const chips = ['app.listen(port)', 'serveDeno(app)', 'serveBun(app)', 'edgeHandler(app)'];
---
<section class="runs">
<div class="wrap runs__inner">
<p class="kicker">Runtime-agnostic</p>
<h2>Write it once. Run it everywhere.</h2>
<p class="runs__body">
Node, Deno, Bun — and the edge. The same <code>src/</code> runs on all of them; the only line that changes is
how you serve it.
</p>
<ul class="runs__chips">
{chips.map((chip) => <li><code>{chip}</code></li>)}
</ul>
<p class="runs__micro">Built on web standards. Not hostage to a runtime's fate.</p>
</div>
</section>
<style>
.runs__inner {
max-width: 66ch;
margin: 0 auto;
text-align: center;
}
.runs__body {
color: var(--dim);
font-size: 1.1rem;
margin: 0 auto 2.25rem;
max-width: 52ch;
}
.runs__body code {
background: var(--panel);
border-radius: 4px;
padding: 0.15em 0.4em;
font-size: 0.9em;
color: var(--ink);
}
.runs__chips {
list-style: none;
margin: 0 0 1.75rem;
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.75rem;
}
.runs__chips code {
display: inline-block;
background: var(--panel);
border: 1px solid color-mix(in srgb, var(--dim) 30%, transparent);
border-radius: 999px;
padding: 0.55em 1.1em;
font-size: 0.9rem;
color: var(--matcha);
}
.runs__micro {
margin: 0;
color: var(--dim);
font-size: 0.9rem;
font-style: italic;
}
</style>
+77
View File
@@ -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
}
}`;
---
<section class="see-it section--panel">
<div class="wrap see-it__inner">
<div class="see-it__head">
<p class="kicker">See it</p>
<h2>The whole model, in one screen.</h2>
</div>
<div class="see-it__code">
<Code code={snippet} lang="ts" theme="github-dark" />
</div>
<p class="see-it__caption">Declare what you need. The framework figures out the order.</p>
</div>
</section>
<style>
.see-it__inner {
max-width: 780px;
margin: 0 auto;
}
.see-it__head {
max-width: 52ch;
margin: 0 auto 2.25rem;
text-align: center;
}
.see-it__head h2 {
margin-bottom: 0;
}
.see-it__code {
border-radius: 12px;
overflow: hidden;
border: 1px solid color-mix(in srgb, var(--dim) 20%, transparent);
}
.see-it__code :global(pre) {
margin: 0;
padding: 1.5rem;
font-size: 0.875rem;
line-height: 1.7;
overflow-x: auto;
}
.see-it__caption {
margin: 1.5rem 0 0;
text-align: center;
color: var(--dim);
font-style: italic;
font-size: 0.95rem;
}
</style>