Book-Inator is a modern Flutter-based book discovery app that allows users to browse and search for books effortlessly. It leverages RESTful APIs for fetching book data and provides a seamless user experience with automated searching, pagination, and image optimization. The app ensures a responsive interface and includes intelligent data preloading and caching mechanisms.
https://drive.google.com/file/d/15aXEa_MAPQLQXqYWmWvt40rLBAe_hOXq/view?usp=sharing
- Clean and Responsive User Interface
- Designed with usability and aesthetics in mind, offering an intuitive and visually appealing experience.
- Automated Searching
- Built-in debouncer to optimize search queries and minimize API calls.
- Endless Scrolling with Preloading
- Efficient pagination with data preloading and caching for smooth scrolling.
- Optimized Image Handling
- Compressed and cached book cover images to ensure fast loading and reduced memory usage.
- Tab-based Navigation
- Seamless navigation between tabs with smooth scrolling behavior.
- Error Handling
- Comprehensive error handling to ensure a robust user experience in case of API failures or connectivity issues.
- Flutter/Dart for the mobile application
- RESTful APIs for fetching book data (https://gutendex.com/books/)
material.dart
: UI componentsasync
: Asynchronous programming utilitiesconvert
: Data serialization and conversion between different data representations
cached_network_image
: Optimized and cached image loadinghttp
:Future-based library for making HTTP requestsurl_launcher
:Launching a URL
- Ensure Flutter is installed on your system. If not, follow the Flutter installation guide.
- Clone the repository:
git clone https://github.com/Haaziq386/Book_discovery_app.git cd Book_discovery_app
- Install dependencies:
flutter pub get
- Run the app on an emulator or a connected device:
flutter run
The app follows a modular code structure for maintainability and scalability:
lib/
|-- models/ # Data models (e.g., Book)
|-- screens/ # Individual screens (e.g., Book Detail Screen, SearchScreen)
|-- widgets/ # Reusable widgets (e.g., TabBar, LoadingSpinner)
|-- services/ # API service integration (e.g., API Provider)
|-- utils/ # Helper classes (e.g., Debouncer, constants)
|-- main.dart # Application entry point
- Modularity: Code is organized into models, views, and services, ensuring modularity.
- State Management: Provider is used for state management, ensuring a responsive UI.
- Error Handling: Try-catch blocks and user-friendly error messages are implemented to handle edge cases gracefully.
- Optimizations:
- Data caching and preloading to enhance performance.
- Use of
AlwaysScrollableScrollPhysics
andNeverScrollableScrollPhysics
for seamless scrolling.
- Launch the app on your device using the
Book-Inator.apk
. - Use the search bar to look up books by title or author.
- Browse through the endless scrollable list of books.
- Tap on a book to view more details.
- Go to the Read Online Tab, to read the book online on the links provided.
- Enjoy the optimized, responsive interface with haptic feedback.
- UI Enhancements: Improved design after researching various layouts.
- Unscrollable Tabs: Resolved by combining scroller physics and proper height constraints after trying many other widgets.
- Popping Elements During Scroll: Faded elements using
Opacity
for a smoother experience. - Slow Pagination: Preloaded and cached data to improve scrolling speed.
- Search Query Display Issue: Passed query as a parameter to avoid refresh-related issues.
- Issues with Automated Searching:Searching on each letter was slow , so went for debouncing.
- Responsiveness Issues:Tested code on multiple devices ,to ensure it's responsiveness.
- A stable internet connection is required for the app to function properly since it relies on API requests to fetch data.
- The API does not provide sufficient details about the cost of the book, which limits functionality related to pricing. It also lacks detailed data needed to create a comprehensive "About" section in the book detail screen.
- For simplicity, the formats in the "Read Online" section are displayed as they are provided by the API (e.g., text/html). This could be improved by renaming the formats to more user-friendly terms (e.g., changing text/html to HTML) for better readability.