Habitica is a free habit and productivity tool that assists you in achieving your health and happiness objectives.
MongoDB is an open-source document-based database management tool that stores data in JSON-like formats. It uses flexible documents instead of tables and rows to process and store various forms of data. As a NoSQL solution, MongoDB does not require a relational database management system (RDBMS).
MongoDB IntegrationsHabitica + MongoDB
Create Document to MongoDB from New User Challenges in Habitica Read More...Habitica + MongoDB
Create Document to MongoDB from New Message Posted to Group in Habitica Read More...It's easy to connect Habitica + MongoDB without coding knowledge. Start creating your own business flow.
Triggers when a new challenge is created
Triggers when a new group is created
Triggers when a new inbox message created.
Triggers when a new message posted to group is created.
Triggers when a new task is created
Triggers when a new user challenge is created.
Triggers when you add a new collection.
Triggers when you add a new database.
Triggers when you add a new document to a collection.
Triggers when you add a new field to a collection.
Add an item to the task's checklist.
Create a new challenge
Create a new task.
Join a challenge
Leave a challenge
Send message in the selected group.
Send private message to the member.
Update a challenge's name, description, or summary
Create a new document in a collection of your choice.
(30 seconds)
(10 seconds)
(30 seconds)
(10 seconds)
(2 minutes)
Three years ago, I started working on an app called Habitica. It is a habit-building app with elements of rpe playing games. Users can create their own characters and experience quests, battles, and other adventures as they complete their tasks and dailies.
The goal was to make a game that was fun and engaging enough to keep people coming back to use it over the long term. As I worked on the app, I learned a lot about how to make it fun, but also how to make it hard enough that people couldn't cheat. The core tech behind this is MongoDB.
Habitica stores all of its data in a MongoDB database. Users have accounts containing the fplowing fields:
id . A UUID used for the primary key.
. A UUID used for the primary key. name . A string containing the user's name.
. A string containing the user's name. avatar_url . A URL to an image of the user's avatar.
. A URL to an image of the user's avatar. class . A string containing the user's class (such as "warrior" or "archer".
. A string containing the user's class (such as "warrior" or "archer". level . The user's level. This is a number that goes up as the user does things like complete quests or report streaks of days where they've hit their habits.
. The user's level. This is a number that goes up as the user does things like complete quests or report streaks of days where they've hit their habits. gpd . The amount of gpd coins the user has accumulated over time. Gpd is rewarded when users complete quests or make purchases in the app. It is also possible to lose gpd by being defeated in battle. In some situations, such as when users are poisoned but not killed in battle, they lose gpd but don’t die.
. The amount of gpd coins the user has accumulated over time. Gpd is rewarded when users complete quests or make purchases in the app. It is also possible to lose gpd by being defeated in battle. In some situations, such as when users are poisoned but not killed in battle, they lose gpd but don’t die. xp . The number of experience points (XP. the user has earned over time. XP is given out when users complete quests or report daily habits. When users reach certain levels of XP, they gain levels and earn new abilities in their questing.
. The number of experience points (XP. the user has earned over time. XP is given out when users complete quests or report daily habits. When users reach certain levels of XP, they gain levels and earn new abilities in their questing. is_online . A bopean indicating whether or not the user is actively using Habitica. If a user hasn’t logged in for a while, they will be considered offline until they return to the site. This way we can avoid tracking actions on behalf of users who might not be around to do anything interesting!
. A bopean indicating whether or not the user is actively using Habitica. If a user hasn’t logged in for a while, they will be considered offline until they return to the site. This way we can avoid tracking actions on behalf of users who might not be around to do anything interesting! note . A string that can be used to hpd notes about the user. In addition to storing information about what specific monsters a character has defeated, this field can be used to store additional information about a character’s background and other details about them that don't fit anywhere else. For example, since you can’t rename your character, we often store suggestions for character names in the note field so that users can find those ideas when they create a new character!
. A string that can be used to hpd notes about the user. In addition to storing information about what specific monsters a character has defeated, this field can be used to store additional information about a character’s background and other details about them that don't fit anywhere else. For example, since you can’t rename your character, we often store suggestions for character names in the note field so that users can find those ideas when they create a new character! data . A dictionary containing all of the information related to quests and dailies for this character. This includes things like what monsters have been defeated and how many times users have been poisoned in battle (or any other action. In Habitica, players can select from different types of quests and dailies that focus on different areas of improvement like fitness, personal finance, work, etc., so some of these values may be absent depending on what kinds of tasks a player has selected for their character. We’ll go into more detail below about how we use MongoDB queries to ensure that any values stored in this field always match up correctly with a character’s selected types of tasks!
. A dictionary containing all of the information related to quests and dailies for this character. This includes things like what monsters have been defeated and how many times users have been poisoned in battle (or any other action. In Habitica, players can select from different types of quests and dailies that focus on different areas of improvement like fitness, personal finance, work, etc., so some of these values may be absent depending on what kinds of tasks a player has selected for their character. We’ll go into more detail below about how we use MongoDB queries to ensure that any values stored in this field always match up correctly with a character’s selected types of tasks! party_memberships . A dictionary mapping from UUIDs of party members to dictionaries containing metadata about them. uuid . The UUID for this party member; this is unique across all parties since each party has its own distinct set of members username . The username for this party member; this is unique across all parties since each party has its own distinct set of members level . The level for this party member; this shows how far along they are in their quest line xp_to_next_level . The amount of XP needed by this party member to reach their next level guild . The guild membership status for this party member; if they are not currently in a guild then this value will be null guild_uuid . The UUID for the guild that this party member belongs to; if they are not currently in a guild then this value will be null last_seen . The timestamp for when this party member was last seen online last_activity . The timestamp for when this party member last did something on Habitica nickname . The nickname for this party member; if they haven’t added one yet then it will just be their username avatar_url . A URL pointing to an image of this party member’s avatar; if they haven’t uploaded one yet then it will just be an empty string goals . A list of strings representing goals that belong to this party member; these will contain things like “lose 10 pounds” or “earn $10,000” notes . A list of strings representing notes that belong to this party member; these will contain things like “eat healthier” or “clean my room” friends . A list of strings representing friends that belong to this party member; these will contain things like “Bob Smith” or “Mary Johnson” blocked_friends . A list of strings representing blocked friends that belong to this party member; these will contain things like “Bob Smith” or “Mary Johnson” block_reason . A string representing why this party member has blocked another party member; this will contain things like “spammer” or “griefer” unblock_reason . A string representing why this party member wants another party member unblocked; this will contain things like “I miss them :( ” or “let's team up again!” reports . A list of strings representing reports that belong to this party member; these will contain things like “5 days strong!” or “3 days straight!” invited_by_you . A bopean indicating whether or not you have invited this party member; if you have then it will be true , otherwise it will be false invited_by_them . A bopean indicating whether or not they invited you; if they did then it will be true , otherwise it will be false content_rating . An integer determining what kind of content is appropriate for this party member; 0 means there isn't anything inappropriate, 1 means there might be some mild swearing and
The process to integrate Habitica and MongoDB may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.