MCPSERV.CLUB
Beaver Habit Tracker

Beaver Habit Tracker

Self-Hosted

Track habits effortlessly, no goals needed

Active(90)
1.5kstars
0views
Updated 7 days ago

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: habits and daily_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: uv is 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_STANDALONE flag 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_EMAIL skips 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

  1. Personal Productivity Dashboards – Embed the tracker in a home‑lab dashboard (Home Assistant, Grafana) to visualize streaks.
  2. Team Habit Coaching – Deploy on a private Kubernetes cluster and expose the API to internal tools that aggregate employee wellness metrics.
  3. IoT Integration – Use the Home Assistant switch or Stream Deck integration to toggle habits via physical buttons.
  4. 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_DISK mode 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

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
BSD-3-CLAUSE
Stars
1.5k
Technical Specs
Pricing
Open Source
Database
SQLite
Docker
Official
Supported OS
LinuxDocker
Author
daya0576
daya0576
Last Updated
7 days ago