@devries-cameron20 / composio Mirror · read-only / commits / 4a1b8c314
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 16:00 UTC

docs: redesign the Welcome landing around Platform / For You

Two-ways-to-start hero: cards now lead with the canonical Composio + product-badge lockup (dashboard-parity) and the same product mocks the dashboard onboarding path step uses — a chat composer flanked by client logos for For You, a code panel for Platform. Right link pane width matches a feature-grid card exactly. Features grid: whole-card links restored, each mock fades into the card edge with a mask-image, cards live on a single flush bg-fd-card surface. Tools mock bumps from an 8×2 grid of 16 tiles to 10×3 = 30 for more impact, Auth becomes a live schematic — one user identity card wired to three connected-account cards via elbow connectors computed from real DOM geometry (`home-auth-diagram.tsx`), Triggers drops the fake LIVE ping in favor of a plain event list, Sandbox drops the workbench chrome + CPU lights for a clean filename + code panel. Resources: adds a Platform Dashboard link so the 3×2 grid is complete. Drops the "Get started / What you get / Reach for the rest" eyebrows and section heading — headings stand on their own. Copy: `audience` → `product`, so llms.txt emits `**Platform**` / `**For You**` instead of `**Platform**` / `**For you**`; matched in `home-navigation.test.ts`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Malay Vasa committed Aug 17, 2026 at 18:22 UTC 4a1b8c314ae15750b6a10260ee879cfa9ebab39c
7 files changed +420 -254
docs/app/global.css
+2 -2
@@ -1141,13 +1141,13 @@ html:not(.dark) .terminal-theme-claude {
1141 }
1142
1143 @media (forced-colors: active) {
1144 - .audience-badge-platform {
1144 + .product-badge-platform {
1145 background: none !important;
1146 color: CanvasText !important;
1147 -webkit-text-fill-color: CanvasText !important;
1148 }
1149
1150 - .audience-badge-platform-border {
1150 + .product-badge-platform-border {
1151 background: none !important;
1152 border: 1px solid CanvasText;
1153 mask: none !important;
docs/components/home-auth-diagram.tsx new
+161
@@ -0,0 +1,161 @@
1 +'use client';
2 +
3 +import { User } from 'lucide-react';
4 +import { useCallback, useEffect, useRef, useState } from 'react';
5 +
6 +const LOGO_CDN = 'https://logos.composio.dev/api';
7 +
8 +const USER_IDENTITY = {
9 + name: 'Ada Chen',
10 + userId: 'usr_9x2kLm7',
11 +};
12 +
13 +const ACCOUNTS = [
14 + { slug: 'slack', name: 'Slack', account: 'acme-workspace' },
15 + { slug: 'gmail', name: 'Gmail', account: 'ada@acme.com' },
16 + { slug: 'linear', name: 'Linear', account: 'acme' },
17 +];
18 +
19 +/**
20 + * Orthogonal elbow connector — leaves `(sx, sy)` horizontally, steps
21 + * vertically at the midpoint, then runs horizontally into `(ex, ey)` with
22 + * rounded corners. Adapted from `connection-refresh-visual.tsx#elbowPath`
23 + * but taking explicit endpoints so multiple lines out of the same hub can
24 + * exit at staggered y-coordinates and not visually merge into a single
25 + * thicker line where they share the initial horizontal run.
26 + */
27 +function elbowPath(sx: number, sy: number, ex: number, ey: number, r = 8): string {
28 + const midX = sx + (ex - sx) * 0.5;
29 + const dy = Math.sign(ey - sy) || 1;
30 + const rr = Math.min(r, Math.abs(ex - sx) / 2, Math.abs(ey - sy) / 2);
31 + if (rr < 1) return `M ${sx} ${sy} L ${ex} ${ey}`;
32 + return (
33 + `M ${sx} ${sy} L ${midX - rr} ${sy} ` +
34 + `Q ${midX} ${sy} ${midX} ${sy + dy * rr} ` +
35 + `L ${midX} ${ey - dy * rr} ` +
36 + `Q ${midX} ${ey} ${midX + rr} ${ey} ` +
37 + `L ${ex} ${ey}`
38 + );
39 +}
40 +
41 +/**
42 + * Auth-and-context mock for the docs Welcome features grid.
43 + *
44 + * One user identity card on the left is wired to three connected-account
45 + * cards on the right via neutral-grey elbow connectors. Paths are computed
46 + * from live DOM geometry (getBoundingClientRect + ResizeObserver) so the
47 + * wires meet the hub and cards precisely at every breakpoint. All surfaces
48 + * use bg-fd-card so nothing reads as recessed against the mock's own card,
49 + * and logos render inline without a white swatch behind them.
50 + */
51 +export function AuthDiagram() {
52 + const rootRef = useRef<HTMLDivElement>(null);
53 + const hubRef = useRef<HTMLDivElement>(null);
54 + const cardRefs = useRef<(HTMLDivElement | null)[]>([]);
55 + const [paths, setPaths] = useState<string[]>([]);
56 +
57 + const calc = useCallback(() => {
58 + const root = rootRef.current;
59 + const hub = hubRef.current;
60 + if (!root || !hub) return;
61 + const cr = root.getBoundingClientRect();
62 + const from = hub.getBoundingClientRect();
63 + const hubX = from.right - cr.left;
64 + const hubYCenter = from.top + from.height / 2 - cr.top;
65 + const targets = cardRefs.current.filter(
66 + (el): el is HTMLDivElement => Boolean(el)
67 + );
68 + // Space the exit points down the hub's right edge (~7px apart for 3
69 + // targets) so lines leave the hub as three distinct wires instead of
70 + // stacking on the same y and reading as one thick line before the elbow.
71 + const STAGGER = 7;
72 + const next = targets.map((ref, i) => {
73 + const to = ref.getBoundingClientRect();
74 + const stagger = (i - (targets.length - 1) / 2) * STAGGER;
75 + const sy = hubYCenter + stagger;
76 + const ex = to.left - cr.left;
77 + const ey = to.top + to.height / 2 - cr.top;
78 + return elbowPath(hubX, sy, ex, ey);
79 + });
80 + setPaths(next);
81 + }, []);
82 +
83 + useEffect(() => {
84 + calc();
85 + // Re-measure once fonts/images settle so the initial paths land on the
86 + // final card positions instead of pre-load ones.
87 + const t = window.setTimeout(calc, 120);
88 + const root = rootRef.current;
89 + const ro = root ? new ResizeObserver(() => calc()) : null;
90 + if (root && ro) ro.observe(root);
91 + return () => {
92 + window.clearTimeout(t);
93 + ro?.disconnect();
94 + };
95 + }, [calc]);
96 +
97 + return (
98 + <div
99 + ref={rootRef}
100 + className="relative flex h-full w-full items-center justify-between overflow-hidden"
101 + >
102 + <svg
103 + aria-hidden="true"
104 + className="pointer-events-none absolute inset-0 z-0 h-full w-full text-fd-foreground/30"
105 + fill="none"
106 + >
107 + {paths.map((d, i) => (
108 + <path
109 + d={d}
110 + key={ACCOUNTS[i]?.slug ?? i}
111 + stroke="currentColor"
112 + strokeWidth={1}
113 + />
114 + ))}
115 + </svg>
116 +
117 + <div
118 + ref={hubRef}
119 + className="relative z-10 flex w-36 items-center gap-2 rounded-[6px] border border-fd-border bg-fd-card px-2.5 py-2"
120 + >
121 + <span className="flex size-6 shrink-0 items-center justify-center rounded-full bg-fd-muted">
122 + <User aria-hidden="true" className="size-3.5 text-fd-foreground/60" />
123 + </span>
124 + <div className="flex min-w-0 flex-col leading-tight">
125 + <span className="truncate font-mono text-[11px] text-fd-foreground/85">
126 + {USER_IDENTITY.name}
127 + </span>
128 + <span className="truncate font-mono text-[9.5px] text-fd-foreground/45">
129 + {USER_IDENTITY.userId}
130 + </span>
131 + </div>
132 + </div>
133 +
134 + <div className="relative z-10 flex flex-col gap-2">
135 + {ACCOUNTS.map((app, i) => (
136 + <div
137 + className="flex w-44 items-center gap-2 rounded-[6px] border border-fd-border bg-fd-card px-2.5 py-2"
138 + key={app.slug}
139 + ref={el => {
140 + cardRefs.current[i] = el;
141 + }}
142 + >
143 + <img
144 + alt=""
145 + aria-hidden="true"
146 + className="size-4 shrink-0 object-contain"
147 + draggable={false}
148 + src={`${LOGO_CDN}/${app.slug}`}
149 + />
150 + <span className="truncate font-mono text-[11px] text-fd-foreground/85">
151 + {app.name}
152 + </span>
153 + <span className="ml-auto truncate font-mono text-[9.5px] text-fd-foreground/45">
154 + {app.account}
155 + </span>
156 + </div>
157 + ))}
158 + </div>
159 + </div>
160 + );
161 +}
docs/components/home-features.tsx
+82 -198
@@ -1,45 +1,44 @@
1 import Link from 'next/link';
2 -import { ArrowUpRight, Check } from 'lucide-react';
2 +import { ArrowUpRight } from 'lucide-react';
3 import type { ReactNode } from 'react';
4 +import { AuthDiagram } from './home-auth-diagram';
5 +
6 +const MOCK_FADE_STYLE = {
7 + maskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',
8 + WebkitMaskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',
9 +};
10
11 const LOGO_CDN = 'https://logos.composio.dev/api';
12 +// 10-col × 3-row grid: 29 recognizable toolkit logos plus a brand-tinted
13 +// "+1K" cell in the final slot, ordered as a rough mixed rhythm of comms,
14 +// project management, storage/design, and marketing/sales so no single
15 +// category clusters visually.
16 const TOOLKIT_LOGOS = [
7 - 'gmail', 'slack', 'github', 'linear', 'notion', 'figma', 'stripe', 'hubspot',
8 - 'googledrive', 'airtable', 'jira', 'discord', 'zoom', 'asana', 'salesforce',
9 -];
10 -
11 -const SESSION_APPS: { slug: string; name: string }[] = [
12 - { slug: 'slack', name: 'Slack' },
13 - { slug: 'gmail', name: 'Gmail' },
14 - { slug: 'linear', name: 'Linear' },
17 + 'gmail', 'slack', 'discord', 'zoom', 'notion',
18 + 'linear', 'jira', 'asana', 'trello', 'clickup',
19 + 'github', 'gitlab', 'figma', 'canva', 'googledrive',
20 + 'dropbox', 'airtable', 'confluence', 'salesforce', 'hubspot',
21 + 'stripe', 'shopify', 'twilio', 'sendgrid', 'mailchimp',
22 + 'calendly', 'youtube', 'twitter', 'linkedin',
23 ];
24
17 -const TRIGGER_FEED: { app: string; event: string; age: string }[] = [
18 - { app: 'gmail', event: 'message.new', age: '2s' },
19 - { app: 'stripe', event: 'charge.succeeded', age: '8s' },
20 - { app: 'linear', event: 'issue.opened', age: '14s' },
25 +const TRIGGER_FEED: { app: string; event: string }[] = [
26 + { app: 'gmail', event: 'message.new' },
27 + { app: 'stripe', event: 'charge.succeeded' },
28 + { app: 'linear', event: 'issue.opened' },
29 ];
30
23 -const WORKBENCH_CODE = `const result = await composio.workbench.run(\`
31 +const SANDBOX_CODE = `const result = await composio.sandbox.run(\`
32 const issues = await tools.LINEAR_LIST_ISSUES();
33 const summary = await ai.summarize(issues);
26 - await tools.SLACK_POST({ channel, text: summary });
34 + await tools.SLACK_POST({ text: summary });
35 \`);`;
36
29 -/**
30 - * Welcome-page capability grid. Compact card style with proper borders,
31 - * subtle shadow on hover, and a tight single-row visual at the bottom
32 - * of each card so the section reads as four discrete cards rather than
33 - * a flat block.
34 - */
37 export function HomeFeatures() {
38 return (
37 - <section className="not-prose mb-14">
38 - <SectionHeading
39 - eyebrow="What you get"
40 - title="Everything you need to ship production agents."
41 - />
42 - <div className="grid grid-cols-1 gap-5 sm:auto-rows-fr sm:grid-cols-2">
39 + <section className="not-prose mb-20">
40 + <SectionHeading title="Everything you need to ship production agents." />
41 + <div className="grid grid-cols-1 gap-6 sm:auto-rows-fr sm:grid-cols-2">
42 <FeatureCard
43 title="Tools that resolve by intent."
44 description="Smart tool search over 1000+ apps, surfaced just in time with the right scope."
@@ -50,7 +49,7 @@ export function HomeFeatures() {
49 title="Auth and context, per end-user."
50 description="OAuth, API keys, and tokens scoped to each user and refreshed automatically."
51 href="/docs/authentication"
53 - visual={<SessionsVisual />}
52 + visual={<AuthDiagram />}
53 />
54 <FeatureCard
55 title="Listen to anything, anywhere."
@@ -83,37 +82,41 @@ function FeatureCard({
82 return (
83 <Link
84 href={href}
86 - className="group relative flex flex-col justify-between gap-4 overflow-hidden border border-fd-border bg-fd-card p-5 no-underline shadow-[0_1px_0_rgba(15,15,15,0.04)] transition-[box-shadow,transform,border-color] duration-200 hover:-translate-y-px hover:border-fd-foreground/15 hover:shadow-[0_10px_24px_-12px_rgba(15,15,15,0.18)]"
85 + className="group relative flex flex-col overflow-hidden border border-fd-border bg-fd-card p-5 no-underline shadow-[0_1px_0_rgba(15,15,15,0.04)] transition-[box-shadow,transform,border-color] duration-200 hover:-translate-y-px hover:border-fd-foreground/15 hover:shadow-[0_10px_24px_-12px_rgba(15,15,15,0.18)] sm:p-6"
86 >
87 <ArrowUpRight
88 aria-hidden="true"
90 - className="absolute right-4 top-4 size-3.5 text-fd-foreground/45 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"
89 + className="absolute right-4 top-4 size-3.5 text-fd-foreground/45 transition-transform group-hover:-translate-y-px group-hover:translate-x-px sm:right-5 sm:top-5"
90 />
92 -
93 - <div className="flex flex-col gap-1 pr-5">
94 - <h3 className="text-[18px] font-medium leading-snug tracking-[-0.01em] text-fd-foreground">
91 + <div className="flex flex-col gap-1.5 pr-6">
92 + <h3 className="text-balance text-[18px] font-medium leading-snug tracking-[-0.01em] text-fd-foreground">
93 {title}
94 </h3>
97 - <p className="text-[13px] leading-[1.5] text-fd-foreground/65">
95 + <p className="max-w-[42ch] text-pretty text-[14px] leading-[1.55] text-fd-foreground/70">
96 {description}
97 </p>
98 </div>
101 -
102 - <div className="mt-1">{visual}</div>
99 + <div
100 + aria-hidden="true"
101 + className="pointer-events-none mt-6 h-40 select-none"
102 + style={MOCK_FADE_STYLE}
103 + >
104 + {visual}
105 + </div>
106 </Link>
107 );
108 }
109
110 function ToolkitsVisual() {
108 - // 8×2 grid: 15 recognizable toolkit logos + a brand-tinted "+1K" cell
109 - // in the last slot. Smaller square tiles than before so the grid stays
110 - // in the same vertical footprint while showing roughly 1.7× more logos.
111 + // 8×2 tile grid stretched to fill the visual pane. Tiles paint their own
112 + // bg-fd-card so they read as elevated on the recessed pane; the container's
113 + // bg-fd-border bleeds through the 1px gaps to draw hairlines between them.
114 return (
112 - <div className="grid grid-cols-8 gap-px overflow-hidden rounded-sm border border-fd-border bg-fd-border">
115 + <div className="grid h-full w-full grid-cols-10 grid-rows-3 gap-px overflow-hidden rounded-[8px] border border-fd-border bg-fd-border">
116 {TOOLKIT_LOGOS.map((slug) => (
117 <div
118 key={slug}
116 - className="flex aspect-square items-center justify-center bg-fd-background"
119 + className="flex items-center justify-center bg-fd-card"
120 >
121 <img
122 alt=""
@@ -124,174 +127,53 @@ function ToolkitsVisual() {
127 />
128 </div>
129 ))}
127 - <div className="flex aspect-square items-center justify-center bg-[var(--composio-brand)]/10 font-mono text-[10px] font-medium tracking-[-0.01em] text-[var(--composio-brand)]">
130 + <div className="flex items-center justify-center bg-[var(--composio-brand)]/10 font-mono text-[11px] font-medium tracking-[-0.01em] text-[var(--composio-brand)]">
131 +1K
132 </div>
133 </div>
134 );
135 }
136
134 -function SessionsVisual() {
135 - return (
136 - <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-background font-mono text-[11px]">
137 - <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-fd-foreground/45">
138 - <span className="uppercase tracking-[0.04em]">user_id</span>
139 - <span className="text-fd-foreground/75">usr_9x2kLm7</span>
140 - </div>
141 - <ul className="flex flex-col">
142 - {SESSION_APPS.map((app, i) => (
143 - <li
144 - key={app.slug}
145 - className={
146 - 'flex items-center justify-between px-2.5 py-1.5' +
147 - (i < SESSION_APPS.length - 1
148 - ? ' border-b border-fd-border'
149 - : '')
150 - }
151 - >
152 - <span className="inline-flex items-center gap-2 text-fd-foreground/75">
153 - <img
154 - alt=""
155 - aria-hidden="true"
156 - className="size-3.5 object-contain"
157 - draggable={false}
158 - src={`${LOGO_CDN}/${app.slug}`}
159 - />
160 - {app.name}
161 - </span>
162 - <span className="inline-flex items-center gap-1 text-[var(--composio-brand)]">
163 - <Check aria-hidden="true" className="size-3" />
164 - <span className="uppercase tracking-[0.04em]">connected</span>
165 - </span>
166 - </li>
167 - ))}
168 - </ul>
169 - </div>
170 - );
171 -}
172 -
137 function TriggersVisual() {
138 return (
175 - <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-background font-mono text-[11px]">
176 - <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-fd-foreground/45">
177 - <span className="inline-flex items-center gap-1.5">
178 - <span className="relative inline-flex">
179 - <span className="size-1.5 rounded-full bg-[var(--composio-brand)]" />
180 - <span className="absolute inset-0 animate-ping rounded-full bg-[var(--composio-brand)] opacity-60" />
139 + <ul className="flex h-full w-full flex-col overflow-hidden rounded-[8px] border border-fd-border bg-fd-card font-mono text-[11.5px]">
140 + {TRIGGER_FEED.map((row, i) => (
141 + <li
142 + key={`${row.app}-${row.event}`}
143 + className={
144 + 'flex flex-1 items-center gap-3 px-4' +
145 + (i < TRIGGER_FEED.length - 1 ? ' border-b border-fd-border' : '')
146 + }
147 + >
148 + <img
149 + alt=""
150 + aria-hidden="true"
151 + className="size-4 object-contain"
152 + draggable={false}
153 + src={`${LOGO_CDN}/${row.app}`}
154 + />
155 + <span className="truncate">
156 + <span className="text-fd-foreground/45">{row.app}.</span>
157 + <span className="text-fd-foreground/80">{row.event}</span>
158 </span>
182 - <span className="uppercase tracking-[0.04em]">live</span>
183 - </span>
184 - <span className="uppercase tracking-[0.04em]">trigger feed</span>
185 - </div>
186 - <ul className="flex flex-col">
187 - {TRIGGER_FEED.map((row, i) => (
188 - <li
189 - key={`${row.app}-${row.event}`}
190 - className={
191 - 'flex items-center gap-2 px-2.5 py-1.5 text-fd-foreground/75' +
192 - (i < TRIGGER_FEED.length - 1
193 - ? ' border-b border-fd-border'
194 - : '')
195 - }
196 - >
197 - <img
198 - alt=""
199 - aria-hidden="true"
200 - className="size-3.5 object-contain"
201 - draggable={false}
202 - src={`${LOGO_CDN}/${row.app}`}
203 - />
204 - <span className="truncate">
205 - <span className="text-fd-foreground/45">{row.app}.</span>
206 - <span>{row.event}</span>
207 - </span>
208 - <span className="ml-auto shrink-0 text-fd-foreground/35">
209 - {row.age}
210 - </span>
211 - </li>
212 - ))}
213 - </ul>
214 - </div>
159 + </li>
160 + ))}
161 + </ul>
162 );
163 }
164
165 function WorkbenchVisual() {
219 - // Mirrors the active workbench tile in the hero animation: outer
220 - // composio_workbench panel with python 3.11 status, then an active
221 - // instance card with CPU lights, task label, brand-blue "DONE" badge,
222 - // and a fade-masked code preview.
166 return (
224 - <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-card font-mono">
225 - <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-[10px]">
226 - <span className="uppercase tracking-[0.04em] text-fd-foreground/40">
227 - composio_workbench
228 - </span>
229 - <span className="inline-flex items-center gap-1 text-fd-foreground/40">
230 - <span className="relative inline-flex">
231 - <span className="size-1.5 rounded-full bg-[var(--composio-brand)]" />
232 - <span className="absolute inset-0 animate-ping rounded-full bg-[var(--composio-brand)] opacity-60" />
233 - </span>
234 - python 3.11
167 + <div className="flex h-full w-full flex-col overflow-hidden rounded-[8px] border border-fd-border bg-fd-card">
168 + <div className="flex shrink-0 items-center gap-2 border-b border-fd-border px-3.5 py-2">
169 + <span className="size-1.5 rounded-full bg-fd-foreground/25" />
170 + <span className="font-mono text-[10.5px] tracking-[0.02em] text-fd-foreground/50">
171 + sandbox.ts
172 </span>
173 </div>
237 - <div className="bg-fd-muted">
238 - <div className="flex items-center justify-between gap-2 border-b border-fd-border px-2.5 py-1">
239 - <div className="flex min-w-0 items-center gap-2">
240 - <StaticCpuLights />
241 - <span className="truncate text-[9px] uppercase tracking-wider text-fd-foreground/50">
242 - Run summarization
243 - </span>
244 - </div>
245 - <span className="shrink-0 text-[9px] uppercase tracking-wider text-[var(--composio-brand)]">
246 - done
247 - </span>
248 - </div>
249 - <div
250 - className="relative overflow-hidden px-2.5 py-1.5"
251 - style={{
252 - maskImage:
253 - 'linear-gradient(to bottom, black 0%, black 70%, transparent 100%)',
254 - WebkitMaskImage:
255 - 'linear-gradient(to bottom, black 0%, black 70%, transparent 100%)',
256 - }}
257 - >
258 - <pre className="overflow-hidden text-[10px] leading-[1.6] text-fd-foreground/70">
259 - {WORKBENCH_CODE}
260 - </pre>
261 - </div>
262 - </div>
263 - </div>
264 - );
265 -}
266 -
267 -function StaticCpuLights() {
268 - // 4×2 grid of brand-blue cells; each cell runs the `hero-cpu-pulse`
269 - // keyframe with a staggered delay so they ripple out of phase, mimicking
270 - // the noise-driven CpuLights in the demo zone — but cheap CSS-only.
271 - const cells = Array.from({ length: 8 });
272 - return (
273 - <div
274 - className="grid shrink-0 gap-[1px]"
275 - style={{
276 - gridTemplateColumns: 'repeat(4, 4px)',
277 - gridTemplateRows: 'repeat(2, 4px)',
278 - }}
279 - >
280 - {cells.map((_, i) => {
281 - const col = i % 4;
282 - const row = Math.floor(i / 4);
283 - // Diagonal-ish stagger so cells light up in a wave.
284 - const delay = (col * 120 + row * 60) % 720;
285 - return (
286 - <span
287 - key={i}
288 - className="bg-[var(--composio-brand)]"
289 - style={{
290 - animation: `hero-cpu-pulse 1.4s ease-in-out ${delay}ms infinite`,
291 - }}
292 - />
293 - );
294 - })}
174 + <pre className="flex-1 overflow-hidden bg-fd-muted/30 px-3.5 py-2.5 font-mono text-[10.5px] leading-[1.7] text-fd-foreground/70">
175 + {SANDBOX_CODE}
176 + </pre>
177 </div>
178 );
179 }
@@ -301,17 +183,19 @@ export function SectionHeading({
183 id,
184 title,
185 }: {
304 - eyebrow: string;
186 + eyebrow?: string;
187 id?: string;
188 title: string;
189 }) {
190 return (
191 <div className="mb-5 flex flex-col gap-1.5">
310 - <span className="font-mono text-[10.5px] uppercase tracking-[0.08em] text-fd-foreground/55">
311 - {eyebrow}
312 - </span>
192 + {eyebrow && (
193 + <span className="font-mono text-[10.5px] uppercase tracking-[0.08em] text-fd-foreground/55">
194 + {eyebrow}
195 + </span>
196 + )}
197 <h2
314 - className="text-xl font-medium leading-[1.15] tracking-[-0.01em] text-fd-foreground sm:text-2xl"
198 + className="text-balance text-xl font-medium leading-[1.15] tracking-[-0.01em] text-fd-foreground sm:text-2xl"
199 id={id}
200 >
201 {title}
docs/components/home-resources.tsx
+7 -2
@@ -5,10 +5,10 @@ import {
5 Boxes,
6 History,
7 Blocks,
8 + LayoutDashboard,
9 Wrench,
10 } from 'lucide-react';
11 import type { ReactNode } from 'react';
11 -import { SectionHeading } from './home-features';
12
13 const RESOURCES = [
14 {
@@ -41,6 +41,12 @@ const RESOURCES = [
41 description: 'Browse the 1000+ apps your agent can act on.',
42 href: '/toolkits',
43 },
44 + {
45 + icon: <LayoutDashboard aria-hidden="true" className="size-4" />,
46 + title: 'Platform Dashboard',
47 + description: 'Auth configs, connected accounts, and logs.',
48 + href: 'https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=welcome',
49 + },
50 ];
51
52 /**
@@ -51,7 +57,6 @@ const RESOURCES = [
57 export function HomeResources() {
58 return (
59 <section className="not-prose mb-12">
54 - <SectionHeading eyebrow="Keep exploring" title="Reach for the rest." />
60 <div className="grid grid-cols-1 gap-px border border-fd-border bg-fd-border sm:grid-cols-2 lg:grid-cols-3">
61 {RESOURCES.map((resource) => (
62 <ResourceCard key={resource.title} {...resource} />
docs/components/home-surfaces.tsx
+143 -38
@@ -1,23 +1,29 @@
1 import Link from 'next/link';
2 -import { ArrowUpRight, Code2, Plug } from 'lucide-react';
3 -import type { LucideIcon } from 'lucide-react';
2 +import { ArrowUp, ArrowUpRight, Mic, Plus } from 'lucide-react';
3 +import type { ComponentType } from 'react';
4 import { HOME_INTENTS, homeIntentAnchor, type HomeIntent } from '@/lib/home-navigation';
5 -import { SectionHeading } from './home-features';
5
7 -const INTENT_ICONS: Record<HomeIntent['id'], LucideIcon> = {
8 - build: Code2,
9 - use: Plug,
6 +const BOTTOM_FADE_STYLE = {
7 + maskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',
8 + WebkitMaskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',
9 +};
10 +
11 +/**
12 + * Each product is described by the same mock the dashboard onboarding
13 + * path step uses for it (composio_dashboard `path-step.tsx`): For You is
14 + * an agent chat composer next to the clients it plugs into, Platform is
15 + * the SDK in a code window — rebuilt here on docs theme tokens so they
16 + * hold up in both color schemes.
17 + */
18 +const INTENT_VISUALS: Record<HomeIntent['id'], ComponentType> = {
19 + build: PlatformVisual,
20 + use: ForYouVisual,
21 };
22
23 export function HomeSurfaces() {
24 return (
14 - <section className="not-prose mb-14">
15 - <SectionHeading
16 - eyebrow="Get started"
17 - id="two-ways-to-start"
18 - title="Two ways to start"
19 - />
20 - <div className="grid grid-cols-1 gap-5 md:grid-cols-2">
25 + <section className="not-prose mb-20" id="two-ways-to-start">
26 + <div className="flex flex-col gap-8">
27 {HOME_INTENTS.map(intent => (
28 <IntentCard key={intent.id} intent={intent} />
29 ))}
@@ -27,28 +33,42 @@ export function HomeSurfaces() {
33 }
34
35 function IntentCard({ intent }: { intent: HomeIntent }) {
30 - const Icon = INTENT_ICONS[intent.id];
36 + const Visual = INTENT_VISUALS[intent.id];
37
38 return (
33 - <article className="flex flex-col border border-fd-border bg-fd-card p-5 shadow-[0_1px_0_rgba(15,15,15,0.04)] sm:p-6">
34 - <AudienceBadge audience={intent.audience} />
35 - <div className="mb-4 flex items-center gap-2 text-[var(--composio-brand)]">
36 - <Icon aria-hidden="true" className="size-4" />
37 - <h3
38 - className="text-[18px] font-medium tracking-[-0.01em] text-fd-foreground"
39 - id={homeIntentAnchor(intent.title)}
40 - >
41 - {intent.title}
42 - </h3>
39 + <article className="grid overflow-hidden border border-fd-border bg-fd-card shadow-[0_1px_0_rgba(15,15,15,0.04)] md:grid-cols-[minmax(0,1fr)_calc(50%-0.75rem)]">
40 + <div className="relative overflow-hidden border-b border-fd-border bg-fd-background p-5 pb-40 sm:p-6 sm:pb-44 md:min-h-72 md:border-b-0 md:border-r md:pb-6">
41 + <div className="relative z-[1] flex flex-col gap-2.5">
42 + <h3
43 + className="flex items-center gap-2"
44 + id={homeIntentAnchor(intent.product)}
45 + >
46 + <img
47 + alt="Composio"
48 + className="h-[22px] w-auto dark:hidden"
49 + src="/Composio Logo.svg"
50 + />
51 + <img
52 + alt=""
53 + aria-hidden="true"
54 + className="hidden h-[22px] w-auto dark:block"
55 + src="/Composio Logo Dark.svg"
56 + />
57 + <ProductBadge product={intent.product} />
58 + </h3>
59 + <p className="max-w-[42ch] text-pretty text-[14px] leading-[1.55] text-fd-foreground/70">
60 + {intent.description}
61 + </p>
62 + </div>
63 + <div aria-hidden="true" className="pointer-events-none select-none">
64 + <Visual />
65 + </div>
66 </div>
44 - <p className="mb-5 text-[14px] leading-[1.55] text-fd-foreground/70">
45 - {intent.description}
46 - </p>
47 - <ul className="mt-auto flex flex-col gap-2">
67 + <ul className="flex flex-col divide-y divide-fd-border">
68 {intent.links.map(link => (
49 - <li key={link.href}>
69 + <li className="flex flex-1" key={link.href}>
70 <Link
51 - className="group flex items-start justify-between gap-4 border border-fd-border bg-fd-background p-3.5 no-underline transition-[border-color,background-color] hover:border-fd-foreground/15 hover:bg-fd-accent/40"
71 + className="group flex flex-1 items-center justify-between gap-4 px-4 py-5 no-underline transition-colors hover:bg-fd-accent/40 sm:px-5 sm:py-6"
72 href={link.href}
73 >
74 <span className="flex min-w-0 flex-col gap-0.5">
@@ -61,7 +81,7 @@ function IntentCard({ intent }: { intent: HomeIntent }) {
81 </span>
82 <ArrowUpRight
83 aria-hidden="true"
64 - className="mt-0.5 size-3.5 shrink-0 text-fd-foreground/50 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"
84 + className="size-3.5 shrink-0 text-fd-foreground/50 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"
85 />
86 </Link>
87 </li>
@@ -74,15 +94,20 @@ function IntentCard({ intent }: { intent: HomeIntent }) {
94 const PLATFORM_BADGE_GRADIENT =
95 'linear-gradient(135deg, #00e68a, #00b4d8, #0077ff)';
96
77 -function AudienceBadge({ audience }: { audience: HomeIntent['audience'] }) {
78 - const isPlatform = audience === 'Platform';
97 +/**
98 + * Port of the dashboard's `ComposioProductBadge` (composio_dashboard
99 + * `composio-product-badge.tsx`) so the docs fork and the dashboard product
100 + * switcher name the two products with the same mark.
101 + */
102 +function ProductBadge({ product }: { product: HomeIntent['product'] }) {
103 + const isPlatform = product === 'Platform';
104
105 return (
106 <span
107 className={
83 - 'relative mb-4 flex w-fit items-center rounded-[4px] px-[calc(0.25em+2px)] py-[calc(0.167em+2px)] font-mono text-[0.667em] font-semibold uppercase leading-none tracking-wide ' +
108 + 'relative flex items-center rounded-[5px] px-[9px] py-[7px] font-mono text-[14px] font-semibold uppercase leading-none tracking-wide ' +
109 (isPlatform
85 - ? 'audience-badge-platform'
110 + ? 'product-badge-platform'
111 : 'text-[#0007cd] dark:text-[#4d6fff]')
112 }
113 style={
@@ -99,9 +124,9 @@ function AudienceBadge({ audience }: { audience: HomeIntent['audience'] }) {
124 <span
125 aria-hidden="true"
126 className={
102 - 'pointer-events-none absolute inset-0 rounded-[4px] ' +
127 + 'pointer-events-none absolute inset-0 rounded-[5px] ' +
128 (isPlatform
104 - ? 'audience-badge-platform-border'
129 + ? 'product-badge-platform-border'
130 : 'border border-[#0007cd] dark:border-[#4d6fff]')
131 }
132 style={
@@ -118,7 +143,87 @@ function AudienceBadge({ audience }: { audience: HomeIntent['audience'] }) {
143 : undefined
144 }
145 />
121 - {audience}
146 + {product}
147 </span>
148 );
149 }
150 +
151 +const FOR_YOU_CLIENT_LOGOS = [
152 + { src: '/images/clients/claude.svg', label: 'Claude' },
153 + { src: '/images/clients/codex.png', label: 'Codex' },
154 + { src: '/images/clients/cursor.svg', label: 'Cursor' },
155 + { src: '/images/clients/openclaw.svg', label: 'OpenClaw' },
156 +];
157 +
158 +function ForYouVisual() {
159 + return (
160 + <>
161 + <div className="absolute inset-x-5 -bottom-3 flex items-end gap-4 sm:inset-x-6">
162 + <div
163 + className="grid shrink-0 grid-cols-2 gap-2.5"
164 + style={BOTTOM_FADE_STYLE}
165 + >
166 + {FOR_YOU_CLIENT_LOGOS.map(logo => (
167 + <img
168 + alt=""
169 + className="size-8 object-contain"
170 + draggable={false}
171 + key={logo.label}
172 + src={logo.src}
173 + />
174 + ))}
175 + </div>
176 + <div
177 + className="min-w-0 flex-1 rounded-[18px] border border-fd-border bg-fd-card p-3"
178 + style={BOTTOM_FADE_STYLE}
179 + >
180 + <div className="text-[12px] text-fd-foreground/50">
181 + How can I help?
182 + </div>
183 + <div className="mt-4 flex items-center gap-2 text-fd-foreground/50">
184 + <Plus className="size-3.5 shrink-0" />
185 + <Mic className="ml-auto size-3.5 shrink-0" />
186 + <span className="flex size-6 shrink-0 items-center justify-center rounded-[8px] bg-[var(--composio-brand)] text-white">
187 + <ArrowUp className="size-3.5" />
188 + </span>
189 + </div>
190 + </div>
191 + </div>
192 + </>
193 + );
194 +}
195 +
196 +function PlatformVisual() {
197 + return (
198 + <div
199 + className="absolute inset-x-5 -bottom-3 rounded-[12px] border border-fd-border bg-fd-card p-3 font-mono text-[11px] leading-[1.8] text-fd-foreground/75 sm:inset-x-6"
200 + style={BOTTOM_FADE_STYLE}
201 + >
202 + <div className="mb-2 flex items-center gap-1.5">
203 + <span className="size-2 rounded-full bg-fd-foreground/15" />
204 + <span className="size-2 rounded-full bg-fd-foreground/15" />
205 + <span className="size-2 rounded-full bg-fd-foreground/15" />
206 + </div>
207 + <div className="truncate">
208 + <span className="text-[var(--composio-brand)]">import</span>
209 + {" { Composio } "}
210 + <span className="text-[var(--composio-brand)]">from</span>
211 + <span className="text-fd-foreground/55">{" '@composio/core'"}</span>
212 + </div>
213 + <div className="truncate">
214 + <span className="text-[var(--composio-brand)]">const</span>
215 + {' session = '}
216 + <span className="text-[var(--composio-brand)]">await</span>
217 + {' composio.create'}
218 + <span className="text-fd-foreground/45">(userId)</span>
219 + </div>
220 + <div className="truncate">
221 + <span className="text-[var(--composio-brand)]">const</span>
222 + {' tools = '}
223 + <span className="text-[var(--composio-brand)]">await</span>
224 + {' session.tools'}
225 + <span className="text-fd-foreground/45">()</span>
226 + </div>
227 + </div>
228 + );
229 +}
docs/lib/home-navigation.ts
+6 -6
@@ -6,7 +6,7 @@ export interface HomeIntentLink {
6
7 export interface HomeIntent {
8 id: 'build' | 'use';
9 - audience: 'For you' | 'Platform';
9 + product: 'Platform' | 'For You';
10 title: string;
11 description: string;
12 links: HomeIntentLink[];
@@ -15,9 +15,9 @@ export interface HomeIntent {
15 export const HOME_INTENTS: HomeIntent[] = [
16 {
17 id: 'build',
18 - audience: 'Platform',
18 + product: 'Platform',
19 title: 'Build with Composio',
20 - description: 'Add Composio tools and authentication to your own agent or application.',
20 + description: 'Build Composio into your own agent or application — tools, auth, and triggers for every one of your users.',
21 links: [
22 {
23 title: 'Quickstart',
@@ -38,9 +38,9 @@ export const HOME_INTENTS: HomeIntent[] = [
38 },
39 {
40 id: 'use',
41 - audience: 'For you',
41 + product: 'For You',
42 title: 'Use Composio',
43 - description: 'Connect an existing coding agent or terminal to Composio.',
43 + description: 'Use Composio from the agents you already have — Claude Code, Codex, Cursor, or your terminal.',
44 links: [
45 {
46 title: 'Agent plugins',
@@ -71,7 +71,7 @@ export function homeIntentsToMarkdown(): string {
71 .map(link => `- [${link.title}](${link.href}): ${link.description}`)
72 .join('\n');
73
74 - return `### ${intent.title}\n\n**${intent.audience}**\n\n${intent.description}\n\n${links}`;
74 + return `### ${intent.title}\n\n**${intent.product}**\n\n${intent.description}\n\n${links}`;
75 }).join('\n\n');
76
77 return `## Two ways to start\n\n${sections}`;
docs/tests/static/home-navigation.test.ts
+19 -8
@@ -31,7 +31,7 @@ describe('Welcome navigation', () => {
31
32 for (const intent of HOME_INTENTS) {
33 expect(markdown).toContain(`### ${intent.title}`);
34 - expect(markdown).toContain(`**${intent.audience}**`);
34 + expect(markdown).toContain(`**${intent.product}**`);
35 for (const link of intent.links) {
36 expect(markdown).toContain(`[${link.title}](${link.href})`);
37 }
@@ -45,21 +45,32 @@ describe('Welcome navigation', () => {
45 expect(markdown).toContain('native Composio plugin for Codex or Claude Code');
46 });
47
48 - test('keeps rendered headings linkable and badges visible', async () => {
48 + test('keeps rendered headings linkable and product visuals present', async () => {
49 const source = await Bun.file(
50 new URL('../../components/home-surfaces.tsx', import.meta.url)
51 ).text();
52
53 expect(source).toContain('id="two-ways-to-start"');
54 for (const intent of HOME_INTENTS) {
55 - expect(homeIntentAnchor(intent.title)).toMatch(/^[a-z0-9-]+$/);
55 + expect(homeIntentAnchor(intent.product)).toMatch(/^[a-z0-9-]+$/);
56 }
57 - expect(source).toContain('id={homeIntentAnchor(intent.title)}');
57 + expect(source).toContain('id={homeIntentAnchor(intent.product)}');
58 + // Each card is headed by the canonical product lockup — Composio logo
59 + // plus the dashboard's ComposioProductBadge port — and leads with the
60 + // same mock the dashboard onboarding path step uses for that product: an
61 + // agent chat composer plus client logos for For You, the SDK in a code
62 + // window for Platform.
63 + expect(source).toContain('ProductBadge');
64 expect(source).toContain('background: PLATFORM_BADGE_GRADIENT');
59 - expect(source).toContain("backgroundClip: 'text'");
60 - expect(source).toContain("WebkitTextFillColor: 'transparent'");
61 - expect(source).toContain("mask: 'linear-gradient(#fff 0 0) content-box");
65 expect(source).toContain('text-[#0007cd] dark:text-[#4d6fff]');
63 - expect(source).toContain('audience-badge-platform-border');
66 + expect(source).toContain('product-badge-platform-border');
67 + expect(source).toContain('/Composio Logo.svg');
68 + expect(source).toContain('INTENT_VISUALS');
69 + expect(source).toContain('How can I help?');
70 + expect(source).toContain('composio.create');
71 + for (const logo of ['claude.svg', 'codex.png', 'cursor.svg', 'openclaw.svg']) {
72 + expect(source).toContain(`/images/clients/${logo}`);
73 + expect(await Bun.file(new URL(`../../public/images/clients/${logo}`, import.meta.url)).exists()).toBe(true);
74 + }
75 });
76 });