Skip to content

feat: implement daily sadhana streak and consistency tracker #4

@nitishchaubeyy

Description

@nitishchaubeyy

📝 Problem Statement

Spiritual progress is all about consistency (Nirantarata). We need a visual way to show users how many consecutive days they have logged their Japs.

🚀 Proposed Solution

Implement a "Streak" counter that increments every day the user logs at least 1 Jap and resets if a day is missed.

Key Changes:

  • Database: Add last_logged_date and current_streak columns to the profiles table.
  • Logic: - If (today - last_logged_date) == 1 day, then current_streak += 1.
    • If (today - last_logged_date) > 1 day, then current_streak = 1.
  • UI: Add a Flame Icon (🔥) with the streak number on the Dashboard Header.

✅ Acceptance Criteria

  • Streak updates automatically upon the first Jap log of the day.
  • Visual indicator (Flame/Streak) motivates the user to maintain consistency.
  • Historical streak data is saved to show "Longest Streak Ever".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions