Skip to content

A modern iOS app to track and manage GitHub repositories and pull requests. Built with SwiftUI, SwiftData, and OAuth 2.0 authentication.

Notifications You must be signed in to change notification settings

Fenriz1349/OctoTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ™ OctoTrack

Swift iOS SwiftUI SwiftData License

A modern iOS app to track and manage your GitHub repositories and pull requests

Features β€’ Architecture β€’ Installation β€’ Usage β€’ Requirements


πŸ“± Overview

OctoTrack is a native iOS application that helps developers monitor their GitHub repositories and pull requests efficiently. Built with SwiftUI and following clean architecture principles, it provides a seamless experience for tracking project activity across multiple repositories.

✨ Features

πŸ” Authentication

  • GitHub OAuth 2.0 integration
  • Secure token management with Keychain
  • Automatic token validation and refresh
  • Session persistence

πŸ“¦ Repository Management

  • Add and track multiple GitHub repositories
  • Priority system (Low, Medium, High)
  • Public/Private repository support
  • Repository filtering by priority
  • Quick repository deletion with swipe actions

πŸ”„ Pull Request Tracking

  • Real-time PR status monitoring (Open, Closed, Merged)
  • Detailed PR timeline visualization
  • Pull request metadata (created, updated, merged dates)
  • Draft PR identification
  • Pull-to-refresh functionality
  • Direct links to GitHub

πŸ‘€ User Interface

  • Clean, modern SwiftUI design
  • Dark mode support
  • Custom tab bar navigation
  • Responsive animations
  • Localized in English and French πŸ‡¬πŸ‡§ πŸ‡«πŸ‡·

πŸ— Architecture

OctoTrack follows MVVM (Model-View-ViewModel) architecture with clean separation of concerns:

OctoTrack/
β”œβ”€β”€ πŸ“ Models/              # Data models (User, Repository, PullRequest)
β”œβ”€β”€ πŸ“ Views/               # SwiftUI views
β”œβ”€β”€ πŸ“ ViewModels/          # Business logic and state management
β”œβ”€β”€ πŸ“ Network/             # API clients and endpoints
β”‚   β”œβ”€β”€ Authentication/     # OAuth flow
β”‚   β”œβ”€β”€ Repositories/       # Repository endpoints
β”‚   β”œβ”€β”€ PullRequests/       # PR endpoints
β”‚   └── Users/             # User endpoints
β”œβ”€β”€ πŸ“ Storage/            # Keychain and token management
β”œβ”€β”€ πŸ“ DataManager/        # SwiftData persistence layer
└── πŸ“ ExtractedViews/     # Reusable UI components

Key Design Patterns

  • Factory Pattern: ViewModelFactory for dependency injection
  • Repository Pattern: UserDataManager for data access
  • Coordinator Pattern: AppCoordinator for navigation
  • Mapper Pattern: DTOs to domain model conversion

πŸ›  Technologies

Component Technology
UI Framework SwiftUI
Persistence SwiftData
Networking URLSession + async/await
Authentication ASWebAuthenticationSession
Secure Storage Keychain Services
Architecture MVVM + Clean Architecture
Concurrency Swift Concurrency (async/await)

πŸ“‹ Requirements

  • iOS 17.0+
  • Xcode 15.0+
  • Swift 5.9+
  • GitHub account
  • GitHub OAuth App credentials

πŸš€ Installation

1. Clone the Repository

git clone https://github.com/yourusername/OctoTrack.git
cd OctoTrack

2. Configure GitHub OAuth

  1. Create a GitHub OAuth App:

    • Go to GitHub Settings β†’ Developer settings β†’ OAuth Apps
    • Register a new application
    • Set callback URL to: octotrack://callback
  2. Update credentials in GitHubAuthenticationEndpoint.swift:

static let config = GitHubOAuthConfig(
    clientID: "YOUR_CLIENT_ID",
    clientSecret: "YOUR_CLIENT_SECRET",
    redirectURI: "octotrack://callback",
    scopes: ["repo", "user"]
)

⚠️ Security Note: Never commit your OAuth credentials to version control!

3. Build and Run

  1. Open OctoTrack.xcodeproj in Xcode
  2. Select your target device or simulator
  3. Build and run (⌘R)

πŸ’‘ Usage

Getting Started

  1. Launch the app and tap "Sign In"
  2. Authenticate with your GitHub account
  3. Add repositories using the + button
  4. Track pull requests by tapping on any repository
  5. Filter repositories by priority level

Managing Repositories

  • Add Repository: Tap the center + button, enter owner and repo name
  • Delete Repository: Swipe left on any repository
  • Update Priority: Tap the priority badge in repository details
  • Refresh PRs: Pull down to refresh pull request list
  • View Details: Tap any PR to see timeline and metadata

Account Management

  • View Profile: Navigate to Account tab
  • Reset Repositories: Clear all tracked repositories
  • Sign Out: Disconnect from GitHub

πŸ”’ Security

  • OAuth tokens stored securely in iOS Keychain
  • Token expiration handling with automatic refresh
  • Periodic token validation (every 30 minutes)
  • No credentials stored in UserDefaults or plain text

🌐 API Integration

OctoTrack integrates with the GitHub REST API v3:

  • Authentication: OAuth 2.0 flow
  • Endpoints Used:
    • /user - User information
    • /repos/{owner}/{repo} - Repository details
    • /repos/{owner}/{repo}/pulls - Pull requests

All network requests use modern Swift Concurrency (async/await).

πŸ“Έ Screenshots

Below are a few screenshots showcasing the main modules of Octotrack.

↗️ Authentication

πŸ“ Repository List

πŸ§‘β€πŸ’» Repository

πŸ”Ž Pull Request

🎨 Customization

Priority Colors

Edit RepoPriority.swift to customize priority colors:

var color: Color {
    switch self {
    case .low: .customGreen
    case .medium: .customYellow
    case .high: .customRed
    }
}

Localization

Add new languages by extending Localizable.xcstrings with your locale.

πŸ› Known Issues

  • Token validation requires active network connection
  • Large repository lists may experience slight loading delays
  • OAuth flow requires Safari for authentication

πŸ‘¨β€πŸ’» Development

Running Tests

# Run unit tests
⌘U in Xcode

Code Style

  • SwiftLint configuration included
  • Follow Swift API Design Guidelines
  • MVVM architecture enforced

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • GitHub API for comprehensive developer tools
  • SwiftUI community for inspiration and support
  • Apple for excellent documentation

⭐ Star this repo if you find it helpful!

About

A modern iOS app to track and manage GitHub repositories and pull requests. Built with SwiftUI, SwiftData, and OAuth 2.0 authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages