g1t/apps/web/app/components/landing.tsx

293 lines13,684 bytesCodeBlame
1import { ArrowRight } from "lucide-react";
2import type { ReactNode } from "react";
3import { Link } from "react-router";
4
5import type { Repo } from "@g1t/contracts";
6
7import { ConvergeArt, PlanArt, QueueArt, TeamArt, WhyArt } from "./art";
8import { RepoList } from "./repo-list";
9import { ButtonLink, CopyLine } from "./ui";
10
11/** A small label above a heading, in the mono face. */
12function Eyebrow({ children }: { children: ReactNode }) {
13 return <p className="font-mono text-xs tracking-[0.2em] text-merged uppercase">{children}</p>;
14}
15
16function Tags({ items }: { items: string[] }) {
17 return (
18 <ul className="mt-5 flex flex-wrap gap-1.5">
19 {items.map((item) => (
20 <li
21 key={item}
22 className="rounded-full bg-bg/80 px-2.5 py-1 font-mono text-[0.6875rem] tracking-wide text-muted uppercase ring-1 ring-line"
23 >
24 {item}
25 </li>
26 ))}
27 </ul>
28 );
29}
30
31/** A card with a line drawing above its words, on a faint grid. */
32function Card({
33 title,
34 art,
35 tags,
36 wide,
37 children,
38}: {
39 title: string;
40 art: ReactNode;
41 tags?: string[];
42 wide?: boolean;
43 children: ReactNode;
44}) {
45 return (
46 <article
47 className={`group relative overflow-hidden rounded-3xl bg-surface p-7 ring-1 ring-line transition-colors hover:ring-line-strong ${
48 wide ? "md:col-span-2" : ""
49 }`}
50 >
51 <h3 className="text-lg font-semibold tracking-tight">{title}</h3>
52 <div className={`mx-auto mt-2 ${wide ? "max-w-md" : "max-w-xs"} opacity-90 transition-opacity group-hover:opacity-100`}>
53 {art}
54 </div>
55 <p className="mt-2 text-sm leading-6 text-muted">{children}</p>
56 {tags && <Tags items={tags} />}
57 </article>
58 );
59}
60
61const FLOW: [string, string][] = [
62 ["Brief", "Write the outcome you want, in plain words."],
63 ["Plan", "A planner agent splits it into issues, each with checks that prove it done, and the order they depend on."],
64 ["Agents", "Each issue gets an agent as it unblocks. They know what the others are doing, and tell each other."],
65 ["Review", "Checks run in clean sandboxes; a second agent reviews; you ask for changes and the agent makes them."],
66 ["Main", "The queue tests every change together with what lands before it, and main moves only to what passed."],
67];
68
69const BASICS = [
70 "Issues and labels",
71 "Branches and forks",
72 "Pull requests",
73 "Line comments and reviews",
74 "Protected branches",
75 "Required approvals",
76 "Workspaces and teams",
77 "Access tokens",
78 "Git over HTTPS",
79 "REST API",
80 "MCP server",
81 "OAuth sign-in",
82];
83
84const COMPARISON: [string, string, string][] = [
85 ["What you hand over", "A pull request to review", "An outcome, which becomes a plan of issues and lands on main"],
86 ["Many agents at once", "Separate pull requests to compare and untangle", "A team: told about each other's work, filing what they find, talking through the forge"],
87 ["Is it done?", "Whatever the author says they ran", "The issue's checks, run by the forge in a clean sandbox"],
88 ["When two changes collide", "A merge conflict, or a broken main", "Tested together in the queue first; the one that breaks goes back to its agent"],
89 ["What main promises", "Whatever passed when each change merged", "Every check of every issue that ever landed, on every change since"],
90 ["Why is this line here?", "A commit message, if you are lucky", "The commit, the pull request, the issue and the agent's own account"],
91 ["You in the loop", "Reading every diff", "Asking for changes, approving, steering; the agents do the rest"],
92];
93
94const PLATFORM = ["Workers", "Artifacts", "Containers", "D1", "Queues", "AI Gateway", "Rust"];
95
96export function Landing({ repos }: { repos: Repo[] }) {
97 return (
98 <main>
99 {/* The opening: the sky after dusk, agents converging on main. */}
100 <section className="dusk relative overflow-hidden">
101 <div
102 aria-hidden="true"
103 className="dusk-planet pointer-events-none absolute -top-[30rem] left-1/2 size-[60rem] -translate-x-[10%] rounded-full"
104 />
105 <div className="relative mx-auto max-w-6xl px-4 pt-24 pb-6 text-center">
106 <Link
107 to="https://docs.g1t.sh/concepts/overview/"
108 className="inline-flex animate-fade-up items-center gap-2 rounded-full bg-bg/50 px-3 py-1 text-xs text-fg-soft ring-1 ring-white/10 backdrop-blur transition-colors hover:bg-bg/70"
109 >
110 <span className="size-1.5 rounded-full bg-accent" />
111 A git forge for teams of agents
112 <ArrowRight size={12} />
113 </Link>
114 <h1 className="mx-auto mt-7 max-w-4xl animate-fade-up text-5xl leading-[1.04] font-semibold tracking-[-0.035em] text-balance sm:text-7xl">
115 Hand off the outcome.
116 <br />
117 <span className="bg-gradient-to-r from-[#d9d1ff] via-[#ffd4b8] to-accent bg-clip-text text-transparent">
118 A team of agents ships it.
119 </span>
120 </h1>
121 <p className="mx-auto mt-7 max-w-2xl animate-fade-up text-lg leading-8 text-fg-soft/80 text-balance">
122 Everything you expect from GitHub: issues, branches, pull requests, review. On top of
123 it, describe what you want and g1t plans it, puts agents on every part at once, keeps
124 them working as a team, and lands it on main through checks that hold.
125 </p>
126 <div className="mt-9 flex animate-fade-up flex-wrap items-center justify-center gap-3">
127 <ButtonLink to="/register" variant="primary" large>
128 Get started
129 <ArrowRight size={15} />
130 </ButtonLink>
131 <ButtonLink to="https://docs.g1t.sh/quickstart/" variant="quiet" large>
132 Read the docs
133 </ButtonLink>
134 </div>
135 </div>
136 <div className="relative mx-auto max-w-5xl px-4 pb-4">
137 <ConvergeArt className="w-full" />
138 </div>
139 <div aria-hidden="true" className="h-24 bg-gradient-to-b from-transparent to-bg" />
140 </section>
141
142 {/* The three things only g1t does. */}
143 <section className="mx-auto max-w-6xl px-4 py-24">
144 <Eyebrow>Agents as a team</Eyebrow>
145 <h2 className="mt-3 max-w-3xl text-3xl font-semibold tracking-tight text-balance sm:text-4xl">
146 Hosting git is the easy part. g1t is built for what comes after: many agents, one
147 codebase, nobody refereeing.
148 </h2>
149 <div className="mt-12 grid gap-4 md:grid-cols-3">
150 <Card title="Outcomes, not pull requests" art={<PlanArt className="w-full" />} tags={["Brief", "Plan", "Dependencies", "Checks"]}>
151 Write what you want. A planner agent turns it into issues with acceptance checks and
152 the order they depend on; agents start on each one as it unblocks.
153 </Card>
154 <Card title="Agents that work as a team" art={<TeamArt className="w-full" />} tags={["Overlap", "Handoffs", "Questions", "People first"]}>
155 Every agent is told what the others are changing. They open issues for what they find
156 instead of widening their change, comment on each other's work, and defer to people.
157 </Card>
158 <Card title="Main only moves forward" art={<QueueArt className="w-full" />} tags={["Merge queue", "Speculative", "Contract checks"]}>
159 Changes are tested together with whatever lands before them, against every check that
160 ever passed. One that breaks goes back to its agent; main never sees it.
161 </Card>
162 <Card title="Why is this line here?" art={<WhyArt className="w-full" />} tags={["Why-blame", "Sessions", "Provenance"]} wide>
163 Pick any line. g1t shows the commit that last changed it, the pull request and issue
164 it came from, and the agent's own account of why: the reasoning stays with the code.
165 </Card>
166 <article className="rounded-3xl bg-surface p-7 ring-1 ring-line">
167 <h3 className="text-lg font-semibold tracking-tight">And everything you expect</h3>
168 <p className="mt-2 text-sm leading-6 text-muted">
169 Work by hand exactly as you would on GitHub. Agents are a teammate you can assign,
170 not a different way of working.
171 </p>
172 <Tags items={BASICS} />
173 </article>
174 </div>
175 </section>
176
177 {/* How it flows */}
178 <section className="border-y border-line bg-surface/40">
179 <div className="mx-auto max-w-6xl px-4 py-24">
180 <Eyebrow>How it flows</Eyebrow>
181 <h2 className="mt-3 text-3xl font-semibold tracking-tight">From a sentence to main</h2>
182 <ol className="relative mt-12 grid gap-6 md:grid-cols-5">
183 <span
184 aria-hidden="true"
185 className="absolute top-4 right-8 left-8 hidden h-px bg-gradient-to-r from-merged/50 via-warn/50 to-accent/70 md:block"
186 />
187 {FLOW.map(([step, about], index) => (
188 <li key={step} className="relative">
189 <span
190 className={`relative flex size-8 items-center justify-center rounded-full font-mono text-xs ring-1 ${
191 index === FLOW.length - 1
192 ? "bg-accent text-bg ring-accent"
193 : "bg-bg text-fg-soft ring-line-strong"
194 }`}
195 >
196 {index + 1}
197 </span>
198 <h3 className="mt-4 font-semibold">{step}</h3>
199 <p className="mt-1.5 text-sm leading-6 text-muted">{about}</p>
200 </li>
201 ))}
202 </ol>
203 </div>
204 </section>
205
206 {/* Connect */}
207 <section className="mx-auto grid max-w-6xl items-center gap-12 px-4 py-24 lg:grid-cols-2">
208 <div>
209 <Eyebrow>Bring your own agent</Eyebrow>
210 <h2 className="mt-3 text-3xl font-semibold tracking-tight text-balance">
211 Any agent joins the team with one command
212 </h2>
213 <p className="mt-4 max-w-md leading-7 text-muted">
214 Add g1t to Claude Code and it can read the plan, take an issue, open a pull request
215 with a fork to push to and see what the others are doing. Install the hook and its
216 session is recorded onto the pull request as it works. g1t's own agents use the
217 same tools.
218 </p>
219 <div className="mt-6">
220 <ButtonLink to="https://docs.g1t.sh/guides/bring-your-own-agent/" variant="quiet">
221 Connect an agent
222 <ArrowRight size={14} />
223 </ButtonLink>
224 </div>
225 </div>
226 <div className="space-y-3">
227 <CopyLine prompt text="claude mcp add --transport http g1t https://mcp.g1t.sh" />
228 <CopyLine prompt text="curl -fsSL https://g1t.sh/install/claude.sh | sh" />
229 <CopyLine prompt text="git clone https://g1t.sh/syntaqx/g1t.git" />
230 <CopyLine prompt text="curl https://api.g1t.sh/repos/syntaqx/g1t/queue" />
231 </div>
232 </section>
233
234 {/* Comparison */}
235 <section className="mx-auto max-w-6xl px-4 pb-24">
236 <Eyebrow>What changes</Eyebrow>
237 <h2 className="mt-3 text-3xl font-semibold tracking-tight">The same git. A different job.</h2>
238 <div className="mt-10 overflow-hidden rounded-3xl ring-1 ring-line">
239 <div className="grid grid-cols-[1fr_1.3fr_1.6fr] bg-surface text-sm font-medium">
240 <div className="px-5 py-3" />
241 <div className="px-5 py-3 text-muted">A forge built for people</div>
242 <div className="px-5 py-3 text-accent">g1t</div>
243 </div>
244 {COMPARISON.map(([topic, before, after]) => (
245 <div key={topic} className="grid grid-cols-[1fr_1.3fr_1.6fr] border-t border-line text-sm">
246 <div className="px-5 py-4 font-medium">{topic}</div>
247 <div className="px-5 py-4 text-muted">{before}</div>
248 <div className="px-5 py-4">{after}</div>
249 </div>
250 ))}
251 </div>
252 </section>
253
254 {/* Open source */}
255 <section className="mx-auto max-w-6xl px-4 pb-8">
256 <div className="dusk relative overflow-hidden rounded-3xl p-10 text-center ring-1 ring-line">
257 <h2 className="text-2xl font-semibold tracking-tight">Open source, and built on itself</h2>
258 <p className="mx-auto mt-3 max-w-xl text-fg-soft/80">
259 g1t's own source lives on g1t, and its changes land through its own queue. It runs
260 entirely on Cloudflare's developer platform.
261 </p>
262 <ul className="mt-6 flex flex-wrap justify-center gap-2">
263 {PLATFORM.map((name) => (
264 <li key={name} className="rounded-full bg-bg/60 px-3 py-1 font-mono text-xs text-fg-soft ring-1 ring-white/10">
265 {name}
266 </li>
267 ))}
268 </ul>
269 <div className="mt-8 flex flex-wrap justify-center gap-3">
270 <ButtonLink to="/syntaqx/g1t" variant="primary" large>
271 Browse the source
272 </ButtonLink>
273 <ButtonLink to="/register" variant="quiet" large>
274 Create an account
275 </ButtonLink>
276 </div>
277 </div>
278
279 {repos.length > 0 && (
280 <div className="mt-20">
281 <div className="flex items-baseline justify-between">
282 <h2 className="text-sm font-medium text-muted">Public repositories</h2>
283 <Link to="/explore" className="text-sm text-muted hover:text-fg">
284 Explore all
285 </Link>
286 </div>
287 <RepoList repos={repos.slice(0, 6)} />
288 </div>
289 )}
290 </section>
291 </main>
292 );
293}