-
Notifications
You must be signed in to change notification settings - Fork 52
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestfrontendtypescripttechnology appliedtechnology applied
Description
Description
Implement the streak tracking system logic, including persistence, updates, and timezone-safe calculations.
- API Endpoints
- GET /streaks
- POST /streaks/update
Database Schema
- Streaks
- userId
- currentStreak
- longestStreak
- lastActivityDate
- streakDates[]
Scope of Work
- Backend Logic
- Increment streak on consecutive-day completion
- Reset streak if a day is missed
- Track longest streak
- Handle timezone-safe date comparisons
- Frontend Streak Feature
- StreakProvider or useStreak()
- Fetch streak data
- Update streak after daily quest completion
- Expose data to UI layer
- Suggested State Shape
{
currentStreak: number;
longestStreak: number;
streakDates: string[];
isLoading: boolean;
updateStreak(): Promise<void>;
}Requirements
- Persistent streak storage
- Accurate date handling
- No duplicate updates per day
- UI consumes streak data via context only
Acceptance Criteria
- Streak increments correctly
- Streak resets on missed days
- Weekly calendar reflects backend data
- Longest streak tracked
- Data persists across sessions
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestfrontendtypescripttechnology appliedtechnology applied