An Android app that looks up any GitHub username and displays their profile in a GitHub-style dark UI: avatar, bio, company/location/blog, follower and repo counts, and a scrollable list of their public repositories (with language color dot, stars, and forks).
- Kotlin + Jetpack Compose (Material 3)
- Retrofit + Gson — talks to the public GitHub REST API (
api.github.com) - Coil — avatar image loading
- MVVM (
GitHubViewModel+ sealedUiState)
- Open this folder in Android Studio (Koala/2024.1 or newer recommended).
- Let Gradle sync (it will download dependencies — needs internet).
- Run on an emulator or device (minSdk 24 / Android 7.0+).
- Type any GitHub username (e.g.
torvalds,octocat,google) and tap Go or hit search on the keyboard.
- Uses the unauthenticated GitHub API, which is rate-limited to 60
requests/hour per IP. If you hit the limit, wait an hour or add a personal
access token to the Retrofit client's
OkHttpClientas anAuthorization: Bearer <token>header. - Tapping "View on GitHub" or a repo card opens that page in the browser.
- No external API key or backend server is required.
app/src/main/java/com/example/githubfinder/
├── MainActivity.kt # Compose UI (GitHub-style dark theme)
├── GitHubViewModel.kt # State handling: Idle / Loading / Success / Error
├── GitHubApiService.kt # Retrofit interface + client
└── GitHubUser.kt # Data models (GitHubUser, GitHubRepo)
- Colors live in
MainActivity.ktunder theGhColorsobject — tweak these to change the theme. - To show more/fewer repos, change
perPageinGitHubApiService.getRepos. - To add authenticated requests (higher rate limit), add a token header in
RetrofitInstance'sOkHttpClient.Builder().