@devries-cameron20 / composio Mirror · read-only
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, 03:37 UTC

next
tsx 103 lines 2.9 KB
Raw
1 import Link from 'next/link';
2 import {
3 ArrowUpRight,
4 BookOpenText,
5 Boxes,
6 History,
7 Blocks,
8 LayoutDashboard,
9 Wrench,
10 } from 'lucide-react';
11 import type { ReactNode } from 'react';
12 import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';
13
14 const RESOURCES = [
15 {
16 icon: <BookOpenText aria-hidden="true" className="size-4" />,
17 title: 'Quickstart',
18 description: 'A working agent in five steps.',
19 href: '/docs/quickstart',
20 },
21 {
22 icon: <Boxes aria-hidden="true" className="size-4" />,
23 title: 'API Reference',
24 description: 'Every endpoint, with cURL.',
25 href: '/reference',
26 },
27 {
28 icon: <Wrench aria-hidden="true" className="size-4" />,
29 title: 'Examples',
30 description: 'End-to-end recipes for real agents.',
31 href: '/examples',
32 },
33 {
34 icon: <History aria-hidden="true" className="size-4" />,
35 title: 'Changelog',
36 description: 'What shipped this week.',
37 href: '/docs/changelog',
38 },
39 {
40 icon: <Blocks aria-hidden="true" className="size-4" />,
41 title: 'Toolkits',
42 description: `Browse the ${TOOLKIT_COUNT_LABEL} apps your agent can act on.`,
43 href: '/toolkits',
44 },
45 {
46 icon: <LayoutDashboard aria-hidden="true" className="size-4" />,
47 title: 'Platform Dashboard',
48 description: 'Auth configs, connected accounts, and logs.',
49 href: 'https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=welcome',
50 },
51 ];
52
53 /**
54 * Welcome-page resources row — secondary destinations the reader is
55 * likely to need next. Pattern lifted from the OpenAI Platform "Help
56 * center / Developer forum / Cookbook / Status" footer row.
57 */
58 export function HomeResources() {
59 return (
60 <section className="not-prose mb-10">
61 <div className="grid grid-cols-1 gap-px overflow-hidden rounded-[14px] border border-fd-border bg-fd-border sm:grid-cols-2 lg:grid-cols-3">
62 {RESOURCES.map((resource) => (
63 <ResourceCard key={resource.title} {...resource} />
64 ))}
65 </div>
66 </section>
67 );
68 }
69
70 function ResourceCard({
71 icon,
72 title,
73 description,
74 href,
75 }: {
76 icon: ReactNode;
77 title: string;
78 description: string;
79 href: string;
80 }) {
81 return (
82 <Link
83 href={href}
84 className="group flex flex-col gap-1 bg-fd-background p-4 no-underline transition-colors hover:bg-fd-accent/40"
85 >
86 <div className="flex items-center justify-between">
87 <span className="inline-flex items-center gap-2 text-fd-foreground/80">
88 {icon}
89 <span className="text-[15px] font-medium tracking-[-0.005em] text-fd-foreground">
90 {title}
91 </span>
92 </span>
93 <ArrowUpRight
94 aria-hidden="true"
95 className="size-3.5 text-fd-foreground/50 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"
96 />
97 </div>
98 <p className="text-[13px] leading-[1.55] text-fd-foreground/65">
99 {description}
100 </p>
101 </Link>
102 );
103 }