A clean and responsive Android application for showcasing albums and photos. Built using modern Android development practices, including MVVM architecture, Jetpack Compose, Hilt, Service, Coroutines, Flow and Retrofit.
- Screenshots
- Tech Stack
- Architecture
- Project Structure
- Installation
- Testing
- Contributing
- License
- Contact
- Programming Language: Kotlin
- UI Framework: Jetpack Compose
- Architecture: MVVM + Clean Architecture
- Dependency Injection: Hilt
- Networking: Retrofit & OkHttp
- Asynchronous Tasks: Kotlin Coroutines & Flow
- Background task: Service
This project follows MVVM (Model-View-ViewModel) architecture to ensure a clean separation of concerns:
-
Model:
- Responsible for handling data operations like network calls or database queries.
- Example:
Repository
classes.
-
Domain:
- Defines Models and Data repositories
- Responsible for handling business logic and use cases.
-
ViewModel:
- Acts as a bridge between the
Model
andView
. - Manages UI-related data and state.
- Acts as a bridge between the
-
View:
- Implements the user interface via Jetpack Compose.
- Observes data changes from the
ViewModel
and renders the UI.
├── data/ # Data layer: API, database, repositories
│ ├── api/ # Retrofit interfaces and network models
│ └── repository/ # Repository implementations
├── di/ # Dependency injection modules
├── domain/ # Domain layer: Business logic and use cases
│ ├── entities/ # Core domain models
│ ├── repositories/ # Repository Interfaces
│ └── usecase/ # Use cases for app features
├── service/ # Android services for background tasks
├── ui/ # Presentation layer: UI and ViewModel
│ ├── features/
│ └── theme/
├── build.gradle # Gradle configuration
└── AndroidManifest.xml # App configuration
- domain: Contains core business logic, entities, and use cases.
- data: Manages API calls, data caching, and data mapping.
- presentation: Handles UI and interaction logic.
- di: Dependency injection setup using Hilt.
- services: Service is used for background tasks, which is used as a "Bound Service" to communicate with UI
-
Clone the repository:
git clone https://github.com/HasibPrince/Samsung-Album-Showcase.git
-
Open the project in Android Studio.
-
Sync the project with Gradle files.
-
Build and run the app on an emulator or physical device.
- Unit Tests: Run unit tests located in the
src/test
directory. - Instrumentation Tests: Execute tests in the
src/androidTest
directory.
Run tests using the following command:
./gradlew testDebugUnitTest
./gradlew connectedDebugAndroidTest
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
feature/your-feature
). - Commit your changes.
- Push to your branch.
- Open a pull request.
Copyright 2024 HasibPrince (Md. Hasibun Nayem)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
For questions or feedback, feel free to reach out:
- Author: Hasib Prince
- GitHub: HasibPrince
Thank you for checking out the Samsung Album Showcase project! ✨