┌─────────────────────────┐ ┌─────────────────────────┐
│ External Exchanges │ │ Blockchain / Wallet │
│ (Binance, CoinGecko...) │ │ (Etherscan, Alchemy) │
└────────────┬────────────┘ └────────────┬────────────┘
│ (API calls) │ (API calls)
▼ ▼
┌─────────────────────────────────────────────────────────┐
│ Node.js/Express │
│ (Controllers, Services, Models, Socket.io, Auth) │
└─────────────────────────────────────────────────────────┘
│ │
(queries) ▼ ▼ (caching)
┌───────────────────┐ ┌───────────────────┐
│ PostgreSQL │ │ Redis │
│(transaction data) │ │(presence, cache) │
└───────────────────┘ └───────────────────┘
The backend ingests data from external sources (crypto APIs, block explorers), processes user requests (auth, feed posts, trades), and pushes real-time updates (Socket.io) out to connected clients. PostgreSQL stores persistent data (user profiles, trades, channel definitions) while Redis handles ephemeral needs (session tokens, chat presence, caching).