Overview
Discover what makes Beaver Habit Tracker powerful
Beaver Habit Tracker is a lightweight, self‑hosted application designed to record daily habits without the overhead of goal tracking. From a developer’s perspective, it offers a clean REST‑style API, optional authentication bypass, and an extensible plugin ecosystem. The core of the app is a single SQLite database (`habits.db`) that stores habit definitions, daily completions, and metadata. When the `HABITS_STORAGE=USER_DISK` option is selected, habit data migrates to a JSON file located in the container’s mounted volume, allowing zero‑configuration deployments on environments that prohibit writable containers.
Language & Runtime
Web Framework
Database
Containerization
Overview
Beaver Habit Tracker is a lightweight, self‑hosted application designed to record daily habits without the overhead of goal tracking. From a developer’s perspective, it offers a clean REST‑style API, optional authentication bypass, and an extensible plugin ecosystem. The core of the app is a single SQLite database (habits.db) that stores habit definitions, daily completions, and metadata. When the HABITS_STORAGE=USER_DISK option is selected, habit data migrates to a JSON file located in the container’s mounted volume, allowing zero‑configuration deployments on environments that prohibit writable containers.
Technical Stack
- Language & Runtime: Rust 1.78 (via
cargo), compiled to a static binary for maximum portability. - Web Framework: Actix‑web, chosen for its high throughput and async support. The API layer exposes endpoints such as
/api/habits,/api/daily, and optional webhooks. - Database: SQLite for production workloads; the schema is lightweight (two tables:
habitsanddaily_entries). The application uses Diesel ORM with schema migrations bundled in the Docker image. - Containerization: Official Docker images are built on Alpine, exposing port
8080. The container runs as a non‑root user (nobody) by default, improving security on OpenShift or other restricted platforms. - Package Management:
uvis used for dependency resolution, making the dev environment reproducible and fast.
Core Capabilities
- REST API: CRUD operations for habits, bulk updates of daily completions, and query filters by date range. The API is documented in the Wiki’s Beaver‑Habit‑Tracker‑API How‑to Guide and can be consumed by any HTTP client.
- Webhooks & Extensibility: External services such as Home Assistant or CalDAV bridges can register webhooks to trigger habit updates. The
ENABLE_IOS_STANDALONEflag allows the app to be used as a native iOS widget via Safari’s “Add to Home Screen”. - Plugin Derivatives: The project hosts several community derivatives (e.g., HabitDeck for Stream Deck, Apple Shortcuts integration) that demonstrate how to interface with the API or extend the UI through custom front‑ends.
- Authentication Bypass: Setting
TRUSTED_LOCAL_EMAILskips the OAuth flow, enabling a single‑user mode that is ideal for personal dashboards or CI/CD environments.
Deployment & Infrastructure
Deploying Beaver Habit Tracker is straightforward on any Docker‑enabled host. The image pulls from daya0576/beaverhabits:latest and supports both Docker Compose and Kubernetes via Helm charts (not included in the repo but can be generated from the existing docker-compose.yml). For high‑availability, the app can be run behind a reverse proxy (NGINX, Traefik) with TLS termination. Because the data layer is SQLite, scaling horizontally requires shared storage (e.g., NFS) or migrating to a full RDBMS, but for most use cases the single‑node setup suffices.
Integration & Extensibility
The API is intentionally minimal yet expressive. Developers can:
- Embed the tracker in a larger SaaS product by mounting the SQLite file and exposing a subset of endpoints.
- Hook into external schedulers (cron, Airflow) to automatically mark habits as completed.
- Expose CalDAV or iCalendar feeds via the community CalDAV bridge, turning habits into tasks in calendar clients.
- Customize UI rendering by consuming the JSON payloads and building a bespoke front‑end (React, Vue, or static sites).
The project’s open license encourages such reuse; contributors are welcomed to submit PRs that add new integrations or improve existing ones.
Developer Experience
The documentation is centered around the Wiki, which includes a step‑by‑step API guide, environment variable reference, and troubleshooting tips. The uv workflow keeps dependencies lightweight, and the codebase follows Rust idioms that favor safety and performance. Community support is active on GitHub Discussions, where users share custom shortcuts (Apple Shortcuts, Stream Deck) and ask for feature enhancements. The license is permissive (MIT), allowing commercial use without licensing fees.
Use Cases
- Personal Productivity Dashboards – Embed the tracker in a home‑lab dashboard (Home Assistant, Grafana) to visualize streaks.
- Team Habit Coaching – Deploy on a private Kubernetes cluster and expose the API to internal tools that aggregate employee wellness metrics.
- IoT Integration – Use the Home Assistant switch or Stream Deck integration to toggle habits via physical buttons.
- Mobile‑First Apps – Build a lightweight iOS/Android wrapper that communicates with the API and leverages Safari’s “Add to Home Screen” for a native feel.
Advantages
- Zero‑Configuration: The
USER_DISKmode eliminates the need for a database server, simplifying devops. - Performance:
Open SourceReady to get started?
Join the community and start self-hosting Beaver Habit Tracker today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Dovecot
Secure, high‑performance IMAP server
Black Candy
Self-hosted music streaming for your personal library
Engity's Bifröst
Advanced, OpenID‑connected SSH server for containers and Kubernetes
nefarious
Auto‑download movies and TV shows via torrents
Textpattern CMS
Elegant, fast PHP CMS for flexible content management
Open QuarterMaster
All‑in‑one inventory system for every scale