Skip to content

About

Criando um App Android para compartilhar seu portfolio de projeto

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🔍 GitHub Search

Android Kotlin Retrofit Material3

Android app that fetches and displays public repositories from any GitHub user via the GitHub REST API, with local persistence of the last searched username.


📸 Screenshot

GitHub Search App Screenshot


📱 Features

  • ✅ Search any GitHub user by username
  • ✅ List all public repositories from the searched user
  • ✅ Local persistence of the last searched username
  • ✅ Ability to reset the saved username
  • ✅ Error handling for invalid usernames or network failures
  • ✅ Clean UI with Material Design 3

🏗️ Architecture

com.example.githubsearch/
│
├── 📱 MainActivity.kt
│
├── 🧩 ui/
│   ├── UserInputActivity.kt
│   └── RepositoryListActivity.kt
│
├── 🌐 api/
│   ├── GithubService.kt
│   └── RetrofitClient.kt
│
├── 📊 model/
│   └── Repository.kt
│
└── 💾 data/
    └── UserPreferences.kt

Design Principles Applied

  • Separation of Concerns — network, UI, and data layers are decoupled
  • Repository Pattern — data access abstracted from UI
  • Clean Code — readable and self-documented code

🌐 API

Consumes the GitHub public REST API — no authentication required:

GET https://api.github.com/users/{username}/repos

🔧 Tech Stack

Technology Description
Kotlin 1.9+ Modern, concise Android language
Retrofit 2.9+ Type-safe HTTP client
Gson JSON serialization
RecyclerView Efficient list rendering
SharedPreferences Lightweight local persistence
Android SDK 24+ Compatible with 95%+ of devices

🚀 Getting Started

Prerequisites

  • Android Studio Hedgehog (2023.1.1) or higher
  • JDK 17+
  • Android SDK 34
  • Device or emulator with API 24+

Steps

  1. Clone the repository
   git clone https://github.com/TallesGuerra/Github-search.git
  1. Open in Android Studio → File → Open → Select the project folder
  2. Let Gradle sync automatically
  3. Click Run ▶️ or press Shift + F10

💡 Concepts Demonstrated

  • REST API integration with Retrofit and Gson
  • Asynchronous network calls with Coroutines
  • RecyclerView with custom adapter
  • SharedPreferences for local persistence
  • Multi-screen navigation between Activities
  • Error handling for network and API responses

🔄 Roadmap

  • GitHub username input and persistence
  • Fetch and display public repositories
  • Reset saved username
  • Migrate UI to Jetpack Compose
  • Add ViewModel + StateFlow
  • Repository detail screen
  • Search history with Room Database

👨‍💻 Author


Made with ❤️ and Kotlin

About

Criando um App Android para compartilhar seu portfolio de projeto

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages