Listoca

Documentation

Write and organize these docs, and deploy them.

These docs are apps/docs, a fumadocs app on TanStack Start. They come with search, AI page actions and llms.txt, branded like the rest of the product.

bun run dev:docs   # http://localhost:3024 (also started by `bun run dev`)
VariableDefaultUsed for
VITE_SITE_URLhttp://localhost:3022the "Website" link in the navigation
VITE_SAAS_URLhttp://localhost:3021the "Open the app" link

The name, the repository (for "Open in GitHub") and the routes are in apps/docs/src/lib/shared.ts. The app and the marketing site link here through their VITE_DOCS_URL; leave it empty to hide those links.

Writing pages

Pages are MDX files in apps/docs/content/docs:

---
title: Webhooks
description: Shown under the title, in search results and link previews.
icon: Webhook # optional, any lucide icon name
---

Markdown, plus components like <Cards> and <Callout>.

The sidebar follows the meta.json files. The root one sorts pages into sections:

{
  "pages": ["---Getting started---", "index", "installation", "---Guides---", "payments", "...api"]
}
  • ---Title--- starts a section.
  • A folder appears as a collapsible group with its own meta.json (title and pages). "...folder" lists a folder's pages inline instead.
  • "..." adds every page not listed yet. Without it, unlisted pages are left out of the sidebar.

When a feature lands, add its guide under Guides: what it does, how to configure it, and how to extend it, with file paths in backticks.

  • Search covers every page and endpoint (Orama, served by /api/search).
  • Page actions: "Copy Markdown" and the "Open" menu (ChatGPT, Claude, Cursor, Scira, GitHub, the raw Markdown) on every guide.
  • For LLMs: /llms.txt lists all pages, /llms-full.txt has their full text, and any page is available as Markdown by adding .md to its URL (/docs/installation.md).
  • Share images: /og/docs/<page>/image.webp renders the title and description.

Branding

The docs map fumadocs' colors onto the active design's tokens (packages/ui/src/styles/designs/) and use the same Logo and fonts, so rebranding the app rebrands the docs too. The mapping is in apps/docs/src/styles/app.css.

Build and deploy

bun run --cwd apps/docs build   # prerenders every page
bun apps/docs/.output/server/index.mjs
  • The build prerenders every page, llms.txt and llms-full.txt, and precompresses them. The server answers search, share images and the .md routes.
  • It runs on Bun (bun --bun vp build) with the bun server preset, like the marketing site.
  • docker compose up docs builds the same image (apps/docs/Dockerfile). The VITE_* URLs are build arguments, because they're baked into the prerendered pages.

On this page