Skip to content

Rezuanul-Islam-Fahim/hasper_ebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Hasper EBook

A modern, feature-rich E-Book mobile application for Android & iOS devices

Built with ❀️ using Dart & Flutter

Flutter Version Dart Version Firebase License

GitHub stars GitHub forks GitHub watchers


πŸ“– Table of Contents


🎯 About

Hasper EBook is a comprehensive digital library application that provides users with seamless access to a vast collection of e-books. With an elegant and intuitive interface, users can browse, search, and read their favorite books directly on their mobile devices. The app leverages Firebase's real-time database capabilities to deliver a dynamic and responsive reading experience.

Key Highlights

  • πŸ“± Cross-Platform: Native performance on both Android and iOS
  • ☁️ Cloud-Powered: Real-time synchronization with Firebase Firestore
  • 🎨 Beautiful UI: Modern and clean Material Design interface
  • πŸ“„ Advanced PDF Reader: Powered by Syncfusion's professional PDF viewer
  • πŸ” Smart Search: Quickly find books by title, author, or language
  • ♾️ Infinite Scrolling: Seamless browsing experience with pagination
  • 🌐 Multi-Language Support: Books available in multiple languages

✨ Features

πŸ“š Core Features

  • Browse Books: Explore a comprehensive collection of e-books with beautiful cover displays
  • Book Details: View detailed information including title, description, language, and page count
  • PDF Reader: Read books with a professional, feature-rich PDF viewer
  • Search Functionality: Find books quickly using the integrated search system
  • Categorization: Books organized by language and categories
  • Infinite Scroll: Load more books automatically as you scroll
  • Bookmarking: Keep track of your reading progress
  • Responsive Design: Adapts perfectly to different screen sizes

🎨 UI/UX Features

  • Material Design: Modern and intuitive user interface
  • Custom Theme: Carefully crafted color scheme and typography
  • Smooth Animations: Fluid transitions and interactions
  • Drawer Navigation: Easy access to different sections
  • Cover Photo Grid: Visually appealing book display

⚑ Technical Features

  • State Management: Efficient state management using Provider
  • Real-time Database: Firebase Firestore for live data synchronization
  • Lazy Loading: Optimized performance with infinite scroll pagination
  • SVG Support: High-quality vector graphics rendering
  • Offline Capability: Local caching for improved performance

πŸ“Έ Screenshots

Β  Β 

Β 


πŸ› οΈ Tech Stack

Frontend

  • Flutter ^3.5.0 - Cross-platform UI framework
  • Dart ^3.5.0 - Programming language

Backend & Services

  • Firebase Core ^3.15.0 - Firebase SDK for Flutter
  • Cloud Firestore ^5.6.0 - NoSQL cloud database

State Management

  • Provider ^6.1.2 - State management solution

PDF Viewing

  • Syncfusion Flutter PDFViewer ^28.2.12 - Professional PDF rendering

UI & Graphics

  • Flutter SVG ^2.0.16 - SVG rendering support
  • Cupertino Icons ^1.0.8 - iOS-style icons

Pagination

  • Infinite Scroll Pagination ^4.1.0 - Efficient list loading

πŸ—οΈ Architecture

The application follows a clean architecture pattern with clear separation of concerns:

lib/
β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”œβ”€β”€ book_item.dart
β”‚   └── drawer.dart
β”œβ”€β”€ models/             # Data models
β”‚   └── book.dart
β”œβ”€β”€ providers/          # State management
β”‚   └── books_provider.dart
β”œβ”€β”€ repositories/       # Data access layer
β”‚   └── db_repository.dart
β”œβ”€β”€ screens/           # Application screens
β”‚   β”œβ”€β”€ home_screen/
β”‚   β”œβ”€β”€ book_details_screen/
β”‚   β”œβ”€β”€ all_book_screen/
β”‚   └── pdf_screen.dart
β”œβ”€β”€ utils/             # Utility functions
β”‚   └── search.dart
β”œβ”€β”€ firebase_options.dart
β”œβ”€β”€ main.dart          # Entry point
β”œβ”€β”€ routes.dart        # Route definitions
β”œβ”€β”€ styles.dart        # Style constants
└── theme.dart         # App theme

Design Patterns

  • Provider Pattern: For state management and dependency injection
  • Repository Pattern: Abstracts data sources (Firestore)
  • Factory Pattern: Used in model constructors for object creation
  • Singleton Pattern: Firebase instance management

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Flutter SDK (3.5.0 or higher) - Install Flutter
  • Dart SDK (3.5.0 or higher) - Included with Flutter
  • Android Studio or VS Code with Flutter extensions
  • Xcode (for iOS development, macOS only)
  • Firebase CLI - Install Firebase CLI
  • Git - Install Git

Installation

  1. Clone the repository
git clone https://github.com/Rezuanul-Islam-Fahim/hasper_ebook.git
cd hasper_ebook
  1. Install dependencies
flutter pub get
  1. Verify Flutter installation
flutter doctor

Fix any issues reported by Flutter Doctor before proceeding.

Firebase Configuration

This project uses Firebase Firestore for data storage. Follow these steps:

  1. Create a Firebase Project

    • Go to Firebase Console
    • Click "Add Project" and follow the setup wizard
    • Enable Cloud Firestore in the Firebase console
  2. Register your apps

    • Add Android app with package name: com.rezuanulfahim.hasperEbook
    • Add iOS app with bundle ID: com.rezuanulfahim.hasperEbook
    • Download and add google-services.json to android/app/
    • Download and add GoogleService-Info.plist to ios/Runner/
  3. Configure FlutterFire

# Install FlutterFire CLI
dart pub global activate flutterfire_cli

# Configure Firebase for your Flutter project
flutterfire configure
  1. Firestore Database Structure

Create a collection named books with the following structure:

{
  "title": "Book Title",
  "coverPhotoUrl": "https://example.com/cover.jpg",
  "pdfUrl": "https://example.com/book.pdf",
  "language": "English",
  "pages": 250,
  "description": "Book description here...",
  "dateTime": "2025-01-01T00:00:00.000Z"
}
  1. Firestore Security Rules
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /books/{book} {
      allow read: if true;  // Public read access
      allow write: if false; // Only admins can write
    }
  }
}

Running the App

  1. Connect a device or start an emulator
# List available devices
flutter devices

# Start an Android emulator
flutter emulators --launch <emulator_id>

# Start an iOS simulator (macOS only)
open -a Simulator
  1. Run the app
# Run in debug mode
flutter run

# Run on a specific device
flutter run -d <device_id>

# Run in release mode
flutter run --release
  1. Hot Reload

While the app is running, press:

  • r - Hot reload
  • R - Hot restart
  • q - Quit

πŸ“ Project Structure

hasper_ebook/
β”œβ”€β”€ android/                 # Android native code
β”œβ”€β”€ ios/                     # iOS native code
β”œβ”€β”€ lib/                     # Dart application code
β”‚   β”œβ”€β”€ components/         # Reusable widgets
β”‚   β”œβ”€β”€ models/             # Data models
β”‚   β”œβ”€β”€ providers/          # State management
β”‚   β”œβ”€β”€ repositories/       # Data layer
β”‚   β”œβ”€β”€ screens/            # UI screens
β”‚   β”œβ”€β”€ utils/              # Helper functions
β”‚   └── main.dart           # App entry point
β”œβ”€β”€ assets/                  # Static assets
β”‚   └── icons/              # App icons
β”œβ”€β”€ screenshots/            # App screenshots
β”œβ”€β”€ web/                    # Web platform support
β”œβ”€β”€ pubspec.yaml            # Dependencies
β”œβ”€β”€ firebase.json           # Firebase configuration
└── README.md               # This file

πŸ“¦ Building for Production

Android

  1. Configure signing

Create android/key.properties:

storePassword=<your-store-password>
keyPassword=<your-key-password>
keyAlias=<your-key-alias>
storeFile=<path-to-keystore>
  1. Build APK
flutter build apk --release
  1. Build App Bundle (recommended for Play Store)
flutter build appbundle --release

Output: build/app/outputs/bundle/release/app-release.aab

iOS

  1. Open Xcode workspace
open ios/Runner.xcworkspace
  1. Configure signing in Xcode

    • Select Runner target
    • Go to Signing & Capabilities
    • Select your team and provisioning profile
  2. Build IPA

flutter build ipa --release
  1. Archive and upload to App Store via Xcode

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style

  • Follow Effective Dart guidelines
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Keep functions small and focused
  • Write unit tests for new features

Reporting Bugs

If you find a bug, please create an issue with:

  • Clear title and description
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots if applicable
  • Device and OS information

πŸ—ΊοΈ Roadmap

Current Version (v1.1.1)

  • βœ… Browse books with infinite scroll
  • βœ… View book details
  • βœ… Read PDFs in-app
  • βœ… Search functionality
  • βœ… Firebase Firestore integration

Planned Features

  • User Authentication

    • User login and registration
    • Personal reading lists
    • Reading history
  • Enhanced Reading Experience

    • Bookmarks and annotations
    • Night mode/Dark theme
    • Adjustable font sizes
    • Reading progress tracking
  • Social Features

    • Book ratings and reviews
    • Share favorite books
    • User profiles
  • Content Management

    • Categories and genres
    • Favorites collection
    • Download books for offline reading
  • Personalization

    • Reading recommendations
    • Recently viewed books
    • Customizable themes
  • Admin Panel

    • Web-based content management
    • Upload and manage books
    • Analytics dashboard

See the open issues for a full list of proposed features and known issues.


πŸ“„ License

Distributed under the MIT License. See LICENSE file for more information.

MIT License

Copyright (c) 2022-2025 Rezuanul Islam Fahim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ‘€ Contact

Rezuanul Islam Fahim


πŸ™ Acknowledgments


⭐ Star this repository if you find it helpful!

Made with ❀️ and Flutter

About

A hybrid E-Book mobile app created using Dart & Google's Flutter

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published