Leafory is a cross-platform (iOS & Android) mobile application that allows users to explore, search, and save their favorite books from the Gutendex API, a public API for Project Gutenberg.
This project was designed with a focus on a clean, scalable, and maintainable architecture, as if it were a long-term project to be worked on by a team.
- Design (Figma): Figma URL
- Note: The eco-friendly book icon in this app's logo was created by Vectorslab - Flaticon.
- ✅ Popular Books Display: Shows a list of popular books with infinite scroll pagination.
- ✅ Book Search Functionality: Search functionality by title or author with debounce for efficiency.
- ✅ Book Details Page: Displays detailed information about a selected book.
- ✅ Favorite/Liking System: Users can like and unlike books, and their choices are persisted locally on the device.
- ✅ Favorites Page: A dedicated page that displays all liked books.
- ✅ Clean & Scalable Architecture: Implements Clean Architecture with a clear separation between the Presentation, Domain, and Data layers.
- ✅ Modern State Management: Utilizes BLoC for predictable and structured state management.
- ✅ Declarative Routing: Uses
go_routerfor robust, route-based navigation. - ✅ Unit Testing: Includes unit tests for the Repository and BLoCs to ensure code quality and reliability.
- Framework: Flutter
- Language: Dart
- Architecture: Clean Architecture (Data, Domain, Presentation) + Feature-First
- State Management:
flutter_bloc/bloc - Navigation:
go_router - Networking:
dio - Local Storage:
hive_ce - Testing:
mocktail,bloc_test - Dependency Injection: Service Locator Pattern (Manual)
The project follows a clean and scalable directory structure to facilitate easy navigation and development.
lib/
├── core/ # For shared logic, services, and utilities (Routing, Dependency Injection, Theme, Database Service, etc.)
├── features/ # For individual feature modules (e.g., book_discovery)
│ ├── data/
│ ├── domain/
│ └── presentation/
└── shared/ # For shared, reusable UI widgets
Follow these steps to get the project up and running on your local environment.
- Ensure you have the latest stable version of the Flutter SDK installed.
- An emulator (Android/iOS) or a physical device.
- Clone this repository:
git clone https://github.com/deandrasatriyosetiawan/leafory.git
- Navigate to the project directory:
cd leafory
- Install all dependencies:
flutter pub get
- Run the code generator (important for Hive):
dart run build_runner build
- Run the application:
flutter run
To verify that the business logic in the Repository and BLoCs is working as expected, you can run the provided unit tests.
From the project's root directory, run the following command in your terminal:
flutter test
You will see the output in the terminal indicating the status of all executed test cases.
This project is licensed under the MIT License. See the LICENSE file for details.