A modern Android application built with Jetpack Compose that allows users to search and explore brand information using the Brandfetch API.
- 🔍 Real-time Brand Search: Auto-search functionality with debounced input (searches after 3+ characters)
- 📱 Brand Details: Detailed brand information including logos, banners, descriptions, and colors
- 🎨 Modern UI: Built with Material Design 3 and Jetpack Compose
- ⚡ Smooth Performance: Shimmer loading effects and optimized scrolling
- 🌙 Theme Support: Light and dark theme compatibility
- 📊 Clean Architecture: MVVM pattern with Repository and UseCase layers
| Brand Search | Brand Details | Loading State |
|---|---|---|
| Search brands by typing in the search bar | View detailed brand information | Shimmer effects during loading |
- MVVM (Model-View-ViewModel) - Separation of concerns
- Repository Pattern - Data layer abstraction
- Use Cases - Business logic encapsulation
- Clean Architecture - Modular and testable code structure
- Jetpack Compose - Modern declarative UI toolkit
- Material Design 3 - Google's latest design system
- Coil - Image loading and caching
- Custom Shimmer Effects - Loading state animations
- Ktor Client - HTTP client for API calls
- Kotlin Serialization - JSON parsing
- Brandfetch API v2 - Brand data source
- Koin - Lightweight dependency injection
- Kotlin Coroutines - Asynchronous operations
- Flow - Reactive streams
- Compose Navigation - Screen navigation
This app uses the Brandfetch API v2 to fetch brand information:
- Base URL:
https://api.brandfetch.io/v2 - Search Endpoint:
/search/{query}- Search brands by name or domain - Details Endpoint:
/brands/{domain}- Get detailed brand information
- Brand search functionality
- Brand logos and icons
- Brand banners and images
- Brand descriptions and metadata
- Brand color palettes
- Company information (employee count, etc.)
- Android Studio Hedgehog or newer
- Android SDK 24+
- Kotlin 2.2.0+
- Brandfetch API Key (free tier available)
This app requires a Brandfetch API key to function properly.
-
Get your API key
- Visit Brandfetch API
- Sign up for a free account
- Get your API key and Client ID from the dashboard
-
Configure API credentials
- Open
config.propertiesin the root directory - Replace the placeholder values:
RELEASE_API_KEY="YOUR_RELEASE_API_KEY_HERE" DEBUG_API_KEY="YOUR_DEBUG_API_KEY_HERE" RELEASE_CLIENT_ID="YOUR_RELEASE_CLIENT_ID_HERE" DEBUG_CLIENT_ID="YOUR_DEBUG_CLIENT_ID_HERE"
- Open
-
Security Note
- The
config.propertiesfile should be added to.gitignoreto keep your API keys secure - Never commit your actual API keys to version control
- The
-
Clone the repository
git clone https://github.com/yourusername/compose-brand-app.git cd compose-brand-app -
Open in Android Studio
- Open Android Studio
- Select "Open an existing project"
- Navigate to the cloned directory
-
Build and Run
- Wait for Gradle sync to complete
- Click the "Run" button
- Open the app - You'll see the brand search screen
- Type in the search bar - Start typing a brand name or domain
- Auto-search - After typing 3+ characters, the app automatically searches
- View results - Brand results appear in a scrollable list
- Tap a brand - Navigate to detailed brand information
- Brand Header - Logo, banner image, and basic info
- Brand Information - Name, domain, and descriptions
- Scrollable Content - All content is vertically scrollable
- Back Navigation - Use the back button to return to search
- Debounced Search - Optimized to avoid excessive API calls
- Loading States - Shimmer effects show loading progress
- Error Handling - User-friendly error messages
- Responsive Design - Adapts to different screen sizes
app/src/main/java/com/bksd/brandapp/
├── component/ # Reusable UI components
├── core_domain/ # Domain layer contracts
├── core_ui/ # UI utilities and base components
├── data/ # Data layer implementations
├── domain/ # Business logic and use cases
├── network/ # Network layer (Ktor client)
├── repository/ # Repository implementations
├── ui/ # UI screens and ViewModels
│ ├── brand_detail/ # Brand details screen
│ └── brand_list/ # Brand search screen
└── extension/ # Kotlin extensions
This project is licensed under the MIT License - see the LICENSE file for details.
- Brandfetch for providing the brand data API
- Jetpack Compose team for the amazing UI toolkit
- Ktor team for the excellent HTTP client
If you have any questions or suggestions, feel free to reach out!
Built with ❤️ using Jetpack Compose and Kotlin