Skip to content

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

2.9 KB
Raw Blame
import Link from 'next/link';
import {
  ArrowUpRight,
  BookOpenText,
  Boxes,
  History,
  Blocks,
  LayoutDashboard,
  Wrench,
} from 'lucide-react';
import type { ReactNode } from 'react';
import { TOOLKIT_COUNT_LABEL } from '@/lib/toolkit-count';

const RESOURCES = [
  {
    icon: <BookOpenText aria-hidden="true" className="size-4" />,
    title: 'Quickstart',
    description: 'A working agent in five steps.',
    href: '/docs/quickstart',
  },
  {
    icon: <Boxes aria-hidden="true" className="size-4" />,
    title: 'API Reference',
    description: 'Every endpoint, with cURL.',
    href: '/reference',
  },
  {
    icon: <Wrench aria-hidden="true" className="size-4" />,
    title: 'Examples',
    description: 'End-to-end recipes for real agents.',
    href: '/examples',
  },
  {
    icon: <History aria-hidden="true" className="size-4" />,
    title: 'Changelog',
    description: 'What shipped this week.',
    href: '/docs/changelog',
  },
  {
    icon: <Blocks aria-hidden="true" className="size-4" />,
    title: 'Toolkits',
    description: `Browse the ${TOOLKIT_COUNT_LABEL} apps your agent can act on.`,
    href: '/toolkits',
  },
  {
    icon: <LayoutDashboard aria-hidden="true" className="size-4" />,
    title: 'Platform Dashboard',
    description: 'Auth configs, connected accounts, and logs.',
    href: 'https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=welcome',
  },
];

/**
 * Welcome-page resources row — secondary destinations the reader is
 * likely to need next. Pattern lifted from the OpenAI Platform "Help
 * center / Developer forum / Cookbook / Status" footer row.
 */
export function HomeResources() {
  return (
    <section className="not-prose mb-12">
      <div className="grid grid-cols-1 gap-px border border-fd-border bg-fd-border sm:grid-cols-2 lg:grid-cols-3">
        {RESOURCES.map((resource) => (
          <ResourceCard key={resource.title} {...resource} />
        ))}
      </div>
    </section>
  );
}

function ResourceCard({
  icon,
  title,
  description,
  href,
}: {
  icon: ReactNode;
  title: string;
  description: string;
  href: string;
}) {
  return (
    <Link
      href={href}
      className="group flex flex-col gap-1.5 bg-fd-background p-5 no-underline transition-colors hover:bg-fd-accent/40"
    >
      <div className="flex items-center justify-between">
        <span className="inline-flex items-center gap-2 text-fd-foreground/80">
          {icon}
          <span className="text-[15px] font-medium tracking-[-0.005em] text-fd-foreground">
            {title}
          </span>
        </span>
        <ArrowUpRight
          aria-hidden="true"
          className="size-3.5 text-fd-foreground/50 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"
        />
      </div>
      <p className="text-[13px] leading-[1.55] text-fd-foreground/65">
        {description}
      </p>
    </Link>
  );
}