Skip to content

A book discovery app built using Flutter and Gutendex API, featuring BLoC for state management, Clean Architecture, and GoRouter for navigation.

License

Notifications You must be signed in to change notification settings

deandrasatriyosetiawan/leafory

Repository files navigation

Leafory - Book Discovery App

Flutter Version Dart Version Architecture State Management License

📖 Project Description

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

✨ Key Features

  • 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_router for robust, route-based navigation.
  • Unit Testing: Includes unit tests for the Repository and BLoCs to ensure code quality and reliability.

🚀 Tech Stack & Architecture

  • 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)

📂 Folder Structure

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

⚙️ Getting Started

Follow these steps to get the project up and running on your local environment.

Prerequisites

  • Ensure you have the latest stable version of the Flutter SDK installed.
  • An emulator (Android/iOS) or a physical device.

Installation & Running

  1. Clone this repository:
git clone https://github.com/deandrasatriyosetiawan/leafory.git
  1. Navigate to the project directory:
cd leafory
  1. Install all dependencies:
flutter pub get
  1. Run the code generator (important for Hive):
dart run build_runner build
  1. Run the application:
flutter run

Running Unit Tests

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.

⚖️ License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A book discovery app built using Flutter and Gutendex API, featuring BLoC for state management, Clean Architecture, and GoRouter for navigation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published