|
| 1 | +# CLAUDE.md - Ethereum Follow Protocol Documentation |
| 2 | + |
| 3 | +## Overview |
| 4 | +This is the documentation repository for the Ethereum Follow Protocol (EFP), an onchain social graph protocol for Ethereum accounts. The repository contains comprehensive technical documentation built with Astro and Starlight. |
| 5 | + |
| 6 | +## Tech Stack |
| 7 | +- **Framework**: Astro (v4.2.4) with Starlight documentation theme |
| 8 | +- **Language**: TypeScript |
| 9 | +- **Styling**: Tailwind CSS with custom styles |
| 10 | +- **Package Manager**: Bun (v1.0.25) |
| 11 | +- **Build Tool**: Astro build system |
| 12 | +- **Deployment**: Static site generation |
| 13 | + |
| 14 | +## Key Scripts |
| 15 | +- `bun run dev` - Start development server |
| 16 | +- `bun run build` - Build production site |
| 17 | +- `bun run preview` - Preview built site |
| 18 | +- `bun run lint` - Run ESLint with auto-fix |
| 19 | +- `bun run format` - Format code with Prettier |
| 20 | +- `bun run typecheck` - Run TypeScript type checking |
| 21 | +- `bun run clean` - Clean build artifacts and dependencies |
| 22 | + |
| 23 | +## Repository Structure |
| 24 | + |
| 25 | +### Core Configuration |
| 26 | +- `astro.config.ts` - Main Astro configuration with Starlight setup |
| 27 | +- `package.json` - Dependencies and scripts |
| 28 | +- `tsconfig.json` - TypeScript configuration |
| 29 | +- `tailwind.config.ts` - Tailwind CSS configuration |
| 30 | + |
| 31 | +### Content Structure |
| 32 | +- `src/content/docs/` - All documentation MDX files |
| 33 | +- `src/content/config.ts` - Content collection configuration |
| 34 | +- `public/` - Static assets (images, logos, etc.) |
| 35 | + |
| 36 | +### Documentation Sections |
| 37 | + |
| 38 | +#### Introduction (`src/content/docs/intro/`) |
| 39 | +- Core protocol concepts |
| 40 | +- EFP List NFT system |
| 41 | +- Roles (Owner, Manager, User) |
| 42 | +- Tags and social graph mechanics |
| 43 | + |
| 44 | +#### Specification (`src/content/docs/design/`) |
| 45 | +- `list-registry.mdx` - ERC-721 List Registry contract |
| 46 | +- `roles.mdx` - Role definitions and permissions |
| 47 | +- `account-metadata.mdx` - Account metadata system |
| 48 | +- `list-metadata.mdx` - List metadata structure |
| 49 | +- `list-storage-location.mdx` - Storage location specifications |
| 50 | +- `list-records.mdx` - List record structure |
| 51 | +- `tags.mdx` - Tagging system (block, mute, top8, custom) |
| 52 | +- `list-ops.mdx` - List operations structure |
| 53 | +- `glossary.mdx` - Protocol terminology |
| 54 | + |
| 55 | +#### Production (`src/content/docs/production/`) |
| 56 | +- `deployments.mdx` - Smart contract addresses (Base, OP Mainnet, Ethereum) |
| 57 | +- `interpreting-state.mdx` - Data interpretation guide |
| 58 | +- `multisig.mdx` - Multisig wallet information |
| 59 | +- `infra.mdx` - Infrastructure overview |
| 60 | +- `silo.mdx` - Railway deployment template |
| 61 | +- `follow-bot.mdx` - Telegram bot functionality |
| 62 | +- `emergency-response.mdx` - Emergency procedures |
| 63 | + |
| 64 | +#### Additional Content |
| 65 | +- `faq.mdx` - Frequently asked questions |
| 66 | +- `bugbounty.mdx` - Bug bounty program |
| 67 | +- `translationbounty.mdx` - Translation bounty program |
| 68 | +- `llmstxt.mdx` - LLM-friendly protocol documentation |
| 69 | +- `playground/` - Interactive examples |
| 70 | + |
| 71 | +### Design Components |
| 72 | +- `design-components/colors.mdx` - Color specifications |
| 73 | +- `design-components/logos.mdx` - Logo assets and usage |
| 74 | + |
| 75 | +## Key Features |
| 76 | + |
| 77 | +### Protocol Concepts |
| 78 | +- **EFP List NFT**: Free-to-mint NFTs representing social lists |
| 79 | +- **Three-Role System**: Owner, Manager, User with distinct permissions |
| 80 | +- **Multi-Chain Support**: Base, OP Mainnet, Ethereum deployments |
| 81 | +- **Tag System**: Standard tags (block, mute, top8) + custom tags |
| 82 | +- **Primary List**: Account's designated main social graph |
| 83 | + |
| 84 | +### Technical Infrastructure |
| 85 | +- **Smart Contracts**: ERC-721 registry, list records, account metadata |
| 86 | +- **API**: Comprehensive REST API via ethidentitykit.com |
| 87 | +- **Indexer**: Open-source indexing system |
| 88 | +- **Multi-Chain**: L1 and L2 deployments |
| 89 | + |
| 90 | +### Content Management |
| 91 | +- **MDX Support**: Rich documentation with embedded components |
| 92 | +- **Version Control**: Git-based documentation workflow |
| 93 | +- **Starlight**: Advanced documentation features (search, navigation, theming) |
| 94 | + |
| 95 | +## Development Workflow |
| 96 | + |
| 97 | +### Adding Documentation |
| 98 | +1. Create MDX files in appropriate `src/content/docs/` subdirectory |
| 99 | +2. Update `astro.config.ts` sidebar configuration if needed |
| 100 | +3. Use frontmatter for page metadata |
| 101 | +4. Test locally with `bun run dev` |
| 102 | + |
| 103 | +### Code Quality |
| 104 | +- **ESLint**: Configured with TypeScript, Astro, and MDX support |
| 105 | +- **Prettier**: Code formatting with Tailwind plugin |
| 106 | +- **TypeScript**: Strict type checking |
| 107 | +- **Link Validation**: Automated internal link checking |
| 108 | + |
| 109 | +### Assets |
| 110 | +- **Public Directory**: Static assets accessible at root |
| 111 | +- **Logo Assets**: Multiple formats (PNG, SVG) for different use cases |
| 112 | +- **Images**: Protocol diagrams, screenshots, QR codes |
| 113 | + |
| 114 | +## External Resources |
| 115 | + |
| 116 | +### API Documentation |
| 117 | +- Comprehensive API docs at ethidentitykit.com |
| 118 | +- Endpoints for users, lists, stats, leaderboards |
| 119 | +- Real-time data via indexer |
| 120 | + |
| 121 | +### Related Repositories |
| 122 | +- `app` - Main EFP web application |
| 123 | +- `api` - Public API service |
| 124 | +- `contracts` - Smart contract implementations |
| 125 | +- `indexer` - Data indexing service |
| 126 | +- `services` - Backend services |
| 127 | +- `follow-bot` - Telegram bot |
| 128 | + |
| 129 | +### Community |
| 130 | +- **Discord**: https://discord.efp.app |
| 131 | +- **Twitter**: https://x.com/efp |
| 132 | +- **Forum**: https://forum.ethfollow.xyz/ |
| 133 | + |
| 134 | +## Deployment Information |
| 135 | + |
| 136 | +### Production Contracts |
| 137 | +- **Base**: Full deployment with all contracts |
| 138 | +- **OP Mainnet**: List Records only |
| 139 | +- **Ethereum**: List Records only |
| 140 | + |
| 141 | +### Development Environment |
| 142 | +- **Base Sepolia**: Full testnet deployment |
| 143 | +- **OP Sepolia**: List Records testnet |
| 144 | +- **Ethereum Sepolia**: List Records testnet |
| 145 | + |
| 146 | +## Security Considerations |
| 147 | +- Bug bounty program active |
| 148 | +- Emergency response procedures documented |
| 149 | +- Multisig wallet governance |
| 150 | +- Open-source codebase for transparency |
| 151 | + |
| 152 | +## Contributing |
| 153 | +- Simple contribution guidelines: "good vibes only" |
| 154 | +- Open to community contributions |
| 155 | +- Translation bounty program available |
| 156 | +- GitHub-based workflow with PR previews |
| 157 | + |
| 158 | +This documentation serves as the canonical technical reference for the Ethereum Follow Protocol, providing comprehensive coverage of the protocol's design, implementation, and operational aspects. |
0 commit comments