This guide will help you quickly set up and start developing DomaScore using the provided templates and Doma Protocol integration.
- Node.js 18+ and npm/yarn
- PostgreSQL or MongoDB for data storage
- Redis for caching (optional but recommended)
- Doma API key (get from https://api-testnet.doma.xyz)
# Clone the repository
git clone <your-repo>
cd doma-score
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies (if separate)
cd ../backend
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration# PostgreSQL setup
createdb domascope
npm run db:migrate
# Or MongoDB setup
# Ensure MongoDB is running
npm run db:seed # Optional: seed with sample dataTerminal 1 - Data Pipeline Developer
# Start with Phase 1.1 from TASKS.md
# Use DEVELOPMENT_PROMPTS.md Prompt 1.1
# Focus on GraphQL client and data fetching
npm run dev:data-pipelineTerminal 2 - ML Engineer
# Start with Phase 1.3 from TASKS.md
# Use DEVELOPMENT_PROMPTS.md Prompt 1.3
# Build ML models using fetched data
npm run dev:mlTerminal 3 - Frontend Developer
# Start with Phase 2.2 from TASKS.md
# Use DEVELOPMENT_PROMPTS.md Prompt 2.2
# Build dashboard using frontend template
cd frontend && npm run dev- Data First: Complete Phase 1.1-1.2 to get data flowing
- ML Models: Build basic prediction model (Phase 1.3)
- Frontend: Create simple valuation UI (Phase 2.2)
- Iterate: Add features incrementally
- Open
DEVELOPMENT_PROMPTS.md - Copy the relevant prompt for your current task
- Paste it into Claude/ChatGPT/Cursor
- Provide any additional context about your setup
- Implement the generated code
Example:
"Using the frontend template in the frontend/ directory,
[paste Prompt 2.2 here]"
- Open
TASKS.md - Find your current phase
- Check off tasks as you complete them
- Refer to the Doma docs for API details
// Quick test to verify connection
const SUBGRAPH_URL = 'https://api-testnet.doma.xyz/graphql';
async function testConnection() {
const query = `{
names(take: 1) {
items {
name
}
}
}`;
const response = await fetch(SUBGRAPH_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query })
});
console.log(await response.json());
}// Quick test for real-time events
const POLL_API = 'https://api-testnet.doma.xyz/v1/poll';
async function testPollAPI() {
const response = await fetch(POLL_API, {
headers: { 'Api-Key': process.env.DOMA_API_KEY }
});
console.log(await response.json());
}-
Minimum Viable Product (MVP)
- GraphQL client for historical data
- Basic ML model (even simple linear regression)
- Single domain valuation endpoint
- Simple web interface
-
Enhanced Features
- Real-time updates via Poll API
- Advanced ML models
- Trend detection
- API for developers
-
Polish
- Performance optimization
- Comprehensive tests
- Documentation
- Demo preparation
# Development
npm run dev # Start all services
npm run dev:frontend # Frontend only
npm run dev:api # API only
npm run dev:worker # Background jobs
# Testing
npm test # Run all tests
npm run test:unit # Unit tests only
npm run test:e2e # End-to-end tests
# ML Operations
npm run ml:train # Train models
npm run ml:evaluate # Evaluate model performance
npm run ml:export # Export model for production
# Data Operations
npm run data:fetch # Fetch latest data
npm run data:process # Process and feature extraction
npm run data:export # Export for analysis- Check API key is correct
- Verify endpoint URL (testnet vs mainnet)
- Use GraphQL playground for testing queries
- Start with simple features (length, TLD)
- Ensure enough training data (>1000 samples)
- Check for data preprocessing bugs
- Verify wallet connection setup
- Check WebSocket connection for real-time updates
- Use React Developer Tools
Before your demo, ensure:
- Sample domains load instantly
- Valuations show confidence intervals
- Real-time updates work smoothly
- API documentation is accessible
- Portfolio analysis handles 50+ domains
- Mobile responsive design works
- Doma Docs:
/doma-docs/in this repo - Tasks:
TASKS.mdfor complete task list - Prompts:
DEVELOPMENT_PROMPTS.mdfor AI assistance - Frontend Components:
/frontend/components/for reusable UI - Contract Templates:
/contracts/for any on-chain needs
- Check the relevant
.mdfile in/doma-docs/ - Look for similar patterns in the template code
- Use the prompts with AI assistants
- Focus on MVP first, enhance later
For a fast demo:
- Hardcode some ML predictions to show the UI
- Use cached Subgraph data to avoid rate limits
- Focus on 1-2 impressive features rather than completeness
- Prepare a script with interesting domains to demo
Good luck with your DomaScore development! 🚀