pnpm run build- Build the Next.js applicationpnpm run dev- Start development server with turbopnpm run start- Start production serverpnpm run postinstall- Process MDX files with fumadocs-mdxpnpm run lint- Lint code with Biomepnpm run lint:fix- Lint and auto-fix issues with Biomepnpm run format- Check code formatting with Biomepnpm run format:fix- Format code with Biomepnpm run check- Run both linting and formatting checkspnpm run check:fix- Run both linting and formatting with auto-fix- No test commands configured - this is a documentation site
The site uses a modular JSON navigation system instead of fumadocs meta.json files:
src/navigation/- Modular navigation configurationtypes.ts- TypeScript interfaces for navigationcontracts.json- All contract-related navigationtools.json- Tools section navigationecosystems.json- Ecosystem-specific sectionsindex.ts- Combines all sections into navigationTree
- Add new pages: Edit the relevant JSON file (contracts/tools/ecosystems)
- Reorder sections: Modify array order in respective JSON files
- Add new sections: Create new JSON file and import in
index.ts - Do NOT use meta.json files - they have been removed and are not supported
- Use TypeScript strict mode (enabled in tsconfig.json)
- Prefer named imports:
import { RootProvider } from 'fumadocs-ui/provider' - Use path aliases:
@/*for src/,@/.sourcefor .source/ - Function components with explicit return types when needed
- Use React 19+ features and patterns
- Source files in
src/directory - Documentation content in
content/with nested version folders (v2.x, v3.x, etc.) - Examples in
examples/directory organized by feature - Public assets in
public/directory - Navigation config in
src/navigation/directory
- PascalCase for React components and interfaces
- camelCase for variables and functions
- kebab-case for file names in content directories
Legacy markdown files often contain complex, unreadable link syntax that creates URL-encoded URLs like:
http://localhost:3000/api/access#has_role(role:-felt252,-account:-contractaddress)-%E2%86%92-bool-external
When cleaning up markdown files with complex link syntax, follow this systematic approach:
Look for these problematic patterns:
- Function list links:
[+function_name+](#[.contract-item-name]#function_name#(params)``-[.item-kind]#external#) - Event list links:
[+EventName+](#[.contract-item-name]#eventname#(params)``-[.item-kind]#event#) - Function headings:
####[.contract-item-name]#function_name#(params)`` [.item-kind]#external#
Replace with simple, readable format:
- Clean list links:
[function_name](#prefix-function_name) - Clean headings with anchors:
<a id="prefix-function_name"></a> #### `function_name(params) → return_type`
Use descriptive prefixes to avoid conflicts:
iaccesscontrol-for interface functions/eventscomponent-for component functions/eventsextension-for extension functions/events
- Use Task agent for systematic fixes across large files
- Fix by section - group related functions/events together
- Update both links and targets - ensure table of contents links point to correct anchors
- Verify no complex patterns remain - search for
[.contract-item-name]#and[.item-kind]#
- ✅ Clean, readable URLs
- ✅ Better SEO and user experience
- ✅ Easier maintenance and debugging
- ✅ Consistent markdown formatting
Before (Complex):
* [`+has_role(role, account)+`](#`[.contract-item-name]#`has_role`#`(role:-felt252,-account:-contractaddress)-→-bool``-[.item-kind]#external#)
#### `[.contract-item-name]#`has_role`#`(role: felt252, account: ContractAddress) → bool`` [.item-kind]#external#After (Clean):
* [`has_role(role, account)`](#iaccesscontrol-has_role)
<a id="iaccesscontrol-has_role"></a>
#### `has_role(role: felt252, account: ContractAddress) → bool`- DO NOT use
{#anchor}syntax - breaks the framework parser - USE HTML anchor tags -
<a id="anchor-name"></a>format is safe - Test locally to ensure links work properly after changes