Real-Time Stellar Payment Tracker, Soroban Event Ingestion & Non-Custodial Alert Engine
Stellar Alerts monitors registered Stellar public wallets in real time for incoming transactions on the Stellar network (Testnet / Mainnet). It records payment history in PostgreSQL and dispatches multi-channel alerts (Telegram, WhatsApp, Email, Webhooks) without ever requesting or storing secret keys.
- โก Zero-Delay Horizon SSE Ingestion: Listens directly to Stellar Horizon Server-Sent Events (SSE) payment streams (
paymentandcreate_accountoperations). - ๐ฎ Soroban Smart Contract Support: Ingests Soroban contract events (
getEvents) and includes an on-chain Rust Wasm Alert Registry contract (contracts/alert_registry). - ๐ 100% Non-Custodial Security: Only public key addresses (
G...) are stored. Secret keys are never touched or requested. - ๐ StrKey Checksum Validation: Enforces Base32 CRC16-XMODEM public key checksum validation at the API boundary and watcher loop.
- ๐จ BullMQ Redis Alert Queue: Asynchronous message queue with exponential retries for off-chain alert dispatches.
- ๐งฎ Persisted Alert-Rule Evaluator: Evaluates a user's stored
AlertRulerecords (per-wallet or account-wide, asset allow-lists, minimum amount thresholds, and AND/OR condition grouping) against each normalized payment event, enqueuing a notification job only when a rule matches and never twice for the same payment. - ๐ฉน Hardened Cursor Recovery: Detects ingestion ledger gaps and Horizon provider outages, recovers with a bounded backfill instead of an unbounded replay, and exposes per-wallet ingestion health via
GET /wallets/:id/ingestion-status. - ๐ก๏ธ HMAC SHA256 Webhook Signer: Generates cryptographically verifiable
X-Stellar-Alerts-Signatureheaders for webhook payloads. - ๐ช 1-Click Passwordless Auth: Secure Magic Link email authentication (
/verify?token=...) with zero password overhead. - ๐ฆ Wallet (DID) Sign-In: Sign in with your Stellar Freighter wallet via
did:pkh:stellarchallenges โ single-use, expiring, and fully non-custodial (see/auth/did/*). - ๐ Idempotent Delivery: Webhook/Telegram/Email dispatches deduplicate via
notificationDeliveryAttempt, preventing duplicate alerts on retries. - ๐๏ธ Dead-Letter Queue & Inspector: Terminal delivery failures are persisted (
DeadLetter), audited, and can be replayed idempotently or suppressed from the API and web UI (/dead-letters). - ๐ Modular React Dashboard: Monitored wallets, summary statistics, and real-time payment history powered by Next.js and Tailwind CSS, organized into feature routes (
/dashboard,/inspectors,/settings,/onboarding,/docs). - ๐ง Resumable Onboarding Wizard: A three-step freelancer setup flow (wallet connection โ Telegram linking โ notification preferences) with a test-ping check before activation; progress persists to
localStorageso a refresh resumes exactly where the user left off. - ๐งช Automated Vitest Test Suite: Unit testing framework with 100% passing test coverage (
npm run test:api). - ๐ GraphQL Subscriptions: Real-time event streaming via GraphQL with Apollo Server and Redis Pub/Sub for filtered transaction and contract events over WebSockets.
- ๐ก gRPC Streaming Interface: Enterprise-grade streaming server with Proto3 definitions for ledger events, wallet alert subscriptions, and low-latency bidirectional notification feeds.
- ๐ฅ๏ธ Interactive TUI Dashboard: React Ink terminal interface for real-time monitoring of ingested transactions, queue depths, delivery latency, and worker status.
- ๐ค Headless Daemon Mode: Background alert processing with automated service generation for systemd (Linux) and launchd (macOS).
Stellar Network (Horizon SSE + Soroban RPC) โ Ingestion Worker โ PostgreSQL โ Fastify REST API โ Next.js Web App
โ
โโโ> BullMQ (Redis) โ Telegram / WhatsApp / Email / Webhook Alerts
For complete technical specifications, database schemas, and data flow details, see ARCHITECTURE.md.
git clone https://github.com/stellar-alerts-labs/stellar-alerts.git
cd stellar-alerts
npm installdocker compose up -d
npm run db:pushnpm run test:apinpx turbo devOr launch components individually:
npm run dev:api # Fastify REST API on http://localhost:3001
npm run dev:worker # Stellar Horizon & Soroban Ingestion Worker
npm run dev:web # Next.js Dashboard on http://localhost:3000
npm run cli:tui # Interactive terminal dashboard
npm run daemon:start # Start headless daemon modeFund a fresh keypair on Stellar Testnet via Friendbot and verify automated ingestion into PostgreSQL:
npx tsx --env-file=apps/api/.env apps/api/scripts/seed-and-trigger-payment.tsAccess real-time event streaming via GraphQL at http://localhost:3001/graphql:
subscription {
paymentStream(filter: { walletId: "your-wallet-id" }) {
id
fromAddress
amount
asset
receivedAt
}
}Connect to the gRPC server on port 50051 for enterprise-grade streaming:
# Using grpcurl
grpcurl -plaintext localhost:50051 stellar.LedgerService/StreamLedgerEventsLaunch the terminal-based real-time monitoring dashboard:
npm run cli:tuiInstall and run as a system service:
Linux (systemd):
npm run daemon:install:systemd
sudo systemctl daemon-reload
sudo systemctl enable stellar-alerts
sudo systemctl start stellar-alertsmacOS (launchd):
npm run daemon:install:launchd
launchctl load ~/Library/LaunchAgents/com.stellaralerts.daemon.plist- Drips Wave Audit & Readiness Report: See drips_wave_readiness_audit.md for full reviewer scoring & roadmap.
- Grant Submission Qualification Matrix: See SUBMISSION.md.
- System Design & API Specs: See ARCHITECTURE.md.
- Contribution Guidelines: See CONTRIBUTING.md.
- Development Roadmap: See ROADMAP.md.
- Soroban Smart Contract: See contracts/alert_registry/README.md.
Join our official Telegram community to ask questions, chat with maintainers, discuss Drips Wave sprint tasks, and stay updated on new releases:
๐ Join Stellar Alerts on Telegram
Released under the MIT License.