A high-performance, real-time Solana blockchain indexer that streams live transaction data and stores it in PostgreSQL for analytics and monitoring.
For a full guide on indexer, read my blog here: Indexing on Solana: A Complete Guide to Deposits, Withdrawals, Memos, and Security
Stream live Solana blockchain data → Filter & Process → Store in Database → Real-time Analytics
- Real-time Data: Live blockchain updates via Yellowstone gRPC
- Smart Filtering: Large transfers, DeFi activity, memos, failed transactions
- Analytics Ready: Structured PostgreSQL storage for insights
- Production Scale: Handles Solana's 2000+ TPS throughput
Real-time slot streaming - indexer connected to Solana mainnet
Database connected, processing live blockchain data
Clean database schema for blockchain analytics
git clone https://github.com/praptisharma28/Solana-Real-time-Transaction-Indexer
cd Solana-Real-time-Transaction-Indexer
npm install
cp .env.example .env
npx prisma db push --schema=src/database/schema.prisma
npm run test:connection # Test gRPC
npm run test:db # Test database
npm run devSwitch between different data streams in src/index.ts:
const subscription = createSlotSubscription();
// Track whale movements (>100 SOL transfers)
const subscription = createLargeTransferSubscription();
// Monitor DeFi protocols (Raydium, Jupiter, Orca)
const subscription = createDeFiSubscription();
// Capture memo-based payments
const subscription = createMemoSubscription();
const subscription = createFailedTxSubscription();Slot Updates (Network Health)
[SLOT] 2025-08-24T07:51:26.161Z - Slot: 362152525 (Parent: 362152524)
Whale Transfers
[TRANSFER] 2025-08-24T07:51:26.161Z
From: 7xKXtg2C...QoQ9HD8i
To: 9WzDXwBb...i4qRvKn3
Amount: 150.5 SOL
Payment Memos
[MEMO] 2025-08-24T07:51:26.161Z - Payment ID: TXN_12345
- Runtime: Node.js + TypeScript
- Streaming: Yellowstone gRPC (Solana's data pipeline)
- Database: PostgreSQL + Prisma ORM
- Development: Hot reload, Docker support
- DeFi Analytics: Track protocol volumes, arbitrage opportunities
- Whale Watching: Monitor large SOL movements in real-time
- Payment Processing: Memo-based payment confirmations
- Compliance: Suspicious activity detection and reporting
- Research: Network health monitoring and usage patterns
GRPC_ENDPOINT="your-yellowstone-endpoint"
DATABASE_URL="postgresql://user:pass@localhost:5432/solana_indexer"
LOG_LEVEL="info"
MAX_RECONNECT_ATTEMPTS=5docker-compose up -d
docker-compose logs -f indexer5 optimized tables for blockchain analytics:
- Transaction: Core transaction data, fees, status
- LargeTransfer: SOL transfers above threshold
- Memo: Payment references and notes
- Account: Account state updates
- FailedTransaction: Error analysis and debugging
- Automatic reconnection handling
- Error logging and monitoring
- Configurable data retention
- Connection pooling support
- Docker health checks
MIT License - feel free to use for commercial projects!
If this helped you build something cool, give it a star!✨
Built with ❤️ by Prapti for the Solana ecosystem