Atrate / libgen_mobile_app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LibGen Mobile

This is a non-offical mobile client for Library Genesis service. It's an independent side project. And it's Open Source, so feel free to collaborate.

The app is built with Flutter and it'll be submitted to FDroid.

Currently, we're working mainly in Android version.

Versión en español

Features

  • Search books by title, author, series, publisher, ISBN or MD5
  • Order results by relevance, title, year, pages or file size
  • Decide ordering criteria according to sorting option (newer firsts, smaller first, etc)
  • See book detailed info:
    • cover
    • title
    • author
    • description
    • table of contents
    • year
    • volume
    • series
    • edition
    • publisher
    • city
    • pages
    • language
    • ISBN
    • DOI
    • file size
    • fiel extension
  • Show historial as suggestions
  • Download book
  • Switch between ligh and dark theme
  • Show info dialog

TODO

The following is a list of desired new features within the scope of the project. Notwithstanding, we're happy to hear new ideas and feeback.

  • Share book
  • Search books in other sections of LibGen (fiction, scientific articles, etc)
  • Allow for switching between languages, instead of only using the system's
  • Translate to other languages
  • UI improvements (smoother animations, colors, layout, fonts, etc)

We recommend to submit first an issue to discuss ideas, instead of directly send a PR.

An important issue that affects the overall UX of the app is the API performance. Any improvement will be welcomed.

Environment

Flutter and Dart

  • Flutter: version 1.22.4 (channel stable)
  • Dart: version 2.10.4 (stable)

Environment config

We're managing the different stages of the app (basically, development and production) throught compile time variables (check this article for information). The only environmental variable in use right now is LIBGEN_MOBILE_API. This allow us to pass a development and production API URL directly from CLI commands.

To run the app with compile time variable, use the following command:

flutter run --dart-define=LIBGEN_API_URL=<VALUE>

Also, in VSCode, it could be useful define a launch.json file to debug. Such file would look like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "emulator",
            "request": "launch",
            "type": "dart",
            "args": [
                "--dart-define=LIBGEN_API_URL=http://10.0.2.2:3000",
            ]
        },
    ]
}

This flag also works with flutter build apk and others similar commands.

Libgen API

Library Genesis doesn't provide a public API to work with, so we decided to build a backend service to consume. It's currently hosted in Heroku.

Check the repo to run your own instance and pass the corresponding URLs to the app throught compile time variables.

Dependencies

The followings are all the official and third-party packages in use right now.

Internationalization

  • flutter_localizations:
    • sdk: flutter
  • intl: ^0.16.1

Additionally, for generating the needed boilerplate we used the VSCode plugin Flutter Intl. This way, is recommended using this plugin to automatically generate new code for new locales. Unfortunately, the offical docs seems to be outdated.

API requests

State management

Downloads

For downloading, we're using a fork of flutter_downloader package. Check pubspec.yaml for details.

Open download link in browser

Render HTML content

For rendering HTML, we're using a fork of simple_html_css package. Check pubspec.yaml for details.

Local storage

Code generation

Others

About

License:GNU General Public License v3.0


Languages

Language:Dart 99.4%Language:Swift 0.4%Language:Kotlin 0.1%Language:Objective-C 0.0%