The Real-Time User Presence Dashboard is a production-grade, Erlang/OTP-based system designed to deliver low-latency, real-time user presence information across multiple clients and services. This project uses the Cowboy HTTP/WebSocket framework to provide a resilient and scalable interface for presence tracking and optionally integrates with MongooseIM for XMPP messaging platforms.
The system is intended for high-performance communication platforms, collaborative tools, real-time games, or enterprise dashboards requiring up-to-the-millisecond user presence status.
- ✅ Track user online/offline status in real-time
- ✅ Deliver WebSocket updates to clients with sub-100ms latency
- ✅ Support secure, authenticated connections
- ✅ Maintain resilient distributed state using Erlang OTP
- ✅ Provide optional integration with MongooseIM/XMPP
- ✅ Enable flexible data storage using ETS, Redis, or PostgreSQL
- Erlang/OTP: Backbone for concurrency, fault-tolerance, supervision
- Cowboy: Handles HTTP and WebSocket connections
- ETS/Redis/PostgreSQL: In-memory and persistent storage options
- MongooseIM Adapter: Translates XMPP presence into dashboard state
- Admin API: Aggregated views, session tracking, impersonation tools
App | Purpose |
---|---|
presence_core |
Presence logic, state management, supervision tree |
presence_api |
WebSocket + REST handlers using Cowboy |
presence_store |
Data layer abstraction (ETS, Redis, PostgreSQL) |
presence_adapter_xmpp |
MongooseIM integration (optional) |
presence_admin |
Admin endpoints, metrics, and management interfaces |
- JWT/OAuth2-based authentication for session control
- Rate limiting and origin protection on WebSocket upgrades
- TLS encrypted communication
- Telemetry-based metrics exported via Prometheus-compatible endpoints
- Real-time and historical analytics of user activity
- Alerts on session flapping or suspicious activity (planned)
-
Install Dependencies
rebar3 get-deps
-
Build Project
rebar3 compile
-
Run Locally
rebar3 shell
-
Release & Deploy
rebar3 release _build/default/rel/real_time_presence_dashboard/bin/real_time_presence_dashboard console
See real_time_dashboard_project_structure.md
- Unit tests via
eunit
- Integration tests via
common_test
- Property-based testing with
propEr
- Live dashboard with Phoenix/LiveView or React
- Geo-distributed presence sync via Redis
- Typing indicators and last-seen analytics
- UI/UX for admin tools
Contributions, bug reports, and feature requests are welcome!
- Fork the repo
- Create a branch:
feature/my-feature
- Submit a PR
MIT License © 2025 [Your Name / Your Organization]