This document provides guidance for AI assistants working with the harbor-docs codebase.
This is the documentation website for Harbor, a framework for evaluating and optimizing agents and models in container environments. The site is built with Next.js 16, React 19, and Fumadocs.
Live site: https://harborframework.com
Main Harbor repository: https://github.com/laude-institute/harbor
- Framework: Next.js 16 (App Router)
- React: v19
- Documentation: Fumadocs (fumadocs-core, fumadocs-ui, fumadocs-mdx)
- Styling: Tailwind CSS 4 with CSS variables
- UI Components: shadcn/ui (new-york style)
- Database: Supabase (for registry data)
- Syntax Highlighting: Shiki (github-light/github-dark themes)
- Fonts: Google Sans Code, Google Sans Flex, Instrument Sans/Serif, Geist Mono
- Package Manager: bun
harbor-docs/
├── content/
│ └── docs/ # MDX documentation files
│ ├── meta.json # Navigation structure and page ordering
│ └── *.mdx # Documentation pages
├── src/
│ ├── app/
│ │ ├── (home)/ # Landing page route group
│ │ │ ├── components/ # Home page components
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ ├── docs/ # Documentation pages
│ │ │ ├── layout.tsx
│ │ │ └── [[...slug]]/page.tsx
│ │ ├── registry/ # Dataset registry page
│ │ ├── api/search/ # Search API route
│ │ ├── og/ # OpenGraph image generation
│ │ ├── llms-full.txt/ # LLM-friendly text export
│ │ ├── layout.tsx # Root layout
│ │ └── global.css # Global styles
│ ├── components/
│ │ ├── ui/ # shadcn/ui components
│ │ └── code-block.tsx
│ ├── lib/
│ │ ├── source.ts # Fumadocs source configuration
│ │ ├── layout.shared.tsx # Shared layout options
│ │ ├── utils.ts # Utility functions (cn helper)
│ │ └── supabase/ # Supabase client and types
│ └── mdx-components.tsx # MDX component overrides
├── public/ # Static assets (favicon, OG images)
├── source.config.ts # Fumadocs MDX configuration
├── next.config.mjs # Next.js configuration
├── tsconfig.json # TypeScript configuration
├── eslint.config.mjs # ESLint configuration
├── postcss.config.mjs # PostCSS configuration
├── components.json # shadcn/ui configuration
└── package.json
# Install dependencies
bun install
# Run development server (http://localhost:3000)
bun dev
# Build for production
bun run build
# Start production server
bun start
# Run ESLint
bun lint- Documentation is written in MDX format
meta.jsoncontrols page ordering and navigation sections- Frontmatter fields:
title,description,full(optional, for full-width pages) - Sections are created with
---SectionName---separators in meta.json
The documentation is organized into sections:
- Harbor: Core concepts, getting started, migration
- Agents: Agent documentation, terminus-2, trajectory format
- Tasks: Task format, tutorials, differences
- Datasets: Running benchmarks, adapters, metrics
- Cloud: Cloud sandbox providers
- Use Cases: Evals, RL, SFT
- Contributing: Contribution guidelines
Configures Fumadocs loader with:
- Base URL:
/docs - Lucide icons plugin
- Page image generation helpers
- LLM text extraction for
/llms-full.txtendpoint
Shared layout options including:
- Navigation title: "Harbor"
- GitHub link: https://github.com/laude-institute/harbor
- Navigation links: Docs, Registry, Discord
- Theme switcher (light/dark/system)
server.ts: Server-side Supabase client (no auth, read-only)types.ts: Generated TypeScript types for database schema- Tables:
dataset,dataset_task,dataset_metric,dataset_access_log
Required environment variables:
NEXT_PUBLIC_SUPABASE_URL=<supabase-url>
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=<supabase-anon-key>
- Strict mode enabled
- Path aliases:
@/*→./src/*,@/.source/*→.source/* - ESNext target with bundler module resolution
- Use Tailwind CSS utility classes
- Custom font variables:
font-sans,font-serif,font-code,font-mono - CSS variables for theming (defined in
src/app/global.css) - Use
cn()helper from@/lib/utilsfor conditional classes
- shadcn/ui components in
src/components/ui/ - Use
asChildpattern with Radix Slot for polymorphic components - Fumadocs MDX components available via
getMDXComponents()
Use Fumadocs UI components in MDX files:
<Callout>for important notes<TypeTable>for API documentation<Accordions>and<Accordion>for collapsible content<Files>,<Folder>,<File>for file tree visualization- Code blocks with
tab="name"for tabbed code examples
Example:
import { Callout } from 'fumadocs-ui/components/callout';
import { TypeTable } from 'fumadocs-ui/components/type-table';
<Callout title="Note">
Important information here.
</Callout>- Create a new
.mdxfile incontent/docs/ - Add frontmatter with
titleanddescription - Add the filename (without extension) to
content/docs/meta.jsonin the appropriate section - Use relative links to reference other docs (e.g.,
[link](/docs/other-page))
Use shadcn/ui CLI:
bunx shadcn@latest add <component-name>Components are installed to src/components/ui/ following the new-york style variant.
The following are auto-generated and should not be edited manually:
.source/- Fumadocs MDX compilation output.next/- Next.js build outputnode_modules/- Dependenciesnext-env.d.ts- Next.js TypeScript declarations
- The
.source/directory is generated byfumadocs-mdxduringpostinstall - Supabase types in
src/lib/supabase/types.tsare generated from the database schema - The registry page (
/registry) fetches live data from Supabase - The
/llms-full.txtendpoint provides all documentation as plain text for LLM consumption