Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions apps/docs/app/[lang]/resources/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import type { Metadata } from "next";
import Link from "next/link";
import { translations } from "@/geistdocs";
import { type Resource, resources, type ResourceKind } from "@/lib/resources/data";

const title = "Resources";
const description = "Guides, templates, and examples to help you build with eve.";

const kindClassName: Record<ResourceKind, string> = {
Community: "border-transparent bg-gray-300 text-gray-1000",
Example: "border-transparent bg-gray-300 text-gray-1000",
Guide: "border-transparent bg-gray-300 text-gray-1000",
Reference: "border-transparent bg-gray-300 text-gray-1000",
Template: "border-transparent bg-gray-300 text-gray-1000",
};

export const metadata: Metadata = {
title,
description,
};

export const generateStaticParams = () => Object.keys(translations).map((lang) => ({ lang }));

const ResourceCard = ({ resource }: { resource: Resource }) => {
const isExternal = resource.href.startsWith("https://");
const className =
"flex h-full flex-col gap-3 rounded-xl border border-gray-alpha-400 bg-background-100 p-6 no-underline shadow-none transition-colors hover:bg-gray-100 dark:bg-gray-100 dark:hover:bg-gray-200";
const content = (
<>
<span
className={`inline-flex w-fit shrink-0 items-center justify-center rounded-full border px-2 py-0.5 font-medium text-xs ${kindClassName[resource.kind]}`}
>
{resource.kind}
</span>
<h2 className="line-clamp-2 text-balance font-medium text-base text-gray-1000 leading-snug">
{resource.title}
</h2>
<p className="line-clamp-2 text-gray-900 text-sm">{resource.description}</p>
</>
);

if (isExternal) {
return (
<a className={className} href={resource.href} rel="noopener noreferrer" target="_blank">
{content}
</a>
);
}

return (
<Link className={className} href={resource.href}>
{content}
</Link>
);
};

const ResourcesPage = () => (
<main className="mx-auto w-full max-w-5xl px-4 pt-16 pb-16 sm:pt-24">
<header className="space-y-4 pb-8">
<h1 className="text-balance font-semibold text-[40px] text-gray-1000 leading-[1.1] tracking-tight sm:text-5xl">
{title}
</h1>
<p className="max-w-2xl text-gray-900 text-lg leading-relaxed">{description}</p>
</header>
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
{resources.map((resource) => (
<ResourceCard key={resource.title} resource={resource} />
))}
</div>
</main>
);

export default ResourcesPage;
5 changes: 5 additions & 0 deletions apps/docs/app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export default function sitemap(): MetadataRoute.Sitemap {
priority: 1,
url: url("/"),
},
{
changeFrequency: "weekly",
priority: 0.5,
url: url("/resources"),
},
...pages,
];
}
4 changes: 4 additions & 0 deletions apps/docs/geistdocs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const nav = [
label: "Integrations",
href: "/integrations",
},
{
label: "Resources",
href: "/resources",
},
{
label: "GitHub",
href: `https://github.com/${github.owner}/${github.repo}/`,
Expand Down
60 changes: 60 additions & 0 deletions apps/docs/lib/resources/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export type ResourceKind = "Community" | "Example" | "Guide" | "Reference" | "Template";

export interface Resource {
description: string;
href: string;
kind: ResourceKind;
title: string;
}

export const resources: Resource[] = [
{
kind: "Guide",
title: "Build your first agent",
description:
"Follow the tutorial from a first agent through warehouse tools, spend approval, and a deployable chat UI.",
href: "/docs/tutorial/first-agent",
},
{
kind: "Guide",
title: "Frontend guides",
description:
"Use React, Vue, Svelte, Next.js, Nuxt, or SvelteKit helpers to put a durable eve session behind your own UI.",
href: "/docs/guides/frontend/overview",
},
{
kind: "Guide",
title: "TypeScript client",
description:
"Drive the default HTTP channel from scripts, tests, backend jobs, or custom server-side integrations.",
href: "/docs/guides/client/overview",
},
{
kind: "Template",
title: "Eve Chat Template",
description:
"A persisted Next.js chat template for Eve, built with shadcn/ui, Tailwind CSS, Streamdown, Better Auth, Drizzle, Neon, and Upstash Redis.",
href: "https://vercel.com/templates/eve/eve-chat-template",
},
{
kind: "Template",
title: "Eve Slack Agent",
description:
"A Slack agent template with webhook handling, Vercel Connect, a starter agent, and an example tool ready to deploy on Vercel.",
href: "https://vercel.com/templates/eve/eve-slack-agent",
},
{
kind: "Example",
title: "Weather Agent Fixture",
description:
"A small representative eve app with agent config, instructions, a typed weather tool, and a markdown skill.",
href: "https://github.com/vercel/eve/tree/main/apps/fixtures/weather-agent",
},
{
kind: "Reference",
title: "Eve Knowledge Base",
description:
"Vercel's Eve hub with getting-started guides, build guides, templates, docs, integrations, and community links.",
href: "https://vercel.com/kb/eve",
},
];