Skip to content

feat: implement goal setting and progress tracking system (#2729)#3212

Open
geethika-sandireddy wants to merge 6 commits into
Priyanshu-byte-coder:mainfrom
geethika-sandireddy:main
Open

feat: implement goal setting and progress tracking system (#2729)#3212
geethika-sandireddy wants to merge 6 commits into
Priyanshu-byte-coder:mainfrom
geethika-sandireddy:main

Conversation

@geethika-sandireddy

Copy link
Copy Markdown

Summary

Implemented a comprehensive Goal Setting and Progress Tracking system that allows users to create, manage, and monitor their productivity goals with auto-sync from GitHub, visual progress indicators, and achievement tracking.

Closes #2729


Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing behavior)
  • 📝 Documentation update
  • ♻️ Refactor / code cleanup (no functional change)
  • ⚡ Performance improvement
  • 🔒 Security fix
  • 🧪 Tests only

What Changed

Components Added

  • src/components/GoalTracker.tsx - Main goal tracker widget with create/edit/delete functionality, progress bars, confetti animations, and goal sharing
  • src/components/GoalHistory.tsx - Past goals history display with completion/missed status tracking

API Endpoints Added

  • src/app/api/goals/route.ts - GET (fetch all goals), POST (create new goal)
  • src/app/api/goals/[id]/route.ts - PATCH (update goal), DELETE (remove goal)
  • src/app/api/goals/sync/route.ts - POST (sync goals from GitHub API)
  • src/app/api/goals/history/route.ts - GET (fetch goal history)
  • src/app/api/goals/suggestions/route.ts - GET (suggested goals based on activity)
  • src/app/api/goals/achievements/route.ts - GET (achievement badges)
  • src/app/api/goals/notify/route.ts - POST (send notifications)

Features Implemented

  • Custom goal creation with multiple unit types (commits, PRs, hours, streak, lines of code)
  • Recurrence support (one-time, weekly, monthly) with automatic reset
  • Auto-sync from GitHub for commit/PR based goals (every 15 minutes)
  • Visual progress indicators with animated progress bars
  • Goal sharing (public/private toggle with shareable links)
  • Achievement badges and completion notifications
  • Responsive design for mobile, tablet, desktop
  • Comprehensive error handling (rate limits, auth errors, network errors)
  • Input validation and duplicate prevention

How to Test

  1. Create a Goal:

    • Navigate to Goals widget
    • Click "Create goal"
    • Enter title, target, unit, optional deadline
    • Select recurrence (one-time/weekly/monthly)
    • Click "Create goal"
    • Verify goal appears in list
  2. Test Auto-Sync (Commits):

    • Create a goal with "Commits" as unit
    • Make a new commit on GitHub
    • Click "Refresh" button
    • Verify goal progress updates within 15 minutes
  3. Test Goal Completion:

    • Create goal with target=3
    • Manually increment progress to 3 (for non-auto-synced goals)
    • Verify confetti animation plays
    • Verify "Completed ✓" status appears
  4. Test Recurrence:

    • Create weekly goal on Monday
    • Complete it
    • Wait for next Monday (or test logic)
    • Verify progress resets to 0
  5. Test Goal Sharing:

    • Create a goal
    • Toggle "Public" checkbox
    • Click "Copy share link"
    • Verify link is copied to clipboard
    • Visit shared link in new tab
    • Verify goal appears publicly
  6. Test Responsiveness:

    • View on mobile (375px width)
    • View on tablet (768px width)
    • View on desktop (1440px width)
    • Verify layout adapts properly
  7. Test Error Handling:

    • Try creating goal with empty title → see validation error
    • Try exceeding GitHub rate limit → see helpful error message
    • Try deleting goal → verify confirmation modal appears
    • Try with slow network → verify error messages appear

Expected result:

  • All goals display correctly with real-time progress
  • Auto-sync works for GitHub-based goals
  • Confetti plays on completion
  • Responsive layout works on all screen sizes
  • Error messages are clear and helpful
  • Public/private sharing works without errors

Checklist

  • Linked the related issue above
  • Self-reviewed my own diff
  • No unnecessary console.log, debug code, or commented-out blocks
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Added or updated tests where applicable
  • Updated documentation / comments if behavior changed

Accessibility (UI changes only)

  • Keyboard navigation works correctly
  • Color contrast meets WCAG AA standard
  • ARIA labels / roles added where needed
  • Tested on mobile / responsive layout

Additional Context

Design Decisions

  • Used 15-minute sync interval to balance real-time updates with API rate limits
  • Implemented optimistic UI updates for better user experience
  • Added confetti animation on goal completion to increase engagement
  • Used variable CSS for theming to match existing design system
  • Stored goal reset version to handle race conditions on period resets

Follow-up Issues (if any)

  • Email notifications integration (requires email service setup)
  • Leaderboard integration with goals
  • Advanced analytics dashboard

This route provides suggestions for user goals based on their activity metrics and existing goals. It checks user authentication, retrieves metrics, and generates suggestions if certain goals are not already set.
Implement GET endpoint to fetch user achievements and badges based on goal completion.
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@geethika-sandireddy is attempting to deploy a commit to the legitox's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thanks for your first PR on DevTrack! 🎉

A maintainer will review it within 48 hours. While you wait:

  • Make sure CI is passing (type-check + lint)
  • Double-check the PR description is filled out and the issue is linked
  • Feel free to ask questions in Discussions if you need help

If you find DevTrack useful, a ⭐ star on the repo is always appreciated — it helps the project grow and attract more contributors!

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) labels Jul 16, 2026
@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:performance GSSoC type bonus: performance (+15 pts) labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add Goal Setting and Progress Tracking System

1 participant