How countly/countly-server works
Countly is a self-hosted analytics and customer-engagement server. Its main workflow accepts SDK or write-API telemetry, records and aggregates it, then exposes reports through the dashboard and read API. Separate product branches provide crash reporting, push, remote configuration, ratings, compliance, and scheduled email reports. The graph combines README-documented capabilities with source-index evidence; unsampled plugin implementations are represented at their exact listed paths, and their internal calls are not inferred.
Main entry points: pluginManager.js Plugin management · app.js Dashboard server · api.js Write and read API · apps.js Application management
Components 21
Collection and analytics
- Write and read API
api/api.js - Event collection
api/parts/data/events.js - Analytics data
api/parts/data/stats.js
Dashboard and access
- Dashboard server
frontend/express/app.js - Reports and dashboards
plugins/reports/api/reports.js - Member management
frontend/express/libs/members.js - Application management
api/parts/mgmt/apps.js
Engagement plugins
- Crash reporting
plugins/crashes/frontend/app.js - Push notifications
plugins/push/api/send/worker.js - Remote configuration
plugins/remote-config/frontend/app.js - In-app ratings
plugins/star-rating/frontend/app.js - Compliance hub
plugins/compliance-hub/frontend/app.js - Hooks
plugins/hooks/frontend/app.js - Email reports
plugins/reports/frontend/app.js
Platform services
- MongoDB
- Access control
api/utils/rights.js - Plugin management
plugins/pluginManager.js - Background jobs
api/parts/jobs/manager.js - Long-running tasks
api/utils/taskmanager.js - File storage
api/utils/countlyFs.js
Other components
- SDKs and sources
Connections 22
- SDKs and sources → Write and read API: sends telemetry
README.md - Write and read API → Event collection: collects events
- Event collection → MongoDB: stores events
- Write and read API → Analytics data: serves analytics
- Analytics data → MongoDB: reads and writes
- Dashboard server → Reports and dashboards: serves reports
README.md - Dashboard server → Member management: authenticates members
frontend/express/app.js - Dashboard server → Access control: checks access
frontend/express/app.js - Dashboard server → Write and read API: uses read API
README.md - Application management → MongoDB: manages app records
api/parts/mgmt/apps.js - Application management → Plugin management: dispatches app events
api/parts/mgmt/apps.js - Plugin management → Crash reporting: enables plugins
- Plugin management → Push notifications: enables plugins
- Plugin management → Remote configuration: enables plugins
plugins/remote-config/frontend/app.js - Plugin management → In-app ratings: enables plugins
- Plugin management → Compliance hub: enables plugins
- Plugin management → Hooks: enables plugins
- Plugin management → Email reports: enables plugins
plugins/reports/frontend/app.js - Email reports → MongoDB: manages subscriptions
plugins/reports/frontend/app.js - Background jobs → MongoDB: schedules jobs
- Long-running tasks → MongoDB: stores task results
api/utils/taskmanager.js - Application management → File storage: stores app images
api/parts/mgmt/apps.js