explaingit

danielchernov7/wallet-activity-tracker

0TypeScriptAudience · developerComplexity · 4/5ActiveSetup · hard

TLDR

Backend that watches EVM and Solana wallets in real time, enriches each transaction with prices and labels, and fires alerts via Telegram, webhooks, or WebSocket.

Mindmap

mindmap
  root((wallet-tracker))
    Inputs
      Chain RPC websockets
      Tracked wallet list
      Alert rules
    Outputs
      Telegram alerts
      Webhook calls
      WebSocket events
    Use Cases
      Whale wallet alerts
      Contract interaction watch
      Unusual activity detection
    Tech Stack
      TypeScript
      Fastify
      Prisma
      BullMQ
      PostgreSQL

Things people build with this

USE CASE 1

Send Telegram alerts when a tracked wallet does a trade above a dollar threshold

USE CASE 2

Watch a wallet for any interaction with a specific contract address

USE CASE 3

Detect unusual activity by counting transactions in a time window

USE CASE 4

Pipe enriched on-chain transactions into your own webhook or WebSocket consumer

Tech stack

TypeScriptFastifyPrismaBullMQPostgreSQLRedisethers.jsweb3.js

Getting it running

Difficulty · hard Time to first run · 1h+

Requires RPC endpoints, Postgres, Redis, Telegram credentials, and three separate processes (API, workers, listeners) running together.

In plain English

This project is a backend service that watches cryptocurrency wallets and sends alerts when something interesting happens in them. It listens to two kinds of blockchains: EVM chains, which is the family that includes Ethereum, Base, and Arbitrum, and Solana. When a transaction touches a wallet you have asked it to track, the service decodes the transaction, looks up the dollar value of the tokens involved, attaches a label if the other side of the trade is a known exchange or DEX, and then decides whether to send a notification. The code is structured as several pieces that pass work to each other through a queue. Chain listeners use ethers.js over a WebSocket for EVM chains and web3.js for Solana to receive new transactions in real time. These raw events get pushed into a BullMQ queue, which is a job queue built on Redis. A first worker enriches each transaction by classifying it, fetching token prices from Jupiter or CoinGecko with a 60 second cache, and looking up address labels in the database. A second worker checks the result against the alert rules and sends notifications. Data is stored in PostgreSQL using Prisma as the database layer. The README lists four kinds of alert rule. amount_gt fires when a transaction value in US dollars goes above a threshold. contract_interaction fires when the wallet touches a specific contract address. unusual_activity fires when a wallet has more than a given number of transactions in a time window. There is also a catch all called any. For each rule you choose where to send the alert: a Telegram chat, a webhook URL of your own, a WebSocket connection, or any combination of those. To run it locally, you copy a .env.example file and fill in RPC endpoints for the chains and Telegram credentials, then start PostgreSQL and Redis with docker compose, install dependencies with npm, generate the Prisma client, run database migrations, and seed a table of known addresses. The system then runs as three separate processes: a Fastify REST and WebSocket API on port 3000, the BullMQ workers, and the chain listeners. The REST API exposes routes for adding and removing tracked wallets, listing recent transactions, and managing alerts. The README also mentions design choices such as idempotent transaction upserts and graceful shutdown on SIGINT.

Copy-paste prompts

Prompt 1
Spin up wallet-activity-tracker locally with docker compose for Postgres and Redis
Prompt 2
Add a new EVM chain by editing the chain listeners and Prisma schema
Prompt 3
Walk me through how a raw transaction flows from the websocket listener to a Telegram alert
Prompt 4
Replace the Jupiter and CoinGecko price feeds with a single in-house pricing service
Prompt 5
Add an alert rule type that fires on net wallet PnL crossing a threshold and wire it through the workers
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.