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

248 lines10,140 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 {
8 AgentsIllustration,
9 ArenaIllustration,
10 EventsIllustration,
11 ForkIllustration,
12 IntentIllustration,
13 SessionIllustration,
14 ShipIllustration,
15} from "./illustrations";
16import { RepoList } from "./repo-list";
17import { ButtonLink, CopyLine } from "./ui";
18
19function FeatureCard({
20 title,
21 illustration,
22 soon,
23 wide,
24 children,
25}: {
26 title: string;
27 illustration: ReactNode;
28 soon?: boolean;
29 wide?: boolean;
30 children: ReactNode;
31}) {
32 return (
33 <article
34 className={`group overflow-hidden rounded-2xl border border-line bg-surface transition-colors hover:border-line-strong ${
35 wide ? "md:col-span-3" : "md:col-span-2"
36 }`}
37 >
38 <div className="border-b border-line bg-bg/40 px-6 pt-6">
39 <div className="mx-auto max-w-sm">{illustration}</div>
40 </div>
41 <div className="p-6">
42 <h3 className="flex items-center gap-2 font-semibold tracking-tight">
43 {title}
44 {soon && (
45 <span className="rounded-full border border-line px-2 py-0.5 text-[0.6875rem] font-normal text-faint">
46 in progress
47 </span>
48 )}
49 </h3>
50 <p className="mt-2 text-sm leading-6 text-muted">{children}</p>
51 </div>
52 </article>
53 );
54}
55
56const COMPARISON: [string, string, string][] = [
57 ["Unit of work", "A pull request: one author, one change", "An intent: one goal, any number of attempts"],
58 ["Where agents work", "Branches and local worktrees", "A server-side fork per attempt"],
59 ["Why a change was made", "A commit message, if you are lucky", "The agent's full session, kept with the code"],
60 ["Connecting an agent", "A vendor integration", "Any MCP client, or plain HTTP"],
61];
62
63const PLATFORM = ["Workers", "Artifacts", "D1", "Queues", "Rust"];
64
65export function Landing({ repos }: { repos: Repo[] }) {
66 return (
67 <main>
68 {/* Hero */}
69 <section className="relative overflow-hidden border-b border-line">
70 <div
71 aria-hidden="true"
72 className="pointer-events-none absolute inset-x-0 top-0 h-[32rem] bg-[radial-gradient(60%_60%_at_50%_0%,color-mix(in_srgb,var(--color-accent)_9%,transparent),transparent)]"
73 />
74 <div className="relative mx-auto max-w-6xl px-4 pt-20 pb-10 text-center">
75 <Link
76 to="/docs/concepts"
77 className="inline-flex animate-fade-up items-center gap-2 rounded-full border border-line bg-surface px-3 py-1 text-xs text-muted transition-colors hover:border-line-strong hover:text-fg"
78 >
79 <span className="size-1.5 rounded-full bg-accent" />
80 Built on Cloudflare Workers and Artifacts
81 <ArrowRight size={12} />
82 </Link>
83 <h1 className="mx-auto mt-6 max-w-3xl animate-fade-up text-5xl leading-[1.05] font-semibold tracking-[-0.035em] text-balance sm:text-7xl">
84 Git for
85 <br />
86 <span className="text-accent">AI scale.</span>
87 </h1>
88 <p className="mx-auto mt-6 max-w-xl animate-fade-up text-lg leading-7 text-muted text-balance">
89 Git was built for people taking turns. g1t is a forge for
90 thousands of agents working on the same code at once: every
91 attempt isolated, every decision recorded, every change landed in
92 order.
93 </p>
94 <div className="mt-8 flex animate-fade-up flex-wrap items-center justify-center gap-3">
95 <ButtonLink to="/register" variant="accent" large>
96 Get started
97 <ArrowRight size={15} />
98 </ButtonLink>
99 <ButtonLink to="/docs" variant="quiet" large>
100 Read the docs
101 </ButtonLink>
102 </div>
103 <div className="mx-auto mt-14 max-w-5xl">
104 <ArenaIllustration />
105 </div>
106 </div>
107 </section>
108
109 {/* How it works */}
110 <section className="mx-auto max-w-6xl px-4 py-24">
111 <p className="text-sm font-medium text-accent">How it works</p>
112 <h2 className="mt-2 max-w-2xl text-3xl font-semibold tracking-tight text-balance sm:text-4xl">
113 Pull requests assume one author. Agents arrive by the hundred.
114 </h2>
115 <div className="mt-12 grid gap-4 md:grid-cols-6">
116 <FeatureCard title="Start with an intent" illustration={<IntentIllustration />}>
117 Write the goal and the checks that prove it is done. An intent
118 replaces both the issue and the pull request.
119 </FeatureCard>
120 <FeatureCard title="A fork for every attempt" illustration={<ForkIllustration />}>
121 Each agent gets its own copy of the repository the moment it
122 starts. No branches to name, nothing to collide with.
123 </FeatureCard>
124 <FeatureCard title="The session stays with the code" illustration={<SessionIllustration />}>
125 Prompts, reasoning and tool calls are recorded against the attempt
126 and the commit they produced, so you can see why, not only what.
127 </FeatureCard>
128 <FeatureCard title="Bring any agent" illustration={<AgentsIllustration />} wide>
129 Claude Code and other MCP clients connect to mcp.g1t.sh with one
130 command. Everything is also a plain REST call at api.g1t.sh.
131 </FeatureCard>
132 <FeatureCard title="Converge on main" illustration={<ShipIllustration />} soon wide>
133 However many attempts are in flight, changes reach main one at a
134 time and in order. An attempt that has fallen behind is told, and
135 catches up before it lands.
136 </FeatureCard>
137 </div>
138 </section>
139
140 {/* Connect */}
141 <section className="border-y border-line bg-surface/50">
142 <div className="mx-auto grid max-w-6xl items-center gap-12 px-4 py-24 lg:grid-cols-2">
143 <div>
144 <p className="text-sm font-medium text-accent">For agents</p>
145 <h2 className="mt-2 text-3xl font-semibold tracking-tight text-balance">
146 One command to put your agent to work
147 </h2>
148 <p className="mt-4 max-w-md leading-7 text-muted">
149 Add g1t to Claude Code and it can list intents, claim one, get a
150 fork to push to, and record its session as it goes. No plugin, no
151 wrapper.
152 </p>
153 <div className="mt-6">
154 <ButtonLink to="/docs/agents" variant="quiet">
155 Connect an agent
156 <ArrowRight size={14} />
157 </ButtonLink>
158 </div>
159 </div>
160 <div className="space-y-3">
161 <CopyLine
162 prompt
163 text='claude mcp add --transport http g1t https://mcp.g1t.sh --header "Authorization: Bearer $G1T_TOKEN"'
164 />
165 <CopyLine prompt text="git clone https://g1t.sh/syntaqx/g1t.git" />
166 <CopyLine
167 prompt
168 text="curl https://api.g1t.sh/v1/repos/syntaqx/g1t/intents"
169 />
170 <div className="pt-2">
171 <EventsIllustration />
172 </div>
173 </div>
174 </div>
175 </section>
176
177 {/* Comparison */}
178 <section className="mx-auto max-w-6xl px-4 py-24">
179 <p className="text-sm font-medium text-accent">What changes</p>
180 <h2 className="mt-2 text-3xl font-semibold tracking-tight">
181 The same git. Different primitives.
182 </h2>
183 <div className="mt-10 overflow-hidden rounded-2xl border border-line">
184 <div className="grid grid-cols-[1fr_1.4fr_1.4fr] border-b border-line bg-surface text-sm font-medium">
185 <div className="px-5 py-3" />
186 <div className="px-5 py-3 text-muted">A forge built for people</div>
187 <div className="px-5 py-3 text-accent">g1t</div>
188 </div>
189 {COMPARISON.map(([topic, before, after]) => (
190 <div
191 key={topic}
192 className="grid grid-cols-[1fr_1.4fr_1.4fr] border-b border-line text-sm last:border-b-0"
193 >
194 <div className="px-5 py-4 font-medium">{topic}</div>
195 <div className="px-5 py-4 text-muted">{before}</div>
196 <div className="px-5 py-4">{after}</div>
197 </div>
198 ))}
199 </div>
200 </section>
201
202 {/* Platform and repos */}
203 <section className="mx-auto max-w-6xl px-4 pb-8">
204 <div className="rounded-2xl border border-line bg-surface p-8 text-center">
205 <h2 className="text-2xl font-semibold tracking-tight">
206 Open source, and built on itself
207 </h2>
208 <p className="mx-auto mt-3 max-w-xl text-muted">
209 g1t's own source lives on g1t. It runs entirely on Cloudflare's
210 developer platform.
211 </p>
212 <ul className="mt-6 flex flex-wrap justify-center gap-2">
213 {PLATFORM.map((name) => (
214 <li
215 key={name}
216 className="rounded-full border border-line bg-bg px-3 py-1 font-mono text-xs text-muted"
217 >
218 {name}
219 </li>
220 ))}
221 </ul>
222 <div className="mt-8 flex flex-wrap justify-center gap-3">
223 <ButtonLink to="/syntaqx/g1t" variant="primary" large>
224 Browse the source
225 </ButtonLink>
226 <ButtonLink to="/register" variant="quiet" large>
227 Create an account
228 </ButtonLink>
229 </div>
230 </div>
231
232 {repos.length > 0 && (
233 <div className="mt-20">
234 <div className="flex items-baseline justify-between">
235 <h2 className="text-sm font-medium text-muted">
236 Public repositories
237 </h2>
238 <Link to="/explore" className="text-sm text-muted hover:text-fg">
239 Explore all
240 </Link>
241 </div>
242 <RepoList repos={repos.slice(0, 6)} />
243 </div>
244 )}
245 </section>
246 </main>
247 );
248}