@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 115 lines 6.04 KB
Raw
1 import Link from 'next/link';
2 import { ArrowRight, Wrench } from 'lucide-react';
3 import toolkitsData from '@/public/data/toolkits-list.json';
4 import type { ToolkitSummary } from '@/types/toolkit';
5 import { PRODUCT_AREAS } from '@/lib/knowledge/taxonomy';
6 import { KnowledgeSearchForm } from './knowledge-search-form';
7
8 const toolkits = toolkitsData as ToolkitSummary[];
9 const POPULAR_TOOLKIT_SLUGS = ['github', 'gmail', 'slack', 'notion', 'linear', 'hubspot'];
10 const popularToolkits = POPULAR_TOOLKIT_SLUGS.flatMap((slug) => {
11 const toolkit = toolkits.find((candidate) => candidate.slug === slug);
12 return toolkit ? [toolkit] : [];
13 });
14 const START_HERE_GUIDES = [
15 {
16 title: 'Build your first agent',
17 description: 'Create a session, connect an app, and run your first tool.',
18 href: '/docs/quickstart',
19 },
20 {
21 title: 'Use Composio with your coding agent',
22 description: 'Let your coding agent help add, configure, or troubleshoot Composio.',
23 href: '/docs/using-composio-skill',
24 },
25 {
26 title: 'Build a consumer agent',
27 description: 'Plan identity, connections, and sessions for individual users.',
28 href: '/docs/consumer-agents',
29 },
30 {
31 title: 'Build a B2B agent',
32 description: 'Model tenants, members, and connection ownership for a multi-tenant product.',
33 href: '/docs/b2b-agents',
34 },
35 {
36 title: 'Move to production',
37 description: 'Review authentication, security, reliability, and launch readiness.',
38 href: '/docs/production-readiness',
39 },
40 ];
41
42 export function KnowledgeHub() {
43 const browseAreas = PRODUCT_AREAS.filter((area) => area.defaultBrowse);
44
45 return (
46 <main>
47 <section className="border-b border-fd-border bg-gradient-to-b from-fd-primary/10 via-fd-muted/30 to-fd-background">
48 <div className="mx-auto w-full max-w-7xl px-4 py-10 sm:px-6 sm:py-12 lg:px-8">
49 <div className="max-w-3xl">
50 <h1 className="text-4xl font-semibold tracking-tight sm:text-5xl">Search Composio support knowledge</h1>
51 <p className="mt-4 max-w-2xl text-base leading-7 text-fd-muted-foreground sm:text-lg">
52 Find public troubleshooting answers, setup guidance, exact errors, and toolkit-specific fixes.
53 </p>
54 </div>
55 <div className="mt-6">
56 <KnowledgeSearchForm />
57 </div>
58 </div>
59 </section>
60
61 <div className="mx-auto w-full max-w-7xl space-y-12 px-4 py-10 sm:px-6 sm:py-12 lg:px-8">
62 <section id="start-here" aria-labelledby="start-here-title">
63 <div>
64 <h2 id="start-here-title" className="text-2xl font-semibold tracking-tight sm:text-3xl">Start here</h2>
65 <p className="mt-2 text-sm leading-6 text-fd-muted-foreground">Choose the path that matches how you want to use Composio.</p>
66 </div>
67 <div className="mt-6 grid gap-px overflow-hidden border border-fd-border bg-fd-border sm:grid-cols-2 lg:grid-cols-5">
68 {START_HERE_GUIDES.map((guide) => (
69 <Link key={guide.href} href={guide.href} className="group bg-fd-background p-5 transition-colors hover:bg-fd-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fd-ring">
70 <h3 className="flex items-center justify-between gap-4 font-semibold">
71 {guide.title}
72 <ArrowRight className="size-4 shrink-0 text-fd-muted-foreground transition-transform group-hover:translate-x-1" aria-hidden="true" />
73 </h3>
74 <p className="mt-2 text-sm leading-6 text-fd-muted-foreground">{guide.description}</p>
75 </Link>
76 ))}
77 </div>
78 </section>
79
80 <section id="support-topics" aria-labelledby="support-topics-title">
81 <h2 id="support-topics-title" className="text-2xl font-semibold tracking-tight sm:text-3xl">Support topics</h2>
82 <div className="mt-6 grid gap-px overflow-hidden border border-fd-border bg-fd-border sm:grid-cols-2 lg:grid-cols-5">
83 {browseAreas.map((area) => (
84 <Link key={area.slug} href={`/kb/topic/${area.slug}`} className="group bg-fd-background p-5 transition-colors hover:bg-fd-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fd-ring">
85 <h3 className="flex items-center justify-between gap-4 font-semibold">
86 {area.title}
87 <ArrowRight className="size-4 shrink-0 text-fd-muted-foreground transition-transform group-hover:translate-x-1" aria-hidden="true" />
88 </h3>
89 <p className="mt-2 text-sm leading-6 text-fd-muted-foreground">{area.description}</p>
90 </Link>
91 ))}
92 </div>
93 </section>
94
95 <section aria-labelledby="toolkits-title">
96 <div className="flex flex-col items-start gap-3 sm:flex-row sm:items-center sm:justify-between">
97 <h2 id="toolkits-title" className="text-2xl font-semibold tracking-tight sm:text-3xl">Browse by toolkit</h2>
98 <Link href="/kb/toolkits" className="inline-flex items-center gap-2 text-sm font-medium hover:text-fd-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring">
99 View all toolkits <ArrowRight className="size-4" aria-hidden="true" />
100 </Link>
101 </div>
102 <div className="mt-6 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6">
103 {popularToolkits.map((toolkit) => (
104 <Link key={toolkit.slug} href={`/kb/toolkit/${toolkit.slug}`} className="flex items-center gap-3 border border-fd-border p-3 text-sm font-medium transition-colors hover:bg-fd-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring">
105 {toolkit.logo ? <img src={toolkit.logo} alt="" width={28} height={28} className="size-7 object-contain" /> : <Wrench className="size-7 text-fd-muted-foreground" aria-hidden="true" />}
106 <span className="truncate">{toolkit.name.trim()}</span>
107 </Link>
108 ))}
109 </div>
110 </section>
111
112 </div>
113 </main>
114 );
115 }