|
| 1 | +# @pyreon/docs |
| 2 | + |
| 3 | +Documentation site for the Pyreon UI framework ecosystem. |
| 4 | + |
| 5 | +## Stack |
| 6 | + |
| 7 | +- **Framework**: Next.js 16 (App Router, static export to `out/`) |
| 8 | +- **Docs engine**: Fumadocs (fumadocs-core, fumadocs-ui, fumadocs-mdx) |
| 9 | +- **Styling**: Tailwind CSS v4 + fumadocs-ui preset |
| 10 | +- **Linting**: Biome (extends `@vitus-labs/tools-lint/biome`) |
| 11 | +- **TypeScript**: 6.x with strict mode |
| 12 | +- **Package manager**: Bun |
| 13 | +- **Deployment**: GitHub Pages via GitHub Actions |
| 14 | + |
| 15 | +## Project structure |
| 16 | + |
| 17 | +``` |
| 18 | +src/ |
| 19 | + app/ |
| 20 | + (home)/page.tsx — Landing page (hero, features, package cards) |
| 21 | + docs/layout.tsx — Docs sidebar layout (fumadocs DocsLayout) |
| 22 | + docs/[[...slug]]/page.tsx — Dynamic MDX page renderer |
| 23 | + layout.tsx — Root layout (RootProvider, static search) |
| 24 | + global.css — Tailwind imports + custom hero/card styles |
| 25 | + components/ — Custom MDX components (APICard, PackageBadge, PropTable, CompatMatrix, Since) |
| 26 | + lib/ |
| 27 | + source.ts — Fumadocs source loader |
| 28 | + layout.shared.tsx — Nav/link config shared between layouts |
| 29 | +
|
| 30 | +content/docs/ — MDX documentation pages (one folder per package) |
| 31 | +source.config.ts — Fumadocs MDX config (remarkInstall plugin) |
| 32 | +mdx-components.tsx — MDX component registry |
| 33 | +``` |
| 34 | + |
| 35 | +## Commands |
| 36 | + |
| 37 | +```bash |
| 38 | +bun run dev # Start dev server |
| 39 | +bun run build # Static export to out/ |
| 40 | +bun run typecheck # tsc --noEmit |
| 41 | +bun run lint # biome check . |
| 42 | +bun run lint:fix # biome check . --write |
| 43 | +bun run format # biome format . --write |
| 44 | +bun run check # typecheck + lint + build |
| 45 | +``` |
| 46 | + |
| 47 | +## Content authoring |
| 48 | + |
| 49 | +- Each package has a folder under `content/docs/<package>/` with `index.mdx` and optional `meta.json` |
| 50 | +- MDX files use fumadocs frontmatter (`title`, `description`) |
| 51 | +- Custom components available in MDX: `APICard`, `PackageBadge`, `PropTable`, `CompatMatrix`, `Since` |
| 52 | +- Install blocks use `remarkInstall` plugin — write ```` ```package-install ```` |
| 53 | +- Navigation tree is driven by `meta.json` files (fumadocs convention) |
| 54 | + |
| 55 | +## Custom MDX components |
| 56 | + |
| 57 | +- **APICard** — API item card with type badge (fn, C, H, T, K, P, Cx) and optional signature |
| 58 | +- **PackageBadge** — Package name/version badge with status indicator (stable/beta/alpha/deprecated) |
| 59 | +- **PropTable** — Props documentation table with columns: Prop, Type, Default, Description |
| 60 | +- **CompatMatrix** — Framework compatibility table with support levels (full/partial/none) |
| 61 | +- **Since** — Version badge (e.g. "v1.2.0+") |
| 62 | + |
| 63 | +## CI/CD |
| 64 | + |
| 65 | +- `ci.yml` — PR checks: lint, typecheck, build, dependency-review, CodeQL |
| 66 | +- `deploy.yml` — Push to main: runs CI, then deploys `out/` to GitHub Pages |
| 67 | +- `dependency-update.yml` — Weekly Monday: `bun update`, typecheck, lint, build, auto-PR |
| 68 | +- `codeql.yml` — Weekly Wednesday: standalone security scan |
| 69 | +- Dependabot groups: fumadocs, react, tailwind, types, GitHub Actions |
| 70 | + |
| 71 | +## Conventions |
| 72 | + |
| 73 | +- Static export (`output: 'export'`) — no server runtime |
| 74 | +- All GitHub Actions pinned by SHA with version comment |
| 75 | +- Biome extends `@vitus-labs/tools-lint/biome` (shared across Pyreon repos) |
| 76 | +- No tests (static docs site) — quality gates are typecheck + lint + build |
0 commit comments