Scan any token. Detect risk. Track deployers. Monitor alpha.
A production-grade, Telegram-native token intelligence platform for the DecentralChain ecosystem. Instantly scan tokens, analyze risk scores, inspect deployer history, monitor whale movements, track trending assets, and surface alpha β all from inside Telegram.
Getting Started Β· Architecture Β· Features Β· Commands Β· Self-Hosting
| Feature | Description |
|---|---|
| π Instant Token Scan | Paste any asset ID or use /scan β get name, supply, price, risk score, deployer info in seconds |
| Pluggable rule-based risk evaluation (0β100) with severity factors and confidence scores | |
| ποΈ Deployer Profiling | Track deployer wallets β token count, scam history, first-seen block, labels |
| π Market Data | Real-time price, volume, liquidity, market cap, and 24h change metrics |
| π Trending Tokens | Algorithmically ranked trending assets based on on-chain activity |
| π₯ Holder Analysis | Top holder distribution with balance rankings and concentration percentages |
| π§ Pool & Liquidity | DEX pool discovery with reserve tracking and liquidity depth |
| π―οΈ OHLCV Charts | Candle aggregation service (1m β 1d) for charting via Mini App |
| π Smart Alerts | User-configurable alerts delivered directly via Telegram DM |
| π Alpha Leaderboard | Track who calls winning tokens first in group chats |
| β Watchlists | Personal token watchlists with quick-access scanning |
| π± Telegram Mini App | Rich UI with interactive charts, holder tables, and risk badges |
| π‘οΈ Admin Console | Web dashboard for managing flags, scam entities, and system health |
βββββββββββββββ βββββββββββββββ ββββββββββββββββ
β Telegram β β Telegram β β Admin β
β Bot β β Mini App β β Console β
β (Telegraf) β β (Next.js) β β (Next.js) β
ββββββββ¬ββββββββ ββββββββ¬βββββββ ββββββββ¬ββββββββ
β β β
ββββββββββββββ¬ββββββββ΄βββββββββββββββββββββ
β
βββββββββΌβββββββββ
β Scanner API β β Fastify REST + WebSocket gateway
β (Fastify) β
βββββββββ¬βββββββββ
β
ββββββββββββββΌβββββββββββββββββββββ
β β β
ββββββββΌβββ βββββββΌβββββββ ββββββββββββΌβββββββ
β Market β β Risk β β Chart β
β Data Svc β β Engine β β Service β
ββββββββ¬ββββ βββββββ¬βββββββ ββββββββββββ¬βββββββ
β β β
ββββββββββββββΌβββββββββββββββββββββ
β
βββββββββΌβββββββββ
β Chain Indexer β β Real-time block ingestion
βββββββββ¬βββββββββ
β
βββββββββΌβββββββββ
β DecentralChainβ β Mainnet node
β Node β
ββββββββββββββββββ
Cross-cutting: PostgreSQL Β· Redis Β· BullMQ
dcc-tg-meme-scanner-bot/
βββ apps/
β βββ scanner-api/ # Fastify REST/WS API gateway
β βββ telegram-bot/ # Telegraf-based Telegram bot
β βββ telegram-miniapp/ # Next.js Telegram Mini App (TWA)
β βββ chain-indexer/ # Real-time block & transaction ingestion
β βββ market-data-service/ # Price, volume, trending computation
β βββ risk-engine/ # Token risk scoring pipeline
β βββ alerts-engine/ # Alert evaluation & Telegram delivery
β βββ chart-service/ # OHLCV candle aggregation
β βββ admin-console/ # Next.js admin dashboard
β
βββ packages/
β βββ blockchain-client/ # DecentralChain node adapter layer
β βββ shared-sdk/ # Types, DTOs, constants, event defs
β βββ db/ # Prisma schema (25 tables), migrations
β βββ config/ # Zod-validated env loading
β βββ logger/ # Pino structured logging
β βββ telegram-ui/ # Message formatters & keyboard builders
β βββ risk-rules/ # Pluggable risk rule modules
β
βββ docker/ # Per-service Dockerfiles
βββ docker-compose.yml # Full-stack local dev environment
βββ architecture.md # Detailed architecture document
- Chain Indexer polls DecentralChain nodes for new blocks in real-time
- Transactions are parsed into normalized events (
TOKEN_CREATED,SWAP_EXECUTED,TRANSFER, etc.) - Events persist to PostgreSQL and publish to Redis/BullMQ job queues
- Market Data Service computes rolling metrics (price, volume, trending scores)
- Risk Engine evaluates tokens against pluggable rule modules, producing 0β100 risk scores
- Chart Service aggregates swap events into multi-timeframe OHLCV candles
- Alerts Engine evaluates user-defined rules and delivers notifications via Telegram
- Scanner API serves unified REST + WebSocket access to all data
- Telegram Bot handles commands, auto-detects pasted asset IDs, and renders rich scan cards
- Mini App provides interactive charts, holder tables, and detailed token views
| Command | Description |
|---|---|
/scan <assetId> |
Full token scan with risk analysis |
/trending |
View top trending tokens by on-chain activity |
/deployer <address> |
Inspect deployer wallet history |
/wallet <address> |
View wallet profile and activity |
/alpha |
Group alpha caller leaderboard |
/watchlist |
Manage your personal token watchlist |
/help |
Show all available commands |
Tip: You can also paste any DCC asset ID directly β the bot auto-detects and scans it.
| Dependency | Version | Purpose |
|---|---|---|
| Node.js | β₯ 20.0 | Runtime |
| pnpm | β₯ 9.0 | Package manager |
| PostgreSQL | β₯ 15 | Primary database |
| Redis | β₯ 7.0 | Caching & job queues |
# Clone the repository
git clone https://github.com/dylanpersonguy/DCC-TG-Meme-Scanner-Bot.git
cd DCC-TG-Meme-Scanner-Bot
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration (see Environment Variables below)
# Set up database
pnpm db:generate
pnpm db:migrate
pnpm db:seed
# Build all packages
pnpm build
# Start all services in development mode
pnpm dev# Start full stack with Docker Compose
docker compose up -d
# View logs
docker compose logs -fCreate a .env file in the project root:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/dcc_scanner
# Redis
REDIS_URL=redis://localhost:6379
# DecentralChain Node
DCC_NODE_URL=https://mainnet-node.decentralchain.io
DCC_DATA_SERVICE_URL=https://mainnet-node.decentralchain.io
DCC_CHAIN_ID=D
# Telegram
TELEGRAM_BOT_TOKEN=your_bot_token_here
# API
API_PORT=3200
# Indexer
INDEXER_START_HEIGHT=0
INDEXER_BATCH_SIZE=10
INDEXER_POLL_INTERVAL_MS=2000- Message @BotFather on Telegram
- Send
/newbotand follow the prompts - Copy the bot token to your
.envfile
createdb dcc_scanner
pnpm db:migrate
pnpm db:seedYou can start services individually or all at once:
# All services (development)
pnpm dev
# Individual services
pnpm --filter @dcc-scanner/chain-indexer run dev
pnpm --filter @dcc-scanner/scanner-api run dev
pnpm --filter @dcc-scanner/telegram-bot run dev
pnpm --filter @dcc-scanner/market-data-service run dev
pnpm --filter @dcc-scanner/risk-engine run dev
pnpm --filter @dcc-scanner/alerts-engine run dev
pnpm --filter @dcc-scanner/chart-service run dev# Build all services
pnpm build
# Start in production
NODE_ENV=production pnpm --filter @dcc-scanner/scanner-api run start
NODE_ENV=production pnpm --filter @dcc-scanner/telegram-bot run start
# ... repeat for each service| Layer | Technology |
|---|---|
| Language | TypeScript 5.7 (strict mode) |
| Runtime | Node.js 20+ (ES2022 target) |
| Monorepo | pnpm workspaces |
| Bot Framework | Telegraf 4 |
| API Framework | Fastify 5 (REST + WebSocket) |
| Frontend | Next.js 15 + React 19 + Tailwind CSS 4 |
| Database | PostgreSQL 16 + Prisma ORM |
| Cache & Queues | Redis 7 + BullMQ 5 |
| Charts | Lightweight Charts (TradingView) |
| Logging | Pino (structured, JSON) |
| Validation | Zod schemas at all boundaries |
| Testing | Vitest |
25 tables covering the full token intelligence domain:
- Users & Telegram β
telegram_users,telegram_groups - Tokens & Metadata β
tokens,deployers,pools - Market Data β
token_price_snapshots,candles - Risk Scoring β
risk_scores,risk_score_factors - Holder Analytics β
holder_snapshots - Trading Activity β
swaps,transfers - Alerts & Watchlists β
alerts,alert_notifications,watchlists,watchlist_items - Alpha Tracking β
group_alpha_calls,group_alpha_performance - System β
indexer_checkpoints,scan_history,admin_flags,known_scam_entities
- Event-Driven Architecture β Chain indexer publishes normalized events; downstream services subscribe via BullMQ
- Adapter Pattern β All blockchain SDK access isolated in
blockchain-clientpackage - Idempotent Ingestion β Indexer supports replay from any block height
- Pluggable Risk Rules β Each risk factor is a self-contained, testable module
- BigNumber Everywhere β No floating-point math for financial data
- Zod at Boundaries β All API input/output validated with typed schemas
- Structured Logging β Pino with correlation IDs across all services
- Graceful Degradation β Bot falls back to direct node queries when API is unavailable
| Method | Endpoint | Description |
|---|---|---|
GET |
/tokens/trending |
Trending tokens by activity |
GET |
/tokens/new |
Recently created tokens |
GET |
/tokens/:assetId |
Token details |
GET |
/tokens/:assetId/scan |
Full token scan with risk |
GET |
/tokens/:assetId/holders |
Holder distribution |
GET |
/tokens/:assetId/candles |
OHLCV price candles |
GET |
/tokens/:assetId/risk |
Risk score breakdown |
GET |
/deployers/:address |
Deployer profile |
GET |
/deployers/:address/tokens |
Deployer's tokens |
GET |
/wallets/:address |
Wallet profile |
GET |
/watchlists/:userId |
User watchlist |
POST |
/watchlists/:userId/items |
Add to watchlist |
GET |
/health |
Service health check |
Contributions are welcome! Please read the contribution guidelines before submitting a PR.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built for the DecentralChain ecosystem
β Star this repo if you find it useful!