|
| 1 | +# Self-Driving Agents — docs site |
| 2 | + |
| 3 | +Static documentation site for [self-driving-agents](https://github.com/vectorize-io/self-driving-agents). Built with [Next.js 15](https://nextjs.org) (App Router, static export) and [Tailwind CSS v4](https://tailwindcss.com), deployed to GitHub Pages. |
| 4 | + |
| 5 | +## Local development |
| 6 | + |
| 7 | +```bash |
| 8 | +cd website |
| 9 | +npm install |
| 10 | +npm run dev |
| 11 | +``` |
| 12 | + |
| 13 | +The site is served at <http://localhost:4321>. Top-level template directories at the repo root (e.g. `marketing/`) are read at build time, so any change to a `bank-template.json` or `.md` file under them shows up on a refresh. |
| 14 | + |
| 15 | +## Build |
| 16 | + |
| 17 | +```bash |
| 18 | +npm run build |
| 19 | +``` |
| 20 | + |
| 21 | +The static output goes to `website/out/`. Both `dev` and `build` pin `NODE_ENV` themselves, so your shell setting doesn't matter. |
| 22 | + |
| 23 | +## Deployment |
| 24 | + |
| 25 | +### GitHub Pages (current) |
| 26 | + |
| 27 | +Pushed automatically on every push to `main` that touches `website/**` or any top-level template dir. See [.github/workflows/pages.yml](../.github/workflows/pages.yml). The workflow sets `SITE_BASE=/self-driving-agents` so links/assets resolve under <https://vectorize-io.github.io/self-driving-agents/>. |
| 28 | + |
| 29 | +### Vercel / other static hosts |
| 30 | + |
| 31 | +`npm run build` produces a plain static `out/` directory — drop it on any host. For Vercel, just connect the repo: it auto-detects Next.js and serves the static export. |
| 32 | + |
| 33 | +For a deployment without a base path (e.g. a dedicated domain or Vercel preview), leave `SITE_BASE` unset. |
| 34 | + |
| 35 | +## Structure |
| 36 | + |
| 37 | +``` |
| 38 | +website/ |
| 39 | + src/ |
| 40 | + app/ # App Router pages |
| 41 | + page.tsx # / |
| 42 | + not-found.tsx # 404 |
| 43 | + layout.tsx # root layout |
| 44 | + globals.css # Tailwind + theme tokens |
| 45 | + concepts/page.tsx # /concepts |
| 46 | + quickstart/page.tsx # /quickstart |
| 47 | + agents/page.tsx # /agents (lists top-level + search) |
| 48 | + agents/[...slug]/page.tsx # /agents/marketing, /agents/marketing/seo, ... |
| 49 | + harnesses/page.tsx # /harnesses |
| 50 | + harnesses/[slug]/page.tsx # /harnesses/claude-code, /claude, ... |
| 51 | + components/ |
| 52 | + Header.tsx, Footer.tsx |
| 53 | + AgentCard.tsx, AgentSearch.tsx (client) |
| 54 | + CodeBlock.tsx, HarnessLogo.tsx |
| 55 | + Mermaid.tsx (client — dynamic import of mermaid) |
| 56 | + lib/ |
| 57 | + agents.ts # walks ../<top-level>/ at build time |
| 58 | + harnesses.ts # static harness metadata |
| 59 | + link.ts # base-path-aware link helper |
| 60 | + public/ |
| 61 | + favicon.svg |
| 62 | + logos/ # claude.svg, nvidia.svg, openclaw.svg, ... |
| 63 | + next.config.mjs |
| 64 | + postcss.config.mjs |
| 65 | +``` |
| 66 | + |
| 67 | +## Adding a new harness |
| 68 | + |
| 69 | +Edit `src/lib/harnesses.ts` and add a new entry to `HARNESSES`. The page at `/harnesses/<slug>` is generated automatically. |
| 70 | + |
| 71 | +## Adding new agents |
| 72 | + |
| 73 | +Drop a new directory at the repo root (or under any existing template root) with a `bank-template.json`. The loader auto-discovers any top-level directory with that file, so a new `engineering/` department appears on the next push to `main` with no code changes here. |
0 commit comments