Transform your X profile into an AI-aware .contx.eth identity in 30 seconds.
contx.eth creates AI-enhanced ENS profiles by analyzing your X (Twitter) account and storing rich context in .contx.eth domains. This enables personalized AI interactions across any platform that supports ENS lookups.
- 30-second setup: From X profile to AI-enhanced ENS
- Universal compatibility: Works with Claude, ChatGPT, and future AI agents
- Self-sovereign: You own your AI context on-chain
- Base mainnet optimized: Low gas fees and instant transactions
- Complete resolution: Forward and reverse lookup with custom registry
- Node.js 18+
- Privy App ID
- OpenAI Api Key
- Twitter Api Key
- Base mainnet RPC URL
- Base mainnet ETH
# Clone the repository
git clone https://github.com/aaronjmars/contxdoteth
cd contxdoteth
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your values
# Required
NEXT_PUBLIC_PRIVY_APP_ID=your_privy_app_id
NEXT_PUBLIC_BASE_RPC_URL=https://mainnet.base.org
# Contract Addresses
NEXT_PUBLIC_BASE_REGISTRY_ADDRESS=0xa2bbe9b6a4ca01806b1cfac4174e4976ce2b0d70
NEXT_PUBLIC_ETH_RESOLVER_ADDRESS=0x20cb27a5f5c77968650aaaa66e11ba9334689068
# Required for AI context generation
TWITTER_API_KEY=your_twitterapi_io_key_here
OPENAI_API_KEY=your_openai_api_key_here
# Optional
NEXT_PUBLIC_ETHEREUM_RPC_URL=https://eth.llamarpc.com
NEXT_PUBLIC_BASESCAN_URL=https://basescan.org
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Lint code
npm run lint
Open http://localhost:3000 to see the app.
- Secure OAuth via Privy
- Extracts profile data and recent tweets
- Analyzes communication style and interests
- GPT-4o powered analysis of 50-100 recent tweets
- Extracts personality traits, communication style, and expertise areas
- Creates rich, personalized context optimized for AI interactions
- Real AI analysis (not template-based) for authentic profiles
- Registers .contx.eth domain via ContxRegistry contract
- Atomic transaction: Registration + AI context storage + forward resolution
- Stores comprehensive AI context in contract text records during registration
- Instant registration with complete functionality and AI-enhanced profile
- Any AI agent can read your ENS profile
- Personalized responses based on your stored context
- Universal compatibility across platforms
The app stores structured AI-generated data in ENS text records:
{
"name": "aaronjmars",
"bio": "Architect of onchain realities and venture explorer, Aaron navigates Web3 with wit and insight. A critic of industry absurdities and advocate for innovative context engineering.",
"lore": "From early fascination with systems architecture to becoming a key voice in onchain innovation, sparked by desire to redefine digital interaction parameters.",
"messageExamples": ["Hey! What's your take on this?", "That's a fascinating perspective", "Let me know if you want to dive deeper"],
"postExamples": ["Just shipped something interesting π", "The intersection of AI and Web3 is wild", "Context engineering is the future"],
"adjectives": ["analytical", "witty", "insightful", "innovative", "technical"],
"topics": ["web3", "onchain architecture", "AI", "venture capital", "context engineering"],
"style": {
"tone": "casually insightful with irreverence",
"humor": "dry and sarcastic",
"technicality": "balances depth with accessibility",
"engagement": "provocative and norm-questioning"
},
"knowledge": ["onchain architecture", "venture capital", "AI context engineering", "crypto markets"],
"avatar": "https://pbs.twimg.com/profile_images/...",
"description": "Turning architecture into onchain adventures with a wink and a nudge"
}
All fields are dynamically generated by GPT-4o analysis of actual Twitter content.
- Frontend: Next.js 15, TypeScript, Tailwind CSS 4
- Authentication: Privy (Web3 + Social)
- Blockchain: Base mainnet, viem, wagmi
- Design: Apple-inspired minimal aesthetic
- AI: GPT-4o via OpenAI API for rich context analysis
- Data: TwitterAPI.io for real tweet fetching and analysis
src/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ ai/ # GPT-4o AI context generation
β β βββ ccip-read/ # CCIP-Read ENS resolution
β β βββ x-data/ # Registration data processing
β βββ dashboard/ # User dashboard
β βββ page.tsx # Landing page
βββ components/ # React components
β βββ Hero.tsx # Landing page hero
β βββ LandingPage.tsx # Main landing page
β βββ TwitterConnectionScreen.tsx # Twitter auth flow
β βββ ui/ # Reusable components
βββ lib/ # Utilities
β βββ ens.ts # ENS contracts & helpers
β βββ hooks/
β βββ useENS.ts # Main ENS integration hook
β βββ useTwitterConnection.ts # Twitter auth handling
βββ providers/ # Context providers
βββ PrivyProvider.tsx # Web3 auth wrapper
Custom Implementation:
- ContxRegistry: Custom ENS subdomain registry with key-value profile storage
- ContxResolver: CCIP-Read resolver for ENS compatibility
Key Implementation Features:
- β
Custom registry:
.contx.eth
domains with ContxRegistry contract - β AI context storage: All AI data stored as text records during registration
- β
Forward resolution:
name.contx.eth
β address - β Text records: Complete AI context automatically stored on-chain
- β Real-time verification: Instant status checking post-registration
- β Profile management: View and update ENS records through dashboard
Apple-inspired minimal aesthetic:
- Colors: Primary (#0071e3), Success (#34c759), Warning (#ff9500)
- Typography: SF Pro Display/Text system fonts
- Components: Rounded corners, subtle shadows, smooth transitions
- Responsive: Mobile-first design with seamless desktop experience
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Use TypeScript for all new code
- Follow existing component patterns
- Maintain Apple-style design consistency
- Test manually through dashboard interface
This project is licensed under the MIT License - see the LICENSE file for details.