Documentation ​
The project uses VitePress for documentation. VitePress is a static site generator built on Vue and Vite, optimized for technical documentation.
Running Locally ​
Start the documentation dev server:
npm run docsThis opens a local server at http://localhost:5173 with hot module replacement.
Available Commands ​
| Command | Description |
|---|---|
npm run docs | Start dev server with hot reload |
npm run docs:build | Build static site to docs/.vitepress/dist |
npm run docs:preview | Preview the production build locally |
File Structure ​
docs/
├── .vitepress/
│ ├── config.mts # Site configuration (nav, sidebar, theme)
│ ├── theme/ # Custom theme overrides
│ │ ├── custom.css # Custom styles
│ │ ├── index.js # Theme entry point
│ │ └── Layout.vue # Custom layout component
│ └── dist/ # Build output (gitignored)
├── development/ # Development docs
│ ├── core-concepts/ # This section
│ ├── getting-started/
│ └── ...
├── guide/ # User guide docs
├── architecture/ # Architecture docs
├── claude/ # Claude AI docs
├── public/ # Static assets (images, favicons)
└── index.md # HomepageWriting Documentation ​
Creating a New Page ​
- Create a
.mdfile in the appropriate directory - Add frontmatter at the top:
---
title: Page Title
description: Brief description for SEO
outline: deep
---
# Page Title
Content goes here...- Add the page to the sidebar in
.vitepress/config.mts
Adding to the Sidebar ​
Edit docs/.vitepress/config.mts:
sidebar: {
'/development/': [
{
text: 'Core Concepts',
items: [
{text: 'Tech Stack', link: '/development/core-concepts/tech-stack'},
{text: 'New Page', link: '/development/core-concepts/new-page'}, // Add here
],
},
],
}Markdown Features ​
VitePress extends standard Markdown with additional features:
Custom Containers ​
::: info
Informational message
:::
::: tip
Helpful tip
:::
::: warning
Warning message
:::
::: danger
Critical warning
:::
::: details Click to expand
Hidden content revealed on click
:::Code Blocks ​
```typescript
const example = 'syntax highlighted';
```
```typescript{2-3}
// Line highlighting
const highlighted = true;
const alsoHighlighted = true;
const notHighlighted = false;
```
```typescript
// With line numbers
const code = 'example';
```Mermaid Diagrams ​
The site uses vitepress-plugin-mermaid for diagrams:
```mermaid
flowchart LR
A[Start] --> B{Decision}
B -->|Yes| C[Do something]
B -->|No| D[Do something else]
```Adding Images ​
- Place images in
docs/public/ - Reference with absolute paths:
Deployment ​
Documentation deploys automatically via GitHub Actions when changes are pushed to the develop branch.
How It Works ​
The workflow in .github/workflows/vitepress-deploy.yml:
- Triggers on push to
developor manual dispatch - Builds the VitePress site with
npm run docs:build - Deploys to GitHub Pages
Manual Deployment ​
To trigger a deployment manually:
- Go to Actions tab in GitHub
- Select Deploy VitePress site to Pages
- Click Run workflow
- Select the
developbranch and run
Build Output ​
The production build outputs to docs/.vitepress/dist/. This directory is:
- Uploaded as a GitHub Pages artifact
- Deployed to the GitHub Pages environment
Configuration ​
Site Config (config.mts) ​
Key configuration options:
export default defineConfig({
title: 'Engineer App', // Site title
description: 'Documentation...', // Meta description
themeConfig: {
nav: [...], // Top navigation
sidebar: {...}, // Sidebar navigation
search: {provider: 'local'}, // Built-in search
socialLinks: [...], // Header social links
},
});Theme Customization ​
Custom styles go in docs/.vitepress/theme/custom.css. The theme extends VitePress defaults via docs/.vitepress/theme/index.js.
Best Practices ​
- Keep pages focused - One topic per page, link to related pages
- Use frontmatter - Always include
titleanddescription - Add to sidebar - New pages should be discoverable via navigation
- Use containers - Highlight tips, warnings, and important info
- Include code examples - Show, don't just tell
- Preview locally - Always run
npm run docsbefore pushing - Use relative links - Link between docs pages with relative paths
- Keep images small - Optimize images before adding to
public/