Lifehub Life Management — Feature Expansion Plan

Version: 1.0
Date: February 2026
Status: Draft — Awaiting Approval
Author: AI Architect


Executive Summary

Lifehub currently excels at family finance management. This plan expands it into a full life management platform by introducing five new feature pillars: Sports & Fitness, Construction Management, Tools & Utilities, Habit Tracker, and Gamification. Each feature follows the existing multi-tenant architecture (Organization/Membership scoping), uses Hotwire + Tailwind dark-first design, and integrates with the existing navigation system.

The platform evolves from Lifehub into a comprehensive Life Management System — finances, fitness, habits, projects, and daily life tools, all in one place, for individuals and families.


Current State

  • Navbar (desktop): Logo Finance Dropdown (center) Actions (right)
  • Sidebar (mobile): Drawer with Finance links
  • Footer Nav (mobile): 5 quick-access items

Proposed Navigation

The navbar center area evolves from a single "Finance" dropdown into multiple top-level dropdowns:

Position Dropdown Contains
1 Finances Dashboard, Accounts, Expenses, Construction, Goals, Investments, Liquidity, Analytics, Simulator, Planning
2 Sports Dashboard, Workouts, Activities, Stats
3 Habits Dashboard, Habits, Calendar, Streaks
4 Tools Birthdays, Market List, Notes, Converter, Countdowns
5 Gamification (integrated) Profile Badge, Leaderboard, Achievements

The mobile sidebar groups these same sections with collapsible headers. The mobile footer nav updates to show the most-used items across all pillars.

Each dropdown uses the same finance-dropdown Stimulus controller pattern (renamed to a generic nav-dropdown controller), with hover-to-open on desktop and tap-to-toggle on mobile.


1. Sports & Fitness

Vision

A comprehensive fitness tracker that records workout sessions, tracks exercises with sets/reps/weight, supports multiple sport types, and provides progress analytics — all shareable within a family organization.

1.1 Sport Types

Users can track different sport activities. Each sport type has its own characteristics:

Sport Tracking Model Key Metrics
Gym / Weight Training Session → Exercises → Sets (reps × weight) Volume (kg), PR tracking, muscle group balance
Tennis Match-based (opponent, score, surface, duration) Win rate, match history, surface performance
Running Distance, duration, pace, route (optional) Pace trends, distance milestones, personal records
Swimming Laps, stroke type, pool length, duration Lap count, endurance progression
Cycling Distance, duration, elevation, avg speed Speed progression, distance milestones
Soccer/Football Match-based (teams, score, position played, duration) Games played, goals/assists tracked optionally
Martial Arts Session-based (type, duration, techniques, sparring) Belt/rank progression, session frequency
Yoga / Stretching Session-based (type/style, duration, poses) Flexibility progress, session consistency
Custom Sport User-defined fields Flexible tracking

The system ships with the above preset sport types but allows users to create custom sports with their own tracking fields. This avoids being overly rigid while providing excellent defaults.

1.2 Gym Workouts — Deep Dive

Since gym workouts are the most data-rich sport type, they deserve a detailed breakdown:

1.2.1 Workout Templates

Users can create reusable workout templates (routines) that pre-fill exercises when starting a session:

  • Template Name: e.g., "Push Day", "Pull Day", "Leg Day", "Full Body A"
  • Exercise List (ordered): Each exercise in the template with target sets, reps, and rest time
  • Split Assignment: Optionally assign templates to a weekly split (Mon = Push, Tue = Pull, etc.)
  • System Presets: Ship with common templates (PPL, Upper/Lower, Full Body, 5×5) that users can clone and customize

1.2.2 Exercises Library

A comprehensive exercise database:

  • Pre-loaded exercises: ~100 common exercises (Bench Press, Squat, Deadlift, Pull-ups, etc.)
  • Custom exercises: Users can add their own exercises
  • Attributes per exercise:
    • Name
    • Primary muscle group (Chest, Back, Shoulders, Arms, Legs, Core, Full Body)
    • Secondary muscle groups
    • Equipment required (Barbell, Dumbbell, Machine, Bodyweight, Cable, Band)
    • Exercise type (Compound, Isolation, Cardio, Flexibility)
    • Instruction notes (optional)
    • Demo image/icon (optional — emoji or uploaded)

1.2.3 Workout Session Flow

When a user starts a workout:

  1. Start Session — Choose a template or start empty, auto-timestamp
  2. Log Exercises — For each exercise:
    • Add sets: reps × weight (kg/lbs) → e.g., 12 × 80kg
    • Mark set as: Normal, Warm-up, Drop set, Failure, PR (personal record)
    • Rest timer between sets (configurable, default 90s)
    • Notes per exercise (optional)
  3. Live Session View — Shows elapsed time, exercises completed, total volume
  4. Finish Session — Auto-calculate session summary:
    • Total duration
    • Total volume (sets × reps × weight)
    • Number of exercises / sets
    • PRs hit
    • Muscle groups targeted (auto-derived from exercises)
  5. Session Rating — Optional: energy level (1-5), mood (1-5), session difficulty (1-5)

1.2.4 Workout Analytics

  • Volume Progression Chart: Weekly/monthly total volume over time (line chart)
  • Exercise PR History: Track personal records per exercise with date markers
  • Muscle Group Heatmap: Visual body map showing which muscles were trained this week/month (frequency + volume)
  • Session Frequency: Calendar heatmap (GitHub-style) showing workout consistency
  • Body Metrics Tracking (optional): Weight, body fat %, measurements (arms, chest, waist) logged periodically — line chart progressions
  • Workout Split Adherence: Did the user follow their planned split this week?

1.3 Activities Log (Non-Gym Sports)

For sports like Tennis, Running, Swimming, etc.:

  • Quick Log: Sport type, date, duration, intensity (1-5)
  • Sport-Specific Fields: Each sport type shows relevant fields (e.g., Tennis shows opponent + score + surface; Running shows distance + pace)
  • Session Notes: Free-text notes
  • Photo Attachment: Optional session photo (via Active Storage)

1.4 Sports Dashboard

The Sports Dashboard provides an at-a-glance view:

  • Weekly Activity Summary: Total sessions, total duration, calories estimate
  • This Week's Schedule: Template-based planned workouts vs. completed (visual checkmarks)
  • Recent Sessions: Last 5 sessions with quick stats
  • Streak Counter: Current workout streak (consecutive days/weeks with activity)
  • Monthly Comparison: This month vs. last month (sessions, volume, duration)
  • Muscle Group Balance: Radar/spider chart showing training distribution across muscle groups
  • Personal Records Board: Recent PRs with confetti animation on new ones

1.5 Family/Shared Features

In family organizations:

  • Shared Templates: Family members can share workout templates
  • Family Activity Feed: See when family members complete workouts (opt-in privacy)
  • Friendly Comparisons: Compare weekly stats between family members (opt-in)
  • Workout Buddies: Tag a family member as your workout partner for a session

1.6 Data Model Summary

Entity Key Fields Relationships
Sport name, sport_type (enum), icon, color, custom_fields (JSON) belongs_to :organization, :membership
WorkoutTemplate name, sport_id, exercises_config (JSON), split_day, position belongs_to :organization, :membership, :sport
Exercise name, muscle_group, secondary_muscles, equipment, exercise_type, instructions belongs_to :organization (or global)
WorkoutSession sport_id, template_id, started_at, finished_at, duration, rating (JSON), notes belongs_to :organization, :membership, :sport
WorkoutSet workout_session_id, exercise_id, set_number, reps, weight, set_type, rest_seconds belongs_to :workout_session, :exercise
ActivityLog sport_id, date, duration, intensity, sport_data (JSON), notes belongs_to :organization, :membership, :sport
BodyMetric date, weight, body_fat, measurements (JSON) belongs_to :organization, :membership

2. Construction Expenses

Vision

A dedicated construction/renovation project tracker nested inside the Finances dropdown. Tracks expenses per construction project, with phases, budgets, contractor management, and progress visualization — purpose-built for home renovation and construction cost management.

2.1 Why a Separate Module?

Regular expenses track ongoing monthly costs (groceries, utilities). Construction expenses are fundamentally different:

  • Project-based: Have a defined start, end, and total budget
  • Phase-organized: Foundation → Structure → Electrical → Plumbing → Finishing
  • Contractor-linked: Payments tied to specific contractors/suppliers
  • Progress-tracked: Budget consumed vs. remaining, timeline adherence
  • Comparison-ready: Planned cost vs. actual cost per phase

2.2 Construction Projects

Each construction project represents one build or renovation:

  • Project Name: e.g., "Kitchen Renovation 2026", "Apartment Build"
  • Project Type: New Build, Renovation, Repair, Extension, Interior Design
  • Status: Planning, In Progress, On Hold, Completed
  • Budget: Total planned budget (with currency — BRL/USD)
  • Timeline: Planned start date, planned end date, actual start, actual end
  • Address/Location: Optional location descriptor
  • Description: Purpose and scope notes
  • Cover Photo: Optional project photo (Active Storage)

2.3 Construction Phases

Each project is divided into phases (user-configurable, with sensible defaults):

Default Phases for New Build:

  1. 📋 Planning & Permits (Planejamento e Documentação)
  2. 🏗️ Foundation (Fundação)
  3. 🧱 Structure (Estrutura)
  4. ⚡ Electrical (Elétrica)
  5. 🔧 Plumbing (Hidráulica)
  6. 🏠 Roofing (Cobertura)
  7. 🎨 Finishing (Acabamento)
  8. 🪑 Furnishing (Mobiliário)
  9. 🌳 Landscaping (Paisagismo)
  10. ✅ Final Inspection (Vistoria Final)

Default Phases for Renovation:

  1. 📋 Planning (Planejamento)
  2. 🔨 Demolition (Demolição)
  3. 🧱 Structural Changes (Mudanças Estruturais)
  4. ⚡ Electrical & Plumbing (Elétrica e Hidráulica)
  5. 🎨 Finishing (Acabamento)
  6. 🪑 Furnishing & Decoration (Mobiliário e Decoração)
  7. ✅ Punch List (Lista de Pendências)

Each phase has:

  • Name, icon/emoji, position (sortable)
  • Planned budget (sub-budget of project total)
  • Status: Not Started, In Progress, Completed
  • Start/end dates
  • Completion percentage (auto-calculated from expenses vs. budget, or manually set)

2.4 Construction Expenses

Individual expenses within a phase:

  • Description: What was purchased/paid
  • Amount: Cost in BRL or USD (with exchange rate conversion)
  • Date: Payment date
  • Phase: Which construction phase this belongs to
  • Category: Material, Labor, Permit/Fee, Equipment Rental, Professional Service, Delivery, Other
  • Contractor/Supplier: Free-text or saved contact reference
  • Payment Method: Cash, PIX, Credit Card, Bank Transfer, Financing
  • Status: Paid, Pending, Overdue
  • Receipt: Optional file attachment (photo of receipt/invoice)
  • Notes: Additional context

2.5 Contractor/Supplier Directory

A simple contact book for the construction project:

  • Name
  • Role/Trade: Electrician, Plumber, Architect, Engineer, Mason, Painter, General Contractor, Supplier
  • Phone / WhatsApp
  • Email (optional)
  • Notes: "Only works weekdays", "Best price for tiles", etc.
  • Total Paid: Auto-calculated from expenses linked to this contractor

2.6 Construction Dashboard

The main view for a construction project:

  • Budget Health Bar: Horizontal progress bar showing budget consumed vs. remaining (green → yellow → red)
  • Phase Progress View: Vertical stepper/timeline showing all phases with:
    • Status indicator (not started / in progress / completed)
    • Budget: planned vs. spent per phase
    • Phase completion percentage
  • Expense Timeline: Chronological feed of recent expenses with amounts
  • Budget Breakdown Donut Chart: Spending by category (Material, Labor, Permits, etc.)
  • Planned vs. Actual Comparison: Side-by-side or overlaid bar chart per phase
  • Alerts:
    • ⚠️ Phase over budget
    • ⚠️ Project approaching budget limit (>80%)
    • 🔴 Project over budget
    • ⏰ Phase timeline overrun

2.7 Construction Analytics

  • Cash Flow Timeline: Line chart showing cumulative spending over time vs. planned spending curve
  • Cost Per Square Meter: If area is provided, auto-calculate cost/m²
  • Category Breakdown Over Time: Stacked area chart
  • Contractor Payment Summary: Table with total paid per contractor, % of budget
  • Monthly Spending Breakdown: How much was spent per month on the project

2.8 Multi-Project Support

Users can have multiple construction projects (e.g., main home + vacation house). The Construction index page shows:

  • Project cards with thumbnail, name, budget health, phase progress, and dates
  • Aggregate stats across all projects: total invested, total remaining budget
  • Quick-add button for new projects

2.9 Integration with Main Finances

  • Construction expenses optionally sync to the main Expenses module under a special "Construction" category
  • The Finance Dashboard can show a "Construction" summary card if active projects exist
  • Budget tracking uses the same currency/exchange rate system as the rest of Lifehub

2.10 Data Model Summary

Entity Key Fields Relationships
ConstructionProject name, project_type (enum), status (enum), budget, currency, planned_start, planned_end, actual_start, actual_end, address, description belongs_to :organization, :membership
ConstructionPhase name, icon, position, planned_budget, status (enum), start_date, end_date, completion_pct belongs_to :construction_project
ConstructionExpense description, amount, date, category (enum), payment_method, status (enum), contractor_name, notes belongs_to :construction_project, :construction_phase, :membership
Contractor name, trade, phone, email, notes belongs_to :construction_project

3. Tools & Utilities

Vision

A Swiss Army knife tab with everyday life tools that don't fit into Finance or Fitness — practical utilities that a family uses daily. Each tool is a self-contained mini-feature within the Tools namespace.

3.1 Birthdays & Important Dates

A centralized calendar for dates you can't afford to forget.

Features

  • Add Important Dates:
    • Person name
    • Date (day + month, year optional for recurring like birthdays)
    • Type: Birthday, Anniversary, Holiday, Commemoration, Deadline, Custom
    • Relationship: Family, Friend, Work, Other
    • Recurring: Yes (annual) / No (one-time)
    • Reminder: 1 day before, 3 days before, 1 week before, custom
    • Gift ideas (free text, e.g., "Books, Electronics, Wine")
    • Notes
  • Dashboard View:
    • Upcoming Section: Next 30 days of events, sorted by date, with countdown ("in 5 days")
    • Today's Celebrations: Highlighted card if someone's date is today (confetti animation!)
    • This Month Calendar: Monthly calendar view with dots on event days
    • Age Calculator: If birth year provided, show current age and turning age
  • Yearly Overview:
    • 12-month grid with event counts per month
    • Visual "birthday density" — busy months highlighted
    • Export to iCal / Google Calendar (.ics file download)
  • Smart Notifications:
    • Push notification (in-app bell) on configured reminder days
    • Optional email reminder
    • "X is turning Y tomorrow!" format
  • Family Sharing:
    • In family orgs, all members see the same important dates
    • Member attribution: who added which date
    • Gift coordination: "I'm getting them X" to avoid duplicate gifts (family-visible notes)

3.2 Market List (Shopping List)

A collaborative, shareable shopping list with smart features.

Features

  • Multiple Lists: Grocery, Hardware Store, Pharmacy, Online Shopping, Custom
  • List Items:
    • Item name
    • Quantity (optional, with unit: kg, L, units, packs)
    • Category: Produce, Dairy, Meat, Bakery, Beverages, Cleaning, Hygiene, Frozen, Snacks, Other
    • Priority: Normal, Urgent
    • Estimated price (optional)
    • Checked/unchecked state
    • Notes (e.g., "Brand X preferred")
  • Smart Features:
    • Auto-categorize: Group items by category visually (Produce section, Dairy section, etc.)
    • Quick-add bar: Type item name at top, press Enter to add (no modal needed, inline)
    • Check-off animation: Satisfying strikethrough + fade when checking items
    • Total estimator: If prices are entered, show estimated total vs. budget
    • Recurring items: Mark items as "weekly staples" — auto-add to new lists
    • History: Keep completed lists as "Past Purchases" for quick re-shopping
    • Smart Suggestions: Based on purchase history, suggest commonly bought items ("You usually buy milk — add it?")
  • Family Collaboration (Real-Time):
    • In family orgs, the shopping list is shared in real-time via Turbo Streams / Action Cable
    • Multiple family members can add/check items simultaneously
    • See who added each item (small avatar/initials badge)
    • "Someone is shopping" indicator when a member starts checking items
  • UX Details:
    • Drag-and-drop item reordering (within categories)
    • Swipe-to-check on mobile (Stimulus gesture controller)
    • Category color coding (green for Produce, blue for Dairy, etc.)
    • Empty state: friendly illustration with "Your list is empty — time to plan your meals!"

3.3 Quick Notes / Scratchpad

A lightweight note-taking tool for quick thoughts and lists.

  • Simple, fast, no friction: One-click to create a note
  • Note Types: Plain text, Checklist (todo-style), Markdown
  • Pinned Notes: Pin important notes to the top
  • Color coding: 8 note colors (like Google Keep: yellow, green, blue, pink, purple, orange, teal, gray)
  • Search: Full-text search across all notes
  • Archive: Soft-delete to archive, restorable
  • Family sharing: Toggle notes as private (only you) or shared (family-visible)
  • Auto-save: Debounced auto-save as you type (via Stimulus debounce controller)
  • Markdown preview: Toggle between edit and preview mode

3.4 Currency Converter

Since Lifehub already handles BRL/USD, extend it into a standalone utility:

  • Quick Convert: Enter an amount in one currency, see it in the other instantly
  • Supported pairs: BRL ↔ USD (using the already-fetched exchange rate)
  • Historical rates: Show rate trend for last 30/90/365 days (line chart)
  • Favorite conversions: Save common amounts for quick reference ("5000 BRL = ? USD")
  • Rate alerts: Notify when the rate crosses a threshold (already partially exists in finance settings)

3.5 Countdown Timers

Track countdowns to important events:

  • Event Name: "Vacation to Japan", "Wedding", "Baby Due Date"
  • Target Date: Date and optional time
  • Display: Days (+ hours/minutes if < 7 days) remaining
  • Visual Style: Card with gradient background, large countdown number
  • Dashboard Widget: Show top 3 countdowns on the Tools dashboard
  • Celebration: Confetti when countdown reaches zero!
  • Recurring: Option to auto-reset annually (e.g., "Christmas countdown")

3.6 Password / Sensitive Info Vault (Stretch Goal)

A simple encrypted vault for storing sensitive information:

  • Entries: Title, username, password (encrypted), URL, notes, category
  • Categories: Email, Banking, Social Media, Streaming, Shopping, Work, Other
  • Security: Requires re-authentication (password confirmation) to view entries
  • Copy to clipboard: One-click copy for passwords (with auto-clear after 30s)
  • No external dependencies: Uses Rails encrypted attributes, not a third-party password manager

Note: This is a stretch goal — evaluate security implications carefully before implementing. This is a convenience tool, not a replacement for dedicated password managers.

3.7 Tools Dashboard

The Tools landing page shows:

  • Upcoming Dates Card: Next 5 birthdays/events with countdown
  • Active Shopping Lists: Quick-access to current lists with item counts
  • Pinned Notes: Top 3 pinned notes preview
  • Active Countdowns: Top 3 countdown timers
  • Quick Actions: Buttons to add a new date, create a list, write a note

3.8 Data Model Summary

Entity Key Fields Relationships
ImportantDate person_name, date, date_type (enum), relationship, recurring, reminder_days, gift_ideas, notes belongs_to :organization, :membership
ShoppingList name, list_type (enum), status (active/completed), estimated_total belongs_to :organization, :membership
ShoppingItem name, quantity, unit, category, priority, estimated_price, checked, position, notes belongs_to :shopping_list
Note title, body, note_type (enum), color, pinned, archived, shared belongs_to :organization, :membership
Countdown name, target_date, description, recurring, icon, color belongs_to :organization, :membership

4. Habit Tracker

Vision

A daily habit tracking system inspired by apps like Streaks, Habitica, and Loop Habit Tracker — focusing on consistency, streaks, and visual progress. Deeply integrated with the Gamification system (Section 5) to reward habit consistency.

4.1 Core Concept

A habit is a recurring action the user wants to do consistently. The system tracks daily completions and visualizes consistency patterns over time.

4.2 Habit Definition

When creating a habit:

  • Name: e.g., "Drink 2L of water", "Read for 30 minutes", "Meditate"
  • Icon / Emoji: Visual identifier (picker with common emojis + custom)
  • Color: Theme color for the habit (8-color palette)
  • Frequency:
    • Daily (every day)
    • Specific days (Mon, Wed, Fri)
    • X times per week (e.g., 3 times per week, any day)
    • X times per month
  • Tracking Type:
    • Yes/No (binary: did it or didn't)
    • Numeric (e.g., "Glasses of water: 8", "Pages read: 30")
    • Duration (e.g., "Meditation: 15 min")
  • Target Value (for numeric/duration): The goal number to hit daily
  • Reminder Time: Optional push notification at a specific time (e.g., 7:00 AM for morning routine)
  • Category: Health, Fitness, Learning, Productivity, Mindfulness, Finance, Social, Custom
  • Start Date: When to start tracking (default: today)
  • Notes: Why this habit matters to you (motivation/purpose)

4.3 Daily Check-In

The primary interface is a daily check-in view:

  • Today's Habits: Grid or list of all active habits for today
  • Quick Toggle: Tap/click to mark as done (satisfying animation — checkmark, color fill, micro-confetti)
  • Numeric Input: For numeric habits, tap opens a quick number input
  • Progress Ring: Circular progress indicator showing "X of Y habits done today"
  • Completion Celebration: When all daily habits are done, show a celebration animation and encouraging message
  • Undo: Ability to un-check within the same day

4.4 Streak System

Streaks are the core motivator:

  • Current Streak: Consecutive days/occurrences the habit was completed
  • Best Streak: All-time longest streak (with date range)
  • Streak Protection:
    • "Rest days" — mark specific days as intentional rest (doesn't break streak)
    • "Freeze" — one free pass per week/month to skip without breaking streak (configurable)
  • Streak Milestones: Visual badges at 7, 14, 21, 30, 60, 90, 180, 365 days
  • Streak Recovery: If broken, show "previous best was X days" as motivation to restart
  • Streak at Risk: Warning notification if the day is ending and a habit isn't checked off

4.5 Visualizations

Calendar Heatmap (Primary View)

GitHub-style contribution heatmap per habit:

  • 365-day grid with color intensity based on completion
  • Color gradient: empty → light → medium → dark (using the habit's color)
  • Hover/tap shows date and value

Weekly View

  • 7-column grid showing habit completion for the current week
  • Quick comparison: this week vs. last week
  • "Best day" and "weakest day" indicators

Monthly View

  • Traditional calendar grid with check marks
  • Monthly completion percentage
  • Trend arrow (improving, declining, stable)

Statistics Cards

  • Completion Rate: Overall % of expected completions actually done
  • Current Streak: With milestone indicator
  • Total Completions: All-time count
  • Best Day of Week: Which day you're most consistent
  • Consistency Score: 0-100 score based on recent 30-day performance

Trend Charts

  • Weekly Completion Rate: Line chart showing % completion per week over last 12 weeks
  • Habit Correlation: Which habits are often completed together (insights)

4.6 Habit Categories & Grouping

  • Group habits into Morning Routine, Evening Routine, Health, Fitness, etc.
  • Collapsible sections in the daily view
  • Category-level stats (e.g., "Your Health habits are at 85% this month")

4.7 Habit Templates

Pre-built habit packs users can install with one click:

  • Morning Routine: Wake up early, Drink water, Meditate, Journal, Exercise
  • Health & Fitness: Gym workout, 10k steps, Drink 2L water, Eat clean, Sleep 8h
  • Productivity: Deep work 2h, Read 30min, No social media until noon, Plan tomorrow
  • Finance: Review expenses, No impulse buys, Check investment portfolio
  • Mindfulness: Meditate, Gratitude journal, Digital detox 1h, Walk in nature
  • Family: Family dinner, Play with kids, Date night (weekly), Call parents

4.8 Archiving & Lifecycle

  • Pause Habit: Temporarily suspend without losing streak data (e.g., on vacation)
  • Archive Habit: Stop tracking, keep all historical data viewable
  • Retire Habit: Mark as "mastered" — the habit is now second nature (special badge!)

4.9 Family Features

In family organizations:

  • Shared Habits: Create habits the whole family tracks together (e.g., "Family walk after dinner")
  • Accountability Partners: Pair with a family member — they get notified of your check-ins
  • Family Completion Board: See who completed their daily habits (encouraging, not shaming)
  • Shared Streaks: Family-wide streak counter for shared habits

4.10 Habit Dashboard

The Habit Tracker landing page:

  • Today's Progress: Ring chart showing X/Y habits done
  • Active Streaks: Top habits by current streak with flame icons
  • Weekly Overview: 7-day mini heatmap for each habit
  • Habits at Risk: Habits not done today that are nearing streak-break time
  • Monthly Report Card: Auto-generated summary of the month's habits performance
  • Motivational Quote: Rotating motivational quotes (optional, toggleable)

4.11 Data Model Summary

Entity Key Fields Relationships
Habit name, icon, color, frequency (enum), tracking_type (enum), target_value, reminder_time, category, status (active/paused/archived/mastered), start_date, notes, position belongs_to :organization, :membership
HabitCompletion date, value (numeric/boolean), notes belongs_to :habit
HabitStreak habit_id, start_date, end_date, length, current (boolean) belongs_to :habit
HabitTemplate name, description, category, habits_config (JSON) global or belongs_to :organization

5. Gamification System

Vision

A cross-cutting gamification layer that spans ALL features in the platform — Finances, Sports, Habits, and Tools. The goal is to make mundane tasks feel rewarding, encourage consistency, and create friendly competition within families. This is not a separate "tab" but an integrated system that enriches every existing feature.

5.1 Experience Points (XP) System

Every meaningful action earns XP:

Finance XP

| Action | XP | Notes | |——–|—–|——-| | Log an expense | +5 | Keeping records = good | | Log all expenses for the month | +50 | Monthly completion bonus | | Update account balances | +10 | | | Create a balance registry | +15 | Monthly financial snapshot | | Reach a savings goal | +100 | Major milestone | | Add a goal contribution | +10 | Progress toward goals | | Review analytics | +5 | Staying informed | | Run a simulation | +10 | Planning ahead | | Stay under monthly budget | +75 | Financial discipline | | 3-month budget streak | +200 | Consistency rewarded | | Net worth increase (monthly) | +50 | Wealth building |

Sports XP

| Action | XP | Notes | |——–|—–|——-| | Complete a workout | +20 | | | Log any sport activity | +15 | | | Hit a personal record (PR) | +50 | New best! | | Complete weekly workout plan | +75 | Adherence bonus | | 7-day workout streak | +100 | Consistency | | 30-day workout streak | +300 | Dedication | | Try a new sport type | +25 | Variety bonus | | Complete body metrics log | +10 | Tracking progress |

Habit XP

| Action | XP | Notes | |——–|—–|——-| | Complete a habit | +5 | Per habit | | Complete ALL daily habits | +25 | Daily perfection bonus | | 7-day streak on any habit | +50 | | | 21-day streak (habit formed!) | +150 | Science says 21 days = habit | | 30-day streak | +200 | | | 90-day streak | +500 | | | 365-day streak | +2000 | Legendary! | | Master a habit (retire) | +300 | It's second nature now |

Tools XP

| Action | XP | Notes | |——–|—–|——-| | Add a birthday/important date | +5 | Organized life | | Complete a shopping list | +10 | Got it done | | Remember a birthday (on time!) | +15 | You didn't forget | | Write a note | +3 | Capturing thoughts |

5.2 Levels

XP accumulates into levels. Levels use a progressive scale (each level requires more XP):

Level Title XP Required Cumulative XP
1 Padawan 0 0
2 Apprentice 100 100
3 Initiate 200 300
4 Practitioner 350 650
5 Adept 500 1,150
10 Specialist 1,000 5,400
15 Expert 1,500 12,900
20 Master 2,000 23,900
25 Grand Master 2,500 38,150
30 Sage 3,000 55,650
40 Legend 4,000 101,650
50 Transcendent 5,000 163,150
  • Level-up Animation: Celebratory modal with particle effects when leveling up
  • Profile Badge: Current level displayed in navbar profile area and on all shared views
  • Level Progress Bar: Always visible in sidebar or profile, showing current progress to next level

5.3 Achievement System

Achievements are one-time unlockable badges for specific milestones. Organized by category:

🏦 Finance Achievements

| Badge | Name | Requirement | |——-|——|————-| | 🌱 | First Seed | Create your first savings goal | | 💰 | Six Figures | Net worth reaches R$ 100,000 | | 🏆 | Goal Crusher | Complete 5 financial goals | | 📊 | Data Nerd | View analytics 30 days in a row | | 🎯 | Budget Master | Stay under budget 6 months in a row | | 💎 | Millionaire | Net worth reaches R$ 1,000,000 | | 📈 | Bull Market | Portfolio gains 20%+ in a year | | 🏠 | Property Owner | Track a real estate investment | | 🌍 | Global Investor | Have both BRL and USD accounts | | 🔄 | Consistent Saver | Add goal contributions 12 months in a row |

💪 Sports Achievements

| Badge | Name | Requirement | |——-|——|————-| | 🏋️ | First Rep | Complete your first workout | | 🔥 | On Fire | 7-day workout streak | | 💪 | Iron Will | 30-day workout streak | | 🏅 | PR Machine | Hit 10 personal records | | 🎾 | Multi-Sport | Track 3+ different sport types | | 🗓️ | Century Club | Complete 100 workouts | | 🏆 | Olympian | Complete 365 workouts | | ⚡ | Volume King | Lift 100,000 kg total volume | | 🏃 | Marathon Runner | Log 42.2+ km in running | | 🧘 | Zen Master | 30 yoga/meditation sessions |

✅ Habit Achievements

| Badge | Name | Requirement | |——-|——|————-| | ✨ | Day One | Complete your first habit | | 🔗 | Chain Maker | 7-day streak on any habit | | 🧠 | Habit Formed | 21-day streak | | 🌟 | Consistency King | 90-day streak | | 👑 | Year of Discipline | 365-day streak | | 🎯 | Perfectionist | Complete all habits for 7 days straight | | 📦 | Habit Collector | Track 10+ active habits | | 🏅 | Mastery | Retire (master) 3 habits |

🛠️ Life Achievements

| Badge | Name | Requirement | |——-|——|————-| | 🎂 | Memory Keeper | Add 20+ important dates | | 🛒 | Shopping Pro | Complete 50 shopping lists | | 👨‍👩‍👧‍👦 | Family Manager | Have 3+ family members | | 🌙 | Night Owl | Log activities after 11 PM | | ☀️ | Early Bird | Log activities before 7 AM | | 📱 | Power User | Use the app 100 days | | 🌈 | Whole Life | Use all 4 feature areas (Finance + Sports + Habits + Tools) |

Achievement Display

  • Achievement Cabinet: Dedicated page showing all achievements in a grid (unlocked in color, locked grayed out with "?")
  • Progress Tracking: For achievable-by-degree badges, show progress (e.g., "15/100 workouts")
  • Rarity System: Common, Uncommon, Rare, Epic, Legendary — based on what percentage of users have it
  • Toast Notification: Pop-up notification when an achievement is unlocked
  • Share (optional): Share achievement on family feed

5.4 Challenges

Time-limited challenges that encourage specific behaviors:

Weekly Challenges (Auto-Generated)

  • "Complete 5 workouts this week" (+100 XP bonus)
  • "Log all expenses for 7 days" (+75 XP bonus)
  • "Complete all habits 5 out of 7 days" (+80 XP bonus)
  • "Stay under daily budget every day" (+60 XP bonus)

Monthly Challenges

  • "Savings Sprint" — Save X amount this month (+200 XP)
  • "Fitness Month" — 20 workouts in 30 days (+300 XP)
  • "Perfect Month" — Complete all habits every day (+500 XP)
  • "No Impulse Buys" — Zero unplanned expenses over R$100 (+150 XP)

Family Challenges

  • "Family Fitness Week" — Combined family workout total reaches X
  • "Budget Heroes" — Family stays under combined budget
  • "Habit Squad" — All family members complete shared habits for 7 days

Challenge Interface

  • Active challenges shown on main dashboard and feature dashboards
  • Progress bar with time remaining
  • Reward preview (XP amount + optional badge)
  • History of completed/failed challenges

5.5 Leaderboard (Family Organizations)

A friendly competition board for family organizations:

  • Total XP Ranking: All-time XP by family member
  • Weekly XP: This week's most active member
  • Monthly XP: Monthly rankings with trend arrows
  • Category Leaders: Top member per area (Finance, Sports, Habits)
  • Streak Leader: Who has the longest active streak
  • Avatars & Levels: Show profile picture, current level, and level badge

Important Design Principles:

  • Framed as motivation, not competition
  • "Family activity" rather than "rankings"
  • No punitive mechanics — only positive reinforcement
  • Option to hide leaderboard if it feels stressful
  • Celebrate everyone's progress, not just the leader

5.6 Profile & Stats Page

Each user gets an enhanced profile page showing:

  • Level + XP Bar: Current level, progress to next level
  • Total XP Breakdown: Pie chart showing XP earned per category
  • Achievement Showcase: User-selected "featured" badges (3-5 pinned achievements)
  • All-Time Stats:
    • Days active
    • Total habits completed
    • Total workouts logged
    • Financial goals achieved
    • Shopping lists completed
  • Recent Activity Feed: Last 20 XP-earning actions
  • Member Since: With tenure badge (1 month, 6 months, 1 year, etc.)

5.7 Visual Reward Cues

Subtle gamification touches woven into existing UI:

  • Micro-animations: Confetti burst when completing goals, checkmarks bounce when checking habits
  • Sound effects (optional): Subtle click/ding on completions (toggleable in settings)
  • Streak flames: 🔥 icon with growing intensity (bigger flame for longer streaks)
  • Progress bars everywhere: Level XP bar in sidebar, habit progress rings, goal progress, challenge progress
  • Color progression: Streaks go from blue (cool) → orange (warm) → red (hot) → purple (on fire) as they grow
  • Daily summary notification: "You earned 85 XP today! Level 12 — 340 XP to Level 13"

5.8 Settings & Privacy

User-configurable gamification settings:

  • Enable/Disable Gamification: Some users may not want it — respect that
  • Show/Hide XP Notifications: Toggle XP pop-ups
  • Show/Hide Level Badge: Toggle public level display
  • Leaderboard Participation: Opt in/out of family leaderboard
  • Achievement Notifications: Toggle achievement toasts
  • Sound Effects: On/Off

5.9 Data Model Summary

Entity Key Fields Relationships
GamificationProfile total_xp, level, finance_xp, sports_xp, habits_xp, tools_xp, featured_achievements (JSON) belongs_to :membership
XpTransaction amount, source_type (polymorphic), source_id, category (enum), description belongs_to :membership
Achievement key (unique), name, description, icon, category, rarity, requirement_type, requirement_value global (seeded)
UserAchievement unlocked_at belongs_to :membership, :achievement
Challenge name, description, challenge_type, target_value, xp_reward, start_date, end_date, scope (personal/family) belongs_to :organization (optional)
ChallengeParticipation progress, status (active/completed/failed) belongs_to :challenge, :membership

6. Implementation Priority & Phasing

Phase 1 — Foundation (Weeks 1-4)

Goal: Navigation restructure + one complete feature

  1. Navigation Refactor — Restructure navbar to support multiple top-level dropdowns
  2. Habit Tracker (MVP) — Highest impact, daily engagement driver
    • Habit CRUD, daily check-in, basic streaks, weekly heatmap
  3. Gamification Foundation — XP system, levels, basic profile
    • XP transactions, level calculation, sidebar level badge

Phase 2 — Fitness & Tools (Weeks 5-10)

Goal: Sports module + essential tools

  1. Sports — Gym Core — Workout sessions, exercises, sets/reps, session history
  2. Sports — Activity Log — Non-gym sport types (tennis, running, etc.)
  3. Tools — Birthdays — Important dates with reminders
  4. Tools — Market List — Collaborative shopping lists

Phase 3 — Depth & Polish (Weeks 11-16)

Goal: Analytics, gamification depth, construction

  1. Sports Analytics — Charts, PRs, muscle heatmap
  2. Habit Analytics — Calendar heatmap, trend charts, monthly report
  3. Construction Module — Projects, phases, expenses
  4. Gamification — Achievements — Full achievement system with badges
  5. Gamification — Challenges — Weekly/monthly auto-generated challenges

Phase 4 — Social & Polish (Weeks 17-20)

Goal: Family features, polish, remaining tools

  1. Family Features — Leaderboards, shared habits, family challenges
  2. Tools — Notes — Quick notes / scratchpad
  3. Tools — Countdowns — Event countdown timers
  4. Sports — Templates — Workout templates, split planning
  5. UI Polish — Animations, celebrations, sound effects

7. Design Principles

  1. Dark-first: All new features follow the #0d1117 / #161b22 dark theme with light mode support
  2. Card-based layout: Consistent with existing rounded-xl card pattern with subtle borders
  3. Turbo-first interactions: Use Turbo Frames for modals, Turbo Streams for real-time updates
  4. Mobile-responsive: Every feature must work on mobile with the sidebar and bottom nav
  5. Celebratory micro-interactions: Make mundane actions feel rewarding (animations, confetti, XP pop-ups)
  6. Progressive disclosure: Show simple views by default, complexity on demand
  7. No friction daily use: Daily interactions (habit check-in, expense logging) must be < 3 taps
  8. Family-aware: Every feature considers both personal and family organization modes

8. Success Metrics

Metric Target How to Measure
Daily Active Usage 5+ min/day Session duration tracking
Habit Completion Rate >70% monthly HabitCompletion records
Workout Frequency 3+ sessions/week WorkoutSession records
Feature Adoption 60%+ users use 3+ pillars Cross-feature usage analysis
Family Engagement 80%+ family members active Membership activity
XP Earning Rate 50+ XP/day average XpTransaction records
Streak Retention 50%+ habits > 7-day streaks HabitStreak records

"Your focus determines your reality." — Qui-Gon Jinn

End of Plan — Version 1.0