DappScore Deployment Guide

Complete deployment guide for the DappScore platform, covering smart contracts, subgraph, backend services, and client applications.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                         DappScore Platform                       │
├─────────────────────────────────────────────────────────────────┤
│  Frontend (Next.js)  │  Telegram Bot  │  Browser Extension       │
├─────────────────────────────────────────────────────────────────┤
│                    Backend API (Express.js)                      │
├─────────────────────────────────────────────────────────────────┤
│        The Graph (Subgraph)        │    External Services        │
├─────────────────────────────────────────────────────────────────┤
│                    Smart Contracts (Base)                        │
└─────────────────────────────────────────────────────────────────┘

Prerequisites

  • Node.js v18+

  • pnpm (recommended) or npm

  • Foundry (for smart contracts)

  • Docker (for local Graph node)

  • Git

1. Smart Contract Deployment

Setup

Configure .env

Deploy to Testnet

Deploy to Mainnet

Update Frontend Config

After deployment, copy the contract addresses to:

  • dappscore/src/config/wagmi.ts - Update CONTRACT_ADDRESSES

Deployed Contracts

Contract
Description

ScoreToken

ERC20 governance token (500M supply)

ProjectRegistry

Project listing and management

VotingEngine

Voting, staking, and rewards

TokenSale

Token distribution and sale

PremiumListings

Premium listing payments

CuratorNFT

Curator badge NFTs

ReputationSystem

User reputation tracking

PredictionMarket

Scam prediction markets

BountySystem

Investigation bounties

InsurancePool

Scam insurance coverage

Watchlist

On-chain watchlists

AffiliateProgram

Referral rewards

2. Subgraph Deployment

Local Development

Deploy to The Graph Hosted Service

Deploy to Subgraph Studio

Update Subgraph Config

Edit subgraph.yaml with your deployed contract addresses:

3. Backend API Deployment

Setup

Configure .env

Build and Run

Docker Deployment

API Endpoints

Endpoint
Description

GET /health

Health check

GET /api/projects

Search/list projects

GET /api/users/:address

User profile and stats

GET /api/stats

Platform statistics

POST /api/scam-detection/analyze

Analyze contract

GET /api/whales/:token

Whale wallets for token

GET /api/share/image/:projectId

Generate share card

4. Telegram Bot Deployment

Setup

Configure .env

Get Bot Token

  1. Message @BotFather on Telegram

  2. Send /newbot

  3. Follow prompts to create bot

  4. Copy the bot token

Run

Bot Commands

Command
Description

/start

Welcome message

/check

Check project by name

/address <0x...>

Lookup by contract

/top

Top trusted projects

/scams

Recently flagged scams

/stats

Platform statistics

/markets

Active prediction markets

5. Browser Extension

Build

Load in Chrome (Development)

  1. Go to chrome://extensions

  2. Enable "Developer mode"

  3. Click "Load unpacked"

  4. Select the browser-extension folder

Load in Firefox (Development)

  1. Go to about:debugging#/runtime/this-firefox

  2. Click "Load Temporary Add-on"

  3. Select manifest.json

Publish to Chrome Web Store

  1. Create ZIP of extension folder

  2. Go to Chrome Developer Dashboard

  3. Pay one-time $5 fee

  4. Upload ZIP and fill in listing details

  5. Submit for review

6. Frontend Deployment

Setup

Configure .env.local

Build and Deploy

Deploy to Vercel

Deploy to Other Platforms

Netlify:

Docker:

7. Infrastructure Recommendations

Production Setup

  1. Load Balancer: Use Cloudflare or AWS ALB

  2. Database: PostgreSQL for backend persistence

  3. Cache: Redis for caching and rate limiting

  4. Monitoring: Datadog, New Relic, or Grafana

  5. Logging: ELK stack or Datadog logs

Security Checklist

Cost Estimates

Service
Monthly Cost

Base RPC (Alchemy/Infura)

$50-200

The Graph Hosted

Free (with limits)

Backend Server (2 vCPU)

$20-50

Vercel (Frontend)

Free-$20

Domain

~$15/year

Total

~$100-300/month

8. Monitoring & Maintenance

Health Checks

Logs

Updates

  1. Contracts: Deploy new version, migrate if needed

  2. Subgraph: Re-deploy with new schema/mappings

  3. Backend: Build and restart with PM2

  4. Frontend: Deploy to Vercel/hosting

Support

  • GitHub Issues: https://github.com/dappscore/platform/issues

  • Discord: https://discord.gg/dappscore

  • Telegram: @DappScoreBot

Last updated