Skip to content

John61590/GithubUserInformation

Repository files navigation

GitHub User Information App

An Android application that allows users to see a list of GitHub user profiles. Also, an interview app for BitFlyer Japan 2025 written by John Bohne.

Features

  • User List View: Browse GitHub users with profile information
  • User Detail View: View detailed profile information including followers, following, and public repositories
  • Swipe-to-Refresh: Swipe down to refresh the user list
  • Image Loading: Efficient avatar loading with Coil
  • Material Design UI: Clean, modern interface following Material Design guidelines

Architecture

This app follows a clean architecture pattern:

  • MVVM (Model-View-ViewModel): Separation of UI and business logic
  • StateFlow: Modern reactive state management (Superior to legacy LiveData)
  • Dependency Injection: Hilt for compile-time safe dependency injection
  • Repository Pattern: Single source of truth for data operations
  • ViewBinding: Type-safe view binding for UI components

Tech Stack

  • Language: Kotlin 2.0.21
  • UI: Android Views (XML layouts) with ViewBinding
  • Architecture Components: ViewModel, StateFlow, Lifecycle
  • Networking: Retrofit 2.9.0 + Moshi
  • Dependency Injection: Hilt 2.57.2
  • Image Loading: Coil 2.7.0
  • Build System: Gradle 8.13.2

How to Build

Prerequisites

  • Android Studio Hedgehog | 2023.1.1 or later
  • JDK 17 or later
  • Android SDK 36

Building

# Clone the repository
git clone https://github.com/John61590/GithubUserInformation
cd GithubUserInformation

# Build the project
./gradlew assembleDebug

# Run on emulator or connected device
./gradlew installDebug

Running Tests

# Run all unit tests
./gradlew testDebugUnitTest

# Run with coverage (if configured)
./gradlew testDebugUnitTest

API Used

This app uses the GitHub REST API:

  • List Users: GET /users - Lists all users
  • Get User: GET /users/{username} - Gets detailed user information

Documentation: GitHub REST API - Users

Testing

The project includes comprehensive unit tests with 33 tests covering:

  • Repository layer (data operations)
  • ViewModel layer (state management and business logic)
  • Data models (validation and equality)

Test Coverage

  • Repository: 6 tests
  • MainViewModel: 6 tests
  • UserDetailViewModel: 5 tests
  • Data Models: 10 tests
  • Others: 6 tests

All tests use:

  • Mocking: Mockito-Kotlin
  • Coroutines: Kotlin Coroutines Test
  • Lifecycle: AndroidX Core Testing

AI Tools Used

Disclosing per the assignment requirements, AI tools were used in the development of this project:

ChatGPT / Claude AI (via Firebender)

Use Case: Unit Test Development and Code Refactoring

Reason for Using AI Tools: AI tools were used to accelerate development while maintaining code quality. They helped identify and fix issues quickly, allowing focus on architectural decisions and user experience rather then debugging configuration problems.

Future Improvements (Idea for Enhancement)

If the opportunity arises to enhance this application further, here are potential improvements:

Core Features

  • Search Functionality: Add ability to search users by login using GitHub Search API (GET /search/users)
  • Offline Support: Add Room database caching to allow offline viewing of previously loaded users in case of no Internet

UX Enhancements

  • Pull-to-Refresh Detail: Add refresh capability to detail screen
  • Accessibility: Improve screen reader support with proper content descriptions
  • Translations: Add Japanese translations to some strings

Technical Improvements

  • Compose Migration: Migrate UI to Jetpack Compose for modern declarative UI
  • Crash Reporting: Add crash analytics integration (e.g., Firebase Crashlytics)

Project Structure

app/
├── src/main/java/com/example/githubuserinfo/
│   ├── data/
│   │   ├── GithubRepository.kt          # Data repository
│   │   ├── model/
│   │   │   ├── GithubUserDetail.kt      # User detail data class
│   │   │   └── GithubUserSummary.kt     # User summary data class
│   │   └── remote/
│   │       ├── GithubApiService.kt     # Retrofit API service
│   │       └── NetworkModule.kt         # Dependency injection
│   ├── ui/
│   │   ├── detail/
│   │   │   ├── UserDetailActivity.kt
│   │   │   └── UserDetailViewModel.kt
│   │   └── main/
│   │   │   ├── MainActivity.kt
│   │   │   ├── MainViewModel.kt
│   │   │   └── UserListAdapter.kt
│   │   └── util/
│   │       ├── DateUtil.kt
│   └── GithubApplication.kt
└── src/test/                            # Unit tests

License

This project was created for interview assessment purposes.


Screenshots

  1. User list with pull-to-refresh -Light Theme
GitHubUserInformation - List (Light Theme) -Dark Theme GitHubUserInformation - List (Dark Theme) 2. User detail view Screenshot_20260113_182913 3. Empty State - No Internet (List Screen) GitHubUserInformation - List Error State

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages