MCPcopy Index your code
hub / github.com/defi-wonderland/handbook

github.com/defi-wonderland/handbook @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
80 symbols 222 edges 84 files 1 documented · 1% updated 3d ago★ 742 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Wonderland Handbook

This repository is a monorepo containing multiple Docusaurus-based handbooks for Wonderland. Each handbook serves as a central knowledge base for specific processes, guidelines, and best practices. The monorepo structure allows for shared configuration, assets, and tooling across all handbook sites.

🧪 Getting Started

Node.js Version Management

This monorepo enforces Node.js 22.19.0 and pnpm 10.11.0. Use .nvmrc for version management:

nvm use

The monorepo uses a shared configuration system where common assets (fonts, styles, images) and configurations are centralized in the packages/common-config package. After installation, you'll need to build these common files and copy them to your specific handbook site.

The build process works as follows:

  1. Install dependencies across all packages and sites
  2. Build common files from the shared configuration package
  3. Copy shared assets to the target site's static/common/ directory (this directory is gitignored)
  4. Start the development server for your handbook

Note: Each site can have its own static assets (like site-specific images or documents) placed directly in the static/ directory, outside of the common/ folder.

From the root of the monorepo:

pnpm install                                   # Install all dependencies across packages/sites
pnpm --filter [name]-handbook build:assets     # Build common files, and copy them into the specific site
pnpm --filter [name]-handbook start            # Start the site locally

Example with the Wonderland handbook:

pnpm install
pnpm --filter wonderland-handbook build:assets
pnpm --filter wonderland-handbook start

Prerequisites

  • Node.js (v22.19.0) - Use .nvmrc for version management
  • pnpm package manager (v10.11.0)

Building for Production

To create a production build:

pnpm --filter [name]-handbook build

The static site will be generated in the sites/[name]/build directory.


🛠️ Creating a New Site

To create a new handbook site from the template:

pnpm create-handbook <site-name>

This will:

  1. Create a new site in sites/<site-name> based on the template
  2. Update the package.json with the correct site name
  3. Set up all necessary configurations

Example:

pnpm create-handbook my-new-handbook

After creation, you can build and start the new site:

cd sites/my-new-handbook
pnpm build:assets
pnpm start

Note: Site names can only contain letters, numbers, hyphens, and underscores.

Contributing

  1. Create a new branch for your changes
  2. Make your changes in the handbook/docs directory
  3. If you add new folders or files, you must also update sidebars.ts:

  4. This file defines the sidebar navigation using Docusaurus sidebar configuration.

  5. Add your new documents to the appropriate category, or create a new one as needed.

  6. Test locally using pnpm run start

  7. Submit a pull request

If you have any ideas for improving the handbook, feel free to open an issue (check the templates!) to start a discussion!

Extension points exported contracts — how you extend this code

LinkProps (Interface)
(no doc)
packages/common-config/src/types/docusaurus__link.d.ts
BackgroundProps (Interface)
(no doc)
packages/common-config/src/components/StarsBackground/index.tsx
HeroSectionProps (Interface)
(no doc)
packages/common-config/src/components/HeroSection/index.tsx
SimpleModalProps (Interface)
(no doc)
packages/common-config/src/components/theme/Root/index.tsx
RootProps (Interface)
(no doc)
packages/common-config/src/components/theme/Root/index.tsx

Core symbols most depended-on inside this repo

getRandomInt
called by 9
packages/common-config/src/components/StarsBackground/index.tsx
generateStars
called by 7
packages/common-config/src/components/StarsBackground/index.tsx
pick
called by 6
sites/wonderland/scripts/generate-authors.ts
useScrollReset
called by 2
sites/wonderland/src/hooks/useScrollReset.ts
generateAuthors
called by 2
sites/wonderland/scripts/generate-authors.ts
attachListener
called by 2
packages/common-config/src/components/theme/Root/index.tsx
resetAndReattach
called by 2
packages/common-config/src/components/theme/Root/index.tsx
handleDocusaurusRouteChange
called by 2
packages/common-config/src/components/theme/Root/index.tsx

Shape

Function 67
Interface 13

Languages

TypeScript100%

Modules by API surface

packages/common-config/src/components/theme/Root/index.tsx9 symbols
sites/wonderland/scripts/generate-authors.ts6 symbols
packages/common-config/src/components/HandbookSection/index.tsx5 symbols
packages/common-config/src/components/CategoryCards/index.tsx5 symbols
packages/common-config/src/components/StarsBackground/index.tsx4 symbols
sites/wonderland/src/theme/BlogListPage/index.tsx3 symbols
scripts/__tests__/setupTestUtils.ts3 symbols
packages/common-config/src/components/theme/DocRoot/Layout/Sidebar/ExpandButton/index.tsx3 symbols
sites/wonderland/src/utils/scrollReset.ts2 symbols
sites/wonderland/src/theme/BlogPostItem/Header/Authors/index.tsx2 symbols
sites/wonderland/src/theme/BlogAuthorsPostsPage/index.tsx2 symbols
sites/wonderland/src/components/BlogCard.tsx2 symbols

For agents

$ claude mcp add handbook \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page