---
name: website-dev
model: claude-opus-4-7
description: Develop, build, and deploy the Docusaurus documentation website
disable-model-invocation: true
allowed-tools: Bash, Read, Write, Edit, Grep, Glob
argument-hint: [dev|build|deploy|docs]
---

# Docusaurus Website Development

Develop and manage the project documentation website (Docusaurus 3.x).

**Argument** (optional): `dev` (start dev server), `build` (production build), `deploy` (GitHub Pages), `docs` (edit documentation).

## Prerequisites

- Node.js >= 20.0
- npm dependencies installed: `cd website && npm install`

## Commands

### Start development server

```bash
cd /Users/pierrejonnycau/Documents/WORKS/esp32-emu-turbo
make website-dev
# or directly:
cd website && npm start
```

Opens at http://localhost:3000 with hot reload.

### Production build

```bash
make website-build
# or directly:
cd website && npm run build
```

Output: `website/build/` (static HTML/CSS/JS).

### Deploy to GitHub Pages

```bash
cd website && npm run deploy
```

Deploys to https://pjcau.github.io/esp32-emu-turbo/

### Type check

```bash
cd website && npm run typecheck
```

## Documentation Structure

All documentation lives in `website/docs/` (single source of truth):

| File | Content |
|------|---------|
| `feasibility.md` | ESP32-S3 feasibility analysis |
| `snes-hardware.md` | SNES hardware spec + GPIO mapping |
| `components.md` | BOM with AliExpress links |
| `schematics.md` | Electrical schematic documentation |
| `prototyping.md` | Breadboard wiring guide |
| `enclosure.md` | 3D enclosure design + renderings |
| `manufacturing.md` | JLCPCB PCBA ordering + cost analysis |
| `verification.md` | Pre-production DRC/simulation checks |
| `software.md` | Software architecture, SNES optimization |

## Static Assets

Rendered images are served from `website/static/img/`:

- `schematics/*.svg` — KiCad schematic exports
- `pcb/*.svg`, `pcb/*.png`, `pcb/*.gif` — PCB layout visualizations
- `renders/*.png` — OpenSCAD enclosure renders (7 views)

These are generated by the rendering pipeline (`make render-all`).

## Website Configuration

- `website/docusaurus.config.ts` — Site config (title, URL, theme, navbar)
- `website/sidebars.ts` — Documentation sidebar structure
- `website/src/pages/` — Custom React pages (landing page)
- `website/src/css/custom.css` — Theme customizations
- `website/package.json` — Dependencies (Docusaurus 3.9.2, React 19)
- `website/tsconfig.json` — TypeScript configuration

## Adding New Documentation

1. Create a new `.md` file in `website/docs/`
2. Add frontmatter with `sidebar_position` for ordering
3. Update `website/sidebars.ts` if using manual sidebar config
4. Add any images to `website/static/img/`
5. Build and verify: `cd website && npm run build`

## Key Files

- `website/docs/` — All documentation markdown files
- `website/docusaurus.config.ts` — Site configuration
- `website/sidebars.ts` — Sidebar navigation
- `website/src/pages/index.tsx` — Landing page
- `website/static/img/` — Static images and renders
- `Makefile` — `website-dev`, `website-build` targets
