Chores, Rewards, & Points
Relevant source files
The following files were used as context for generating this wiki page:
Chores, Rewards, and Points form a gamified household management system within GoCasa. This system tracks recurring tasks, incentivizes completion through a virtual currency (points), and allows members to spend earned points on defined rewards.
Sources: GLOSSARY.md:1-122, README.md:1-5
Chore System Overview
A Chore is a recurring job that follows a specific schedule. Unlike to-dos, chores do not accumulate as "owed" tasks; instead, they operate in Rounds. A Round is the active period (such as a day or a week) where the chore can be completed.
Sources: GLOSSARY.md:76-80
Chore Types and Statuses
Chores are categorized by how members interact with them during a Round:
- Each Chore: Every assigned member completes this chore separately to earn individual points.
- Anyone Chore: The first assigned member to complete the task finishes it for the entire household for that Round.
Chores transition through several states based on time and completion:
| Status | Description |
|---|---|
| Active | The chore is within its current Round and available for completion. |
| Late | The Round ended undone, but the chore can still be claimed until the next Round ends. |
| Missed | The chore can no longer be claimed and leaves the chore board. |
Sources: GLOSSARY.md:82-93
Points and Rewards
The economy of the household is managed through point balances assigned to each Member. Members earn points by completing Chores and spend them on Rewards.
Sources: GLOSSARY.md:11-14, GLOSSARY.md:76-77
Point Lifecycle
Points are earned automatically upon chore completion, but spending them requires administrative oversight.
- Reward: An item or privilege with a fixed points cost.
- Redemption: A member's request to spend points. The points are not deducted until an Admin approves the request.
- Adjustment: A manual override where an Admin adds or removes points for a specific reason. This is the only mechanism that allows a point balance to drop below zero.
Sources: GLOSSARY.md:95-105
Points Flow Diagram
The following diagram shows how points move through the system from earning to spending.
The diagram illustrates the point acquisition and the administrative approval required for redemptions.
Sources: GLOSSARY.md:95-105
System Actors and Constraints
The Chore and Reward system relies on the household structure defined in the application.
- Members: Both people and pets can be members. They are credited with past completions and points even if they become an Archived Member.
- Admins: These members have elevated privileges. They can change settings, manage members, approve redemptions, and perform point adjustments.
- Locks: Admins can enable a "Lock" which requires an Admin's PIN to perform actions like completing chores.
Sources: GLOSSARY.md:11-30, internal/web/settings_templ.go:123-125
Administrative Control Flow
This sequence shows the requirement for administrative intervention in the reward loop.
Sources: GLOSSARY.md:95-101
Implementation Details
While specific Chore data structures are handled in the database, the web interface manages member roles and point-related actions through the settings and lock mechanisms.
- PIN Protection: Admins use a 4-8 digit numeric PIN to unlock restricted actions, including chore completion if a Lock is active.
- Archival Persistence: When a member is archived, they are hidden from the chore boards but their point history and past completions are preserved in the database.
Sources: internal/web/settings_templ.go:53-57, GLOSSARY.md:27-30
Member Data Structure (View Layer)
type Member struct {
ID int64
Name string
Color string // #rrggbb
Role string // "admin" or "member"
Archived bool
HasAvatar bool // else initials on colour
}
Sources: internal/web/settings_templ.go:20-27
Summary
The Chores, Rewards, & Points system provides a structured way to manage household labor and incentives. By utilizing Rounds for chores and requiring administrative approval for point spending, the system ensures that household tasks are tracked consistently while maintaining oversight of the virtual economy.
Sources: GLOSSARY.md:76-105