This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the documentation website for Super Protocol - a confidential cloud and marketplace for Web3 and AI. The site is built using Docusaurus 2 and contains comprehensive documentation across multiple sections: Marketplace, Fundamentals, CLI, Developers, Whitepaper, and Data-for-AI.
npm install- Install dependenciesnpm run start- Start local development server with live reloadnpm run build- Build static site for productionnpm run serve- Serve the built site locallynpm run clear- Clear Docusaurus cache
npm run write-translations- Generate translation filesnpm run write-heading-ids- Generate heading IDs for documentation
npm run docusaurus <command>- Direct access to Docusaurus CLInpm run deploy- Deploy to hosting servicenpm run swizzle- Customize Docusaurus components
The site uses Docusaurus plugins to create separate documentation instances:
- Marketplace (
/marketplace) - End-user marketplace documentation - Fundamentals (
/fundamentals) - Core concepts and architecture - CLI (
/cli) - Command-line interface documentation - Developers (
/developers) - Developer guides and tutorials (main docs preset) - Whitepaper (
/whitepaper) - Technical whitepaper and architecture - Data-for-AI (
/data-for-ai) - AI-specific documentation with custom sidebar
docs/- Contains all documentation markdown files organized by sectionsrc/- Custom React components and stylingsrc/theme/- Swizzled Docusaurus components for customizationsrc/css/custom.css- Global styles
static/- Static assets (images, fonts, etc.)sources/contracts/- Contract documentation generation tools
Each documentation section follows a structured approach:
- Index pages provide section overviews and navigation
- Content is organized hierarchically with clear cross-references
- Images are stored in section-specific
images/folders - Mathematical formulas use KaTeX rendering
- Highlight - Custom highlighting component
- Imager - Custom image handling component
- Admonition - Custom alert/warning boxes
- Various swizzled components for styling consistency
- Search - Local search using
@easyops-cn/docusaurus-search-local - Math Support - KaTeX for mathematical formulas
- Client Redirects - Automatic URL redirections
- Dark/Light Theme - Custom theme switching
- Responsive Design - Mobile-friendly layouts
When working with documentation:
- Use the existing markdown structure and frontmatter format
- Follow the established cross-referencing pattern with custom anchor tags
- Place images in appropriate
images/subdirectories - Maintain consistency with existing terminology (offers, orders, providers, TEE, etc.)
- Use KaTeX syntax for mathematical formulas where needed
- Respect the hierarchical organization of content within each section
The CI/CD pipeline runs npm run build on pull requests to verify the site builds successfully. The build process includes:
- Static site generation from markdown files
- Processing of mathematical formulas with KaTeX
- Search index generation
- Asset optimization and bundling