# 87kangsw/gittime architecture

> Architecture diagram of the GitHub repository 87kangsw/gittime, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/87kangsw/gittime
- Repository: https://github.com/87kangsw/gittime

## Overview

GitTime is an iOS GitHub activity client. Users pass through splash authentication (or trial access) into the tabbed app, where they can inspect contribution graphs and events, browse trending repositories and developers, compare buddies’ contributions, and manage settings. Feature controllers bind user actions and rendered state to ReactorKit view models. The repository also has language discovery and follow-user selection flows. The sampled code confirms the login service’s OAuth, token, and credential handling; feature-to-service wiring is not shown in the excerpts, so those links are omitted.

Main entry points: [`GitTime/Sources/Services/AuthService.swift`](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/AuthService.swift) (Auth service), [`GitTime/Sources/ViewControllers/Splash/SplashViewController.swift`](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Splash/SplashViewController.swift) (Splash screen), [`GitTime/Sources/ViewControllers/Buddy/BuddyViewController.swift`](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Buddy/BuddyViewController.swift) (Buddy contributions), [`GitTime/Sources/ViewControllers/Login/LoginViewController.swift`](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Login/LoginViewController.swift) (Login screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_splash["Splash screen"]
  node_login["Login screen"]
  node_tabs["Tab navigation"]
end

subgraph group_features["GitHub features"]
  node_activity["Activity view"]
  node_trends["Trending view"]
  node_buddies["Buddy contributions"]
  node_follow["Follow users"]
  node_languages["Language discovery"]
  node_settings["Settings"]
  node_activity_reactor["Activity reactor"]
  node_trend_reactor["Trend reactor"]
  node_buddy_reactor["Buddy reactor"]
  node_follow_reactor["Follow reactor"]
  node_language_reactor["Language reactor"]
end

subgraph group_data["Services and data"]
  node_keychain[("Token keychain")]
  node_activity_service["Activity service"]
  node_github_service["GitHub service"]
  node_realm[("Realm persistence<br/>[RealmService.swift]")]
end

subgraph group_auth["Authentication"]
  node_auth_reactor["Login reactor"]
  node_auth_service["Auth service<br/>[AuthService.swift]"]
  node_login_provider["Login API provider"]
  node_github_login_api["GitHub login API"]
end

node_user(("User"))
node_github(("GitHub"))
node_firebase(("Firebase Auth"))

node_user -->|"opens app"| node_splash
node_splash -->|"routes unauthenticated"| node_login
node_login -->|"sends login action"| node_auth_reactor
node_auth_reactor -->|"requests authorization"| node_auth_service
node_auth_service -->|"opens OAuth session"| node_github
node_auth_service -->|"requests token"| node_login_provider
node_login_provider -->|"dispatches request"| node_github_login_api
node_auth_service -->|"loads token"| node_keychain
node_auth_service -->|"removes token"| node_keychain
node_auth_service -.->|"signs in with credential"| node_firebase
node_splash -->|"routes authenticated"| node_tabs
node_user -->|"views activity"| node_activity
node_activity -->|"sends first-load action"| node_activity_reactor
node_user -->|"browses trends"| node_trends
node_trends -->|"dispatches actions"| node_trend_reactor
node_user -->|"views buddies"| node_buddies
node_buddies -->|"dispatches actions"| node_buddy_reactor
node_buddies -->|"opens follow picker"| node_follow
node_follow -->|"dispatches refresh"| node_follow_reactor
node_user -->|"searches languages"| node_languages
node_languages -->|"dispatches search"| node_language_reactor
node_user -->|"manages settings"| node_settings

click node_splash "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Splash/SplashViewController.swift"
click node_login "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Login/LoginViewController.swift"
click node_tabs "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Base/MainTabBarController.swift"
click node_activity "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Activity/ActivityViewController.swift"
click node_trends "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/TrendViewController.swift"
click node_buddies "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Buddy/BuddyViewController.swift"
click node_follow "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Follow/FollowViewController.swift"
click node_languages "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/LanguageList/LanguageListViewController.swift"
click node_settings "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Setting/SettingViewController.swift"
click node_activity_reactor "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Activity/ActivityViewReactor.swift"
click node_trend_reactor "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift"
click node_buddy_reactor "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Buddy/BuddyViewReactor.swift"
click node_follow_reactor "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Follow/FollowViewReactor.swift"
click node_language_reactor "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/LanguageList/LanguageListViewReactor.swift"
click node_auth_reactor "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Login/LoginViewReactor.swift"
click node_auth_service "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/AuthService.swift"
click node_keychain "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/KeychainService.swift"
click node_login_provider "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Network/GitTimeProvider.swift"
click node_github_login_api "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Network/GitHubLoginAPI.swift"
click node_activity_service "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/ActivityService.swift"
click node_github_service "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/GitHubService.swift"
click node_realm "https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/RealmService.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_splash,node_login,node_tabs,node_user toneBlue
class node_activity,node_trends,node_buddies,node_follow,node_languages,node_settings,node_activity_reactor,node_trend_reactor,node_buddy_reactor,node_follow_reactor,node_language_reactor toneAmber
class node_keychain,node_activity_service,node_github_service,node_realm toneMint
class node_auth_reactor,node_auth_service,node_login_provider,node_github_login_api toneRose
class node_github,node_firebase toneIndigo
```

## Components

### App navigation

- [Splash screen](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Splash/SplashViewController.swift): `GitTime/Sources/ViewControllers/Splash/SplashViewController.swift`
- [Login screen](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Login/LoginViewController.swift): `GitTime/Sources/ViewControllers/Login/LoginViewController.swift`
- [Tab navigation](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Base/MainTabBarController.swift): `GitTime/Sources/ViewControllers/Base/MainTabBarController.swift`

### GitHub features

- [Activity view](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Activity/ActivityViewController.swift): `GitTime/Sources/ViewControllers/Activity/ActivityViewController.swift`
- [Trending view](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/TrendViewController.swift): `GitTime/Sources/ViewControllers/Trend/TrendViewController.swift`
- [Buddy contributions](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Buddy/BuddyViewController.swift): `GitTime/Sources/ViewControllers/Buddy/BuddyViewController.swift`
- [Follow users](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Follow/FollowViewController.swift): `GitTime/Sources/ViewControllers/Follow/FollowViewController.swift`
- [Language discovery](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/LanguageList/LanguageListViewController.swift): `GitTime/Sources/ViewControllers/Trend/LanguageList/LanguageListViewController.swift`
- [Settings](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Setting/SettingViewController.swift): `GitTime/Sources/ViewControllers/Setting/SettingViewController.swift`
- [Activity reactor](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Activity/ActivityViewReactor.swift): `GitTime/Sources/ViewControllers/Activity/ActivityViewReactor.swift`
- [Trend reactor](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift): `GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift`
- [Buddy reactor](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Buddy/BuddyViewReactor.swift): `GitTime/Sources/ViewControllers/Buddy/BuddyViewReactor.swift`
- [Follow reactor](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Follow/FollowViewReactor.swift): `GitTime/Sources/ViewControllers/Follow/FollowViewReactor.swift`
- [Language reactor](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Trend/LanguageList/LanguageListViewReactor.swift): `GitTime/Sources/ViewControllers/Trend/LanguageList/LanguageListViewReactor.swift`

### Services and data

- [Token keychain](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/KeychainService.swift): `GitTime/Sources/Services/KeychainService.swift`
- [Activity service](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/ActivityService.swift): `GitTime/Sources/Services/ActivityService.swift`
- [GitHub service](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/GitHubService.swift): `GitTime/Sources/Services/GitHubService.swift`
- [Realm persistence](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/RealmService.swift): `GitTime/Sources/Services/RealmService.swift`

### Authentication

- [Login reactor](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/ViewControllers/Login/LoginViewReactor.swift): `GitTime/Sources/ViewControllers/Login/LoginViewReactor.swift`
- [Auth service](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Services/AuthService.swift): `GitTime/Sources/Services/AuthService.swift`
- [Login API provider](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Network/GitTimeProvider.swift): `GitTime/Sources/Network/GitTimeProvider.swift`
- [GitHub login API](https://github.com/87kangsw/gittime/blob/master/GitTime/Sources/Network/GitHubLoginAPI.swift): `GitTime/Sources/Network/GitHubLoginAPI.swift`

### Other components

- **User**
- **GitHub**
- **Firebase Auth**

## Connections

- User → Splash screen: opens app
- Splash screen → Login screen: routes unauthenticated
- Login screen → Login reactor: sends login action
- Login reactor → Auth service: requests authorization
- Auth service → GitHub: opens OAuth session
- Auth service → Login API provider: requests token
- Login API provider → GitHub login API: dispatches request
- Auth service → Token keychain: loads token
- Auth service → Token keychain: removes token
- Auth service → Firebase Auth: signs in with credential
- Splash screen → Tab navigation: routes authenticated
- User → Activity view: views activity
- Activity view → Activity reactor: sends first-load action
- User → Trending view: browses trends
- Trending view → Trend reactor: dispatches actions
- User → Buddy contributions: views buddies
- Buddy contributions → Buddy reactor: dispatches actions
- Buddy contributions → Follow users: opens follow picker
- Follow users → Follow reactor: dispatches refresh
- User → Language discovery: searches languages
- Language discovery → Language reactor: dispatches search
- User → Settings: manages settings
