docs/README.md
rabbitblood 7cdc0bc9b4 init: scaffold doc.moleculesai.app with Fumadocs + Next.js 15
Customer-facing documentation site for Molecule AI. Built with Fumadocs
(open-source MIT, Next.js 15 App Router native, Tailwind v4, MDX) so we
own the deployment and aesthetic and can grow into custom doc components
for our agent-canvas flows.

## Why Fumadocs (over Mintlify, Nextra, Docusaurus)
- Open source, no vendor lock-in (vs Mintlify SaaS subscription)
- Built on Next.js 15 App Router — matches our existing canvas stack
- Less opinionated than Nextra; can grow into custom doc components
- React/Tailwind first; team already on this stack
- Ships search, dark mode, Shiki highlighting, MDX out of the box

## Initial structure
- app/                 — Next.js App Router (home + docs + search route)
- content/docs/        — MDX source (3 hand-written + 9 stub pages)
- lib/source.ts        — Fumadocs loader bound to the MDX content
- mdx-components.tsx   — default + future custom MDX renderers
- source.config.ts     — MDX compile config

## Hand-written launch content
- index.mdx     — landing / what you can build / how it works
- quickstart.mdx — clone repo → docker compose → import template → talk to PM
- concepts.mdx  — the five primitives: workspaces / plugins / channels / schedules / canvas

## Stub pages (Documentation Specialist agent fills these in on cron)
- org-template, plugins, channels, schedules
- architecture, api-reference, self-hosting
- observability, troubleshooting

## Ownership
The Documentation Specialist agent in the molecule-dev org template will
own this repo end-to-end:
- Watches PRs landing in the platform monorepo
- Auto-opens docs PRs when public APIs / templates / plugins / channels change
- Runs daily cron to backfill stubs and refresh stale pages

Manual edits welcome. Agent picks up on next cron tick.
2026-04-14 21:01:17 -07:00

87 lines
2.8 KiB
Markdown

# Molecule AI Documentation
The customer-facing documentation site for Molecule AI, deployed at
[doc.moleculesai.app](https://doc.moleculesai.app).
Built with **[Fumadocs](https://fumadocs.dev)** + Next.js 15 (App Router) +
Tailwind v4 + MDX.
## Why Fumadocs
- **Open source** (MIT) — we self-host on our own domain, no vendor lock-in
- **Next.js 15 native** — matches the canvas stack already in the platform monorepo
- **Flexible** — can grow into custom doc components for our agent canvas
flows, embedded mini-canvases in docs, etc.
- **Modern aesthetic** — Shiki code highlighting, full-text search, dark
mode, all out of the box
## Local development
```bash
npm install
npm run dev
```
Visit [http://localhost:3000](http://localhost:3000).
## Adding pages
1. Create a new `.mdx` file under `content/docs/`.
2. Add an entry to `content/docs/meta.json` to control sidebar ordering.
3. Frontmatter: `title` and `description` are required.
```mdx
---
title: My new page
description: One-line summary used in nav + meta tags.
---
Content goes here.
```
## Repository layout
```
.
├── app/ # Next.js App Router routes
│ ├── (home)/ # marketing landing
│ ├── docs/[[...slug]]/ # docs dynamic route
│ ├── api/search/ # built-in full-text search
│ ├── layout.tsx # root layout + RootProvider
│ └── layout.config.tsx # nav links shared by home + docs
├── content/docs/ # MDX source — the actual documentation
│ ├── meta.json # sidebar order
│ ├── index.mdx # docs landing
│ └── *.mdx # one file per page
├── lib/source.ts # Fumadocs loader bound to the MDX source
├── mdx-components.tsx # default + custom MDX renderers
├── source.config.ts # MDX compile config (remark/rehype plugins)
├── next.config.mjs # Next config wrapped with createMDX
├── postcss.config.mjs # Tailwind v4 postcss plugin
└── package.json
```
## Who maintains this
The **Documentation Specialist** agent in our `molecule-dev` org template
owns this repo end-to-end. It runs on a schedule, watches PRs landing in the
[platform monorepo](https://github.com/Molecule-AI/molecule-monorepo), and
opens docs PRs here whenever:
- A new public API endpoint lands
- A new template / plugin / channel is added
- A user-facing concept changes
- An ecosystem-watch entry needs publishing
Manual edits welcome. The agent picks up changes on its next cron tick.
## Deployment
This site is deployed to `doc.moleculesai.app` via Vercel (TBD — once the
domain is configured). PRs to `main` ship to preview URLs automatically.
## Contributing
Open a PR. The Documentation Specialist + a human reviewer will look at it
within one cron tick (currently daily).