Skip to content

popand/gitstreak

Repository files navigation

GitStreak - iOS

A native iOS app that gamifies your GitHub activity with real-time streak tracking, achievements, and progress visualization. Connect your GitHub account to track your coding streaks and level up your development journey.

Screenshots

Home Screen

✨ Features

πŸ”₯ Core Features

  • Real GitHub Integration - Connect with Personal Access Token for live data
  • Daily Streak Tracking - Monitor your consecutive days of GitHub commits
  • Level System - Progress through levels based on your coding activity
  • XP & Progress - Earn experience points for each commit and contribution
  • Weekly Activity Chart - Visual representation of your current week's activity
  • Recent Commits - See your latest GitHub commits in real-time
  • Achievements System - Unlock badges for reaching coding milestones
  • Secure Token Storage - GitHub tokens stored securely in iOS Keychain

πŸ“± iOS-Specific Features

  • Native SwiftUI Interface - Smooth, responsive iOS design
  • Tab-Based Navigation - Intuitive iOS navigation pattern (Home, Awards, Stats, Social)
  • Dynamic UI - Adapts to different screen sizes and orientations
  • iOS Design Language - Follows Apple's Human Interface Guidelines
  • Secure Authentication - GitHub tokens stored in iOS Keychain for security
  • Settings Integration - Easy GitHub account connection and management

πŸ›  Tech Stack

  • Framework: SwiftUI
  • Language: Swift
  • Platform: iOS 17.5+
  • Architecture: MVVM pattern with ObservableObject
  • API Integration: GitHub REST API v3
  • Security: iOS Keychain for secure token storage
  • Data Handling: Real-time GitHub data with fallback to mock data

πŸ“ Project Structure

GitStreak/
β”œβ”€β”€ GitStreakApp.swift          # App entry point with @main
β”œβ”€β”€ ContentView.swift           # Main container with tab navigation, view routing, and SettingsView
β”œβ”€β”€ Models/
β”‚   └── GitStreakData.swift     # Data models, GitHubService, and ObservableObject classes
└── Views/
    β”œβ”€β”€ StreakCardView.swift    # Current streak display with gradient background and loading state
    β”œβ”€β”€ LevelProgressView.swift # Level and XP progress visualization
    β”œβ”€β”€ WeeklyActivityView.swift # Weekly commit activity chart
    β”œβ”€β”€ RecentActivityView.swift # Recent commits list
    β”œβ”€β”€ AchievementsView.swift  # Achievement badges display
    └── TabBarView.swift        # Custom tab bar with 4 tabs (Home, Awards, Stats, Social)

πŸš€ Getting Started

Prerequisites

  • Xcode 14.0 or later
  • iOS 17.5+ device or simulator
  • macOS Big Sur or later
  • GitHub Personal Access Token (for real data integration)

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd gitstreak
  2. Open in Xcode

    open GitStreak.xcodeproj
  3. Select your target

    • Choose an iOS Simulator (e.g., iPhone 15 Pro) from the device dropdown
    • Or connect your physical iOS device
  4. Build and run

    • Press ⌘+R or click the play button
    • The app will build and launch on your selected device/simulator
  5. Connect your GitHub account (optional)

    • Tap the gear icon in the top right to open Settings
    • Generate a Personal Access Token at GitHub Settings
    • Grant repo and user scopes to the token
    • Paste your token in the app to see real GitHub data

Troubleshooting

"Build only device cannot be used" error:

  • Make sure you've selected an iOS Simulator, not a "Build Only" device
  • Go to Window β†’ Devices and Simulators to manage available simulators

🎯 Current Status

This is a fully functional native iOS app with real GitHub integration and secure authentication.

βœ… Completed Features

  • GitHub Integration - Full GitHub API integration with Personal Access Token authentication
  • Secure Token Storage - GitHub tokens stored securely in iOS Keychain
  • Real-time Data - Live streak calculation, commit tracking, and activity monitoring
  • Weekly Activity Display - Current week commit visualization (Monday-Sunday)
  • Settings & Authentication - Complete GitHub account connection flow
  • Native SwiftUI interface - Smooth, responsive iOS design
  • Tab-based navigation - Home (fully functional), Awards, Stats, Social tabs
  • Streak tracking display - Real GitHub commit streak calculation
  • Level progress visualization - XP and level system based on GitHub activity
  • Recent activity feed - Latest GitHub commits with timestamps
  • Achievements system UI - Achievement badges with unlock conditions
  • Responsive design - Optimized for all iOS screen sizes
  • Error handling & fallback - Graceful fallback to mock data when not authenticated

πŸ”„ Future Enhancements

  • Enhanced Stats Tab - Detailed analytics and contribution graphs
  • Awards Tab Completion - Interactive achievement showcase
  • Social Features - Share streaks and compare with friends
  • Push Notifications - Streak reminders and goal notifications
  • Haptic Feedback - Enhanced interaction feedback
  • Widget Support - iOS home screen streak widget
  • Dark Mode Optimization - Enhanced dark theme experience
  • Advanced GitHub Features - Pull requests, issues, and contribution types

πŸ“± Supported Platforms

  • iOS 17.5+
  • iPhone (all sizes, from iPhone SE to iPhone 15 Pro Max)
  • iPad (optimized for tablet experience)
  • iOS Simulator

πŸ” Security & Privacy

  • Secure Token Storage: GitHub Personal Access Tokens are stored securely in iOS Keychain
  • No Data Collection: Your GitHub data stays on your device
  • Token Validation: Comprehensive token format validation before authentication
  • Error Handling: Graceful handling of authentication failures and network issues

πŸ™ Acknowledgments

  • Inspired by GitHub's contribution graph
  • Built with Apple's SwiftUI framework
  • Icons from SF Symbols
  • GitHub REST API for real-time data

πŸ“ Recent Updates

  • v1.2 - Fixed weekly activity display not showing commits
  • v1.1 - Added GitHub API integration with secure authentication
  • v1.0 - Initial release with SwiftUI interface and mock data

Built with ❀️ using SwiftUI and GitHub API

About

πŸš€ Gamify your coding journey! Native iOS app that tracks GitHub activity streaks, progress levels, and achievements. Perfect for developers who want to stay motivated and consistent with their coding habits.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages