How clidey/dory works
Project Type and Purpose
• Type: An open-source, full-frontend/static-site generator tool.
• Purpose: Ingest .mdx content + a single dory.json config → render static HTML/CSS/JS using Preact + Vite → serve via dev server or output to dist for deployment (Docker/Nginx/any static host).
File Structure
• Top-Level Directories
• src/ – Core application code: Preact components, MDX plugins, UI layout, utilities, theme.
• docs/ – Documentation source (.mdx pages, OpenAPI spec, features, introduction).
• assets/ – Logo and static assets.
• k8s/ – Dockerfiles + Nginx config for containerized deployment.
• Config & Scripts
• package.json & pnpm-lock.yaml – dependency management & scripts (dev, build).
• vite.config.ts – build & dev server configuration.
• tsconfig*.json – TypeScript compiler settings.
• CI/CD & Governance
• .github/workflows/claude.yml – GitHub Actions pipeline.
• .github/ISSUE_TEMPLATE – issue templates.
• CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md – project governance.
README for Additional Insights
• Features: Hot reload, static build, MDX support, built-in UI components, OpenAPI inference.
• Deployment targets: Netlify/Vercel/S3/GitHub Pages or Docker+Nginx in K8s.
Main Components & Their Interactions
a. Content Layer
• .mdx files in docs/ + openapi.json + dory.json config
→ fed into
b. Processing Layer
• MDX Parser & Plugins (src/plugins/*, src/mdx/*)
• Component Library (src/components/*, src/ui/*)
• Build Orchestrator (Vite – vite.config.ts)
• Hot-Reload Dev Server (pnpm run dev)
→ outputs
c. Output Layer
• Static assets (dist/): HTML, CSS (Tailwind), JS (Preact bundles), images
→ served by
d. Delivery Layer
• Local Dev Server (Vite)
• Production Host (Nginx in Docker – k8s/Dockerfile, k8s/dev.Dockerfile, k8s/config/nginx-default.conf)
e. CI/CD & Governance
• GitHub Actions (build/test)
• Dependabot for dependency updates
Architectural Patterns & Design Principles
• Plugin Architecture: MDX support, sanitizer, API playground injection.
• Component-Driven: Reusable Preact components for layout/navigation/UX.
• Config-First: Single dory.json to drive site structure.
• Static Site Generation: No SSR, pure client build + static export.
• Theming: Tailwind + SCSS overrides.
• Container boundaries for each layer.
• Component names exactly as they appear in the repo (e.g., src/mdx, src/components).
• External actors: Developer, CI system, End-User.