Wakapi is a self-hosted, open-source backend designed to replicate the functionality of WakaTime, allowing developers to track their coding activity without relying on third-party cloud services. Built in Go and optimized for performance, it provides detailed statistics on projects, languages, editors, hosts, and operating systems—all while giving users full control over their data. Ideal for privacy-conscious developers, DevOps teams, and organizations that require on-premises analytics, Wakapi supports integration with existing WakaTime clients and offers advanced features like email reports, public leaderboards, and Prometheus exports.
Unlike hosted solutions that require sharing sensitive coding data externally, Wakapi runs entirely on your infrastructure. Whether deployed via Docker, compiled from source, or orchestrated with Kubernetes, it ensures data sovereignty while maintaining compatibility with the WakaTime ecosystem. This makes it a compelling alternative for those seeking transparency, customization, and control over their productivity metrics.
What You Get
- Self-hosted coding analytics - Track your coding activity locally with full control over data storage and privacy, compatible with WakaTime clients via API.
- WakaTime compatibility - Fully supports WakaTime’s API endpoints, enabling seamless replacement of wakatime.com with your own server using the same client configuration.
- Real-time statistics dashboard - Visualize coding activity by project, language, editor, OS, and host with a clean web interface featuring interactive charts.
- Weekly email reports - Automatically receive detailed summaries of your coding activity via email on a configurable schedule (default: Friday at 6 PM).
- Public leaderboards - Enable community or team leaderboards with customizable time scopes (e.g., 7_days, 30_days) and optional authentication requirements.
- Prometheus metrics export - Expose internal performance and usage metrics in Prometheus format for monitoring and alerting with tools like Grafana.
- REST API access - Programmatically fetch user statistics, heartbeats, and summaries via a documented REST endpoint for integration with custom tools.
- Docker & Kubernetes support - Deploy using pre-built Docker images or Helm charts with environment variable and secret-based configuration for production environments.
- Data import from WakaTime - Migrate historical coding data from WakaTime or other Wakapi instances using batched import functionality with rate limiting and backoff controls.
Common Use Cases
- Building a private developer analytics platform - A team of remote developers wants to track productivity without sending data to third parties; they deploy Wakapi on an internal server and configure all IDEs to point to it.
- Creating a developer dashboard for engineering teams - A DevOps team uses Wakapi to monitor coding habits across departments, integrating Prometheus metrics into their internal observability stack for trend analysis.
- Privacy-focused developers replacing WakaTime - A developer concerned about data collection by commercial services migrates from wakatime.com to Wakapi, keeping all heartbeat data on their personal NAS using Docker.
- DevOps teams managing microservices across multiple cloud providers - Engineers use Wakapi’s REST API to pull coding statistics into internal reporting tools, correlating code activity with deployment frequency and bug rates.
Under The Hood
Wakapi is a self-hosted alternative to WakaTime, designed to track and analyze coding activity with a focus on performance, modularity, and extensibility. It provides rich analytics while maintaining a clean architecture suitable for both personal and enterprise use.
Architecture
Wakapi follows a layered monolithic structure that promotes clear separation of concerns and maintainability. The system is organized into well-defined modules with distinct responsibilities.
- Modular organization with clear boundaries between configuration, models, and business logic
- Adoption of design patterns such as dependency injection and event-driven communication
- Configuration management and extensible plugin-like structures for integration
Tech Stack
The application is built using Go, leveraging modern tools and frameworks to ensure efficiency and scalability.
- Implemented in Go with GORM for database interactions and Gorilla Mux for routing
- Integrates with multiple database systems including MySQL, PostgreSQL, and SQLite
- Utilizes Docker for containerization and Sentry for error tracking and monitoring
- Supports unit and integration testing with mocking capabilities for external services
Code Quality
Overall code quality reflects a balance between structured organization and areas requiring improvement in consistency and technical debt.
- Comprehensive test suite covering key modules, though not all tests are fully analyzed
- Error handling is present across components but varies in consistency and propagation methods
- Code follows Go idioms with some use of generics, although naming and style inconsistencies exist
- Evidence of migration files and legacy patterns indicating a long development lifecycle with evolving needs
What Makes It Unique
Wakapi distinguishes itself through its dual compatibility mode and domain-driven design approach.
- Offers a self-hosted solution with analytics comparable to WakaTime, supporting user autonomy
- Dual compatibility mode allows for flexible deployment and integration with various systems
- Modular architecture enables extensibility and customization without compromising core functionality