explaingit

habitrpg/habitica

13,878JavaScriptAudience · generalComplexity · 3/5Setup · moderate

TLDR

Habitica is an open-source habit tracker that turns your daily tasks and goals into a role-playing game, completing habits earns XP and gold to level up your character, while missing them costs health points, making real-world habit-building as engaging as a video game.

Mindmap

mindmap
  root((Habitica))
    What it does
      Habit tracking
      RPG game layer
      Behavior change
    Game Mechanics
      XP and leveling
      Gold and equipment
      Health penalties
    Tech Stack
      Node.js Express
      MongoDB
      JavaScript frontend
    Community
      Open source
      Help Wanted issues
      Public API
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run a self-hosted instance of Habitica to track personal habits, dailies, and to-dos without depending on the habitica.com service.

USE CASE 2

Build a third-party integration using Habitica's public API, for example, automatically checking off habits from a fitness tracker or calendar app.

USE CASE 3

Study how a large open-source JavaScript project with Node.js, Express, and MongoDB is organized as a real-world reference codebase.

USE CASE 4

Contribute to an active open-source project by picking up 'Help Wanted' issues and following the contributor guide.

Tech stack

JavaScriptNode.jsExpressMongoDB

Getting it running

Difficulty · moderate Time to first run · 30min

Requires MongoDB and a compatible Node.js version, follow the 'Guidance for Blacksmiths' wiki for the full local environment setup.

In plain English

Habitica is an open-source habit-tracking application that frames your daily tasks and goals as a role-playing game. When you complete a habit or daily task, your character gains experience points and levels up. When you miss something you committed to, your character loses health points. Completing tasks also earns in-game gold, which you spend on equipment like weapons and armor for your character. The design borrows the reward mechanics of video game RPGs and applies them to real-world behavior change, betting that a playful layer of consequences and rewards makes habit-building more engaging than a plain checklist. The service runs at habitica.com as a web application, and the project has published separate mobile apps for Android and iOS in their own repositories. This repository is the core web platform that powers those products. The technology stack uses JavaScript throughout: Node.js and Express handle the server side, MongoDB stores the data, and the front end is built with standard HTML, CSS, and JavaScript. The project welcomes outside contributors and tags issues with 'Help Wanted' for tasks that are open to participation. A wiki page called 'Guidance for Blacksmiths' explains how the codebase is organized and how to set up a local development environment. Bug reports go to the admin email rather than GitHub issues, as the team reviews whether a formal issue is actually needed before one is opened. Anyone building a third-party tool using Habitica's public API is directed to review the project's API Usage Guidelines to stay within the rules and avoid disrupting other players' experience on the platform.

Copy-paste prompts

Prompt 1
Using the Habitica public API, write a Python script that marks a daily task as completed and logs the XP gained, include how to authenticate with my API key and user ID.
Prompt 2
I want to contribute to Habitica. Walk me through setting up the local development environment from the 'Guidance for Blacksmiths' wiki, including MongoDB setup, Node.js version, and running the test suite.
Prompt 3
Show me how to build a simple integration that listens for Habitica task-completion events and posts a motivational message to a Slack channel using Habitica's public API.
Open on GitHub → Explain another repo

← habitrpg on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.