work in progress 🚧
My Library is an Android app for managing books and shelves built entirely with Kotlin and Jetpack Compose.
Some parts of the app were inspired by the Now in Android Android showcase app.
Detail | Shelves | Book List | Reviews |
---|---|---|---|
- Jetpack Compose
- Jetpack Navigation
- Koin for DI
- ML Kit (Barcode scanning)
- Camera X
- Firebase (Firestore, Auth, Crashlytics)
- GoodReads Review API (Books data and reviews)
The screens and UI components were designed using Material 3 guidelines and build in Jetpack Compose as a single Activity app. Screen UI state is managed and provided by Android ViewModel (which also handles events coming from UI or Data layer).
Android Room DB is used as a single source of truth for the user data. All data coming from the network are first stored in the DB and then exposed to ViewModel via Flow or as a result of a suspend functions.
Firebase Firestore is used to back up and sync a user's data. Currently the Firestore is used only for simple Add/Remove queries. (Complex search/join quires are handled by Room DB). Firebase Auth is also used to sign user in the app. (Either via Google or as an Anonymous user).
My Library tries to follow latest Android architecture recommendation and separates code into several layers: UI Layer (Compose and ViewModels), Domain Layer, Data Layer (Repositores and Data Sources). (Though use of Domain Layer is perhaps redundant - because of the small portion of business logic, the Use Cases are mostly just delegating call to Repositories).
To compile and run the app, you will have to provide:
- google-service.json file (With Firestore/Auth/Crashlytics enabled)
- Firebase Web Client ID (For user Sign In)
- GoodReads API Key (For fetching books and reviews)
These keys go to the app's gradle.properties
:
myLibrary.goodreadsApiKey=GOODREADS_API_KEY
myLibrary.firebaseClientId=FIREBASE_CLIENT_ID
My Library is distributed under the terms of the Apache License (Version 2.0).
Copyright 2020 Google LLC
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
https://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.