Habitica

repository·develop·Indexed 12 days ago

https://github.com/habitrpg/habitica

An open-source habit-building application and productivity tracker that gamifies goals using RPG mechanics. Version 5.49.0 includes a web/server component and mobile applications, with documentation covering Kubernetes deployment on AWS, Docker Compose setup, and development guidelines for the Vue-based client and Node.js server.

Tokens
20.4K
Snippets
77
Records
115
Agent score
96%

What's inside Habitica

  1. Important contribution policies for Habitica

    develop
    As of August 4, 2026, Habitica has paused acceptance of code-based contributions (Blacksmith tiers). Additionally, the repository enforces a strict No AI-Generated Code Policy: all code must be authored entirely by humans. Submissions containing code generated by LLMs, AI coding assistants, or automated tools will be rejected during pull request reviews.
  2. Understand static asset processing and caching

    develop

    Certain static asset subfolders are excluded from Webpack processing. Because they are not processed by Webpack, their filenames are not hashed. These assets are cached by the browser for 1 week.

    Affected subfolders:

    • audio
    • emails
    • icons
    • merch
    • presskit

    Important for updates: If you need to update an asset in one of these folders, you should change the filename to ensure the new version is fetched instead of the cached version. For implementation details regarding how these are served, refer to website/server/middlewares/static.js.

  3. Deployment Notes and Best Practices

    develop

    Data Persistence

    MongoDB data is persistent. If you want to start with a fresh database, you must manually remove the EBS volume and re-create it.

    AWS Instance Sizing

    When running on AWS, it is recommended to use at least t2.medium minion nodes for your Kubernetes cluster. The default t2.small instances are insufficient for running more than two Habitica nodes.

  4. Organize components and pages in the Vue structure

    develop

    The project follows a specific directory structure to maintain clarity between pages and reusable components:

    • /src/pages: Contains page-level components. Each page can have its own subfolder containing sub-components that are only used by that specific page.
    • /src/components: Contains reusable components that are shared across multiple different pages.

    Best Practice: Avoid mixing pages and components in /src/components. Move page-specific logic to /src/pages and keep only truly global, shared components in /src/components.

  5. Deploy Habitica in Kubernetes on AWS

    develop

    This guide provides sample Kubernetes configuration files to launch Habitica on AWS. You can deploy it as either a single-node web frontend or a multi-node web frontend.

    Prerequisites

    • An AWS account.
    • A working Kubernetes installation.
    • A persistent volume for MongoDB data.
    • Docker images of Habitica (you can use the ones included in the YAML files or your own).

    Before you begin

    1. Set up your Kubernetes cluster.
    2. Create an EBS volume for MongoDB data and note its name for later configuration.
  6. How to update text and translations in Habitica

    develop

    Habitica's translations are managed via an external translation platform at https://translate.habitica.com/.

    To change any text in the application, follow these rules:

    1. Edit only the American-English strings: All text changes must be made directly in the locales/en directory via GitHub.
    2. Do not edit other locales: Never edit files in any other locale directory (e.g., locales/fr, locales/es). These files are automatically pulled from the translation platform.
    3. Automatic Sync: Once you update the locales/en files, you do not need to request translations. Changes are automatically copied to the translation website on a regular basis for linguists to process.
  7. Shut down Habitica in Kubernetes

    develop

    To shut down the deployment, delete the resources in reverse order of creation:

    kubectl.sh delete -f habitica-service.yaml
    kubectl.sh delete -f habitica.yaml # (or habitica-rc.yaml if using multi-node)
    kubectl.sh delete -f mongo-service.yaml
    kubectl.sh delete -f mongo.yaml
    kubectl.sh delete -f habitica-service.yaml
    kubectl.sh delete -f habitica.yaml
    kubectl.sh delete -f mongo-service.yaml
    kubectl.sh delete -f mongo.yaml