This document serves as a comprehensive guide for working with the Pimlico documentation repository. It contains everything you need to know to maintain consistency and quality when adding or modifying documentation.
The Pimlico documentation is built using Vocs v1.4.x, a React-based documentation framework. The site is deployed on Vercel and uses MDX format for content, allowing React components within markdown files.
- Framework: Vocs (v1.4.x)
- Package Manager: pnpm (v9.6.0)
- Language: TypeScript/MDX
- Styling: Tailwind CSS
- Code Quality: Biome for linting
- Deployment: Vercel
- Analytics: PostHog
docs/
├── docs/
│ ├── pages/ # All documentation content
│ │ ├── guides/ # How-to guides, tutorials, conceptual docs
│ │ ├── references/ # API references for all products
│ │ └── index.mdx # Landing page
│ ├── components/ # React components used in docs
│ ├── public/ # Static assets (images, favicons, scripts)
│ └── snippets/ # Reusable code examples
├── sidebars/ # Navigation configuration
├── data/ # Markdown data files (chains, tokens)
├── patches/ # Package patches
├── utils.ts # Utility functions
├── vocs.config.tsx # Main configuration
├── package.json # Dependencies and scripts
├── vercel.json # Deployment configuration
└── biome.json # Linting rules
- Technical Level: Mid-to-high; assumes familiarity with blockchain, Ethereum, TypeScript
- Voice: Professional yet approachable; use "you" to address readers
- Style: Clear, concise, practical; focus on getting developers productive quickly
- High-level introduction
- Core products overview
- Quick start section
- Next steps with links
- Brief introduction
- Step-by-step instructions using
::::stepscomponent - Combined code example at the end
- Practical, working examples
- Brief context
- Steps using
::::stepscomponent - Additional notes or tips
- Focus on specific tasks
- Method description
- Usage example (TypeScript)
- Returns section
- Parameters table
- Related methods
- Definition of the concept
- Why it's necessary
- How it works
- Pimlico's role/implementation
::::steps
:::step[Step Title]
Step content here...
:::
:::step[Another Step]
More content...
:::
:::::::tip[Optional Title]
Helpful tip content
:::
:::info
Information content
:::
:::warning
Warning content
:::
:::note
Note content
:::```typescript
// Code here// Or include from snippets: // [!include ~/snippets/path/to/file.ts:section]
### Frontmatter Usage
Minimal frontmatter approach:
```yaml
---
title: Page Title # Optional, used for SEO and navigation
layout: landing # Only for special layouts (landing page)
---
Most pages don't use frontmatter and rely on H1 headings.
Navigation is configured in /sidebars/ with two main sections:
- Getting Started
- EIP-7702
- Tutorials
- How-to Guides (organized by feature)
- Conceptual documentation
- Platform API
- Bundler endpoints and errors
- Paymaster documentation
- FlashFund
- permissionless.js SDK (v0.1.x and v0.2.x)
Navigation is hierarchical with collapsible sections defined in TypeScript configuration files.
Reusable code examples are stored in /snippets/ and included using:
// [!include ~/snippets/path/to/file.ts:section]
Custom React components in /docs/components/ can be imported and used in MDX files.
pnpm dev # Start development server
pnpm build # Build for production
pnpm preview # Preview production build
pnpm search-index # Build search index-
Choose the right location:
/guides/for how-to content/references/for API documentation- Use existing subdirectory structure
-
Create MDX file with appropriate name (kebab-case)
-
Add to sidebar configuration in
/sidebars/guides.tsor/sidebars/references.ts -
Follow the writing style for your document type
-
Use consistent patterns:
- Code examples with TypeScript
- Include working examples from
/snippets/ - Add appropriate callouts for tips/warnings
- File Naming: Use kebab-case for all MDX files
- URLs: Will match file structure (no
.mdxextension in URLs) - Links: Use absolute paths from docs root:
/guides/conceptual/account-abstraction - Images: Store in
/docs/public/and reference with absolute paths - Code: Always specify language in code blocks
- Ethereum Addresses: Format as inline code:
0x1234...
- Internal:
[Link text](/guides/path/to/page) - External:
[Link text](https://example.com) - With arrow:
[Learn more →](/path)
- Use bullet points for features, benefits
- Avoid numbered lists except in step-by-step instructions
- Nest lists for detailed explanations
- Addresses:
0x0000000071727De22E5E9d8BAf0edAc6f37da032 - Hex values:
0x1234 - Chain names: Ethereum, Base, Polygon (capitalized)
The site is deployed automatically on Vercel:
- Production deployments on merge to
main - Preview deployments for pull requests
- Extensive redirects configured in
vercel.jsonfor backward compatibility
Before committing:
- Run
pnpm buildto ensure no build errors - Check that new pages appear in navigation
- Verify all links work correctly
- Ensure code examples are complete and functional
- Follow the established writing style
- Production Site: Deployed via Vercel
- GitHub Edit Links: Automatically generated for each page
- Analytics: PostHog tracking via
/docs/public/posthog.js
- Theme: Purple accent color (#7115AA light, #a66cc9 dark)
- Logo: Different logos for light/dark themes
- Social Links: GitHub, Telegram, X (Twitter), Warpcast
- Top Navigation: Guides, References dropdown, Dashboard link
- Edit Link Pattern: Points to GitHub repository
The project uses Biome with specific style rules enforced:
- No parameter reassignment
- Use const assertions
- Default parameters last
- Use enum initializers
- Self-closing elements
- Single var declarator
- No unused template literals
-
Page Discovery: Users find content through:
- Sidebar navigation
- Search functionality
- Direct links from other pages
- Top navigation menu
-
Information Architecture:
- Conceptual → Guides → References (learning path)
- Group related content in subdirectories
- Use clear, descriptive titles
-
Maintenance:
- Regular reviews for accuracy
- Update code examples with SDK changes
- Maintain consistency across similar pages
- Keep navigation organized and logical
- Follow markdown guide at https://vocs.dev/docs/markdown for documentation changes
This guide should help you maintain the high quality and consistency of the Pimlico documentation. When in doubt, refer to existing pages of the same type for patterns and conventions.