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.
- 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
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.
- Flutter: version 1.22.4 (channel stable)
- Dart: version 2.10.4 (stable)
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.
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.
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
- http: ^0.12.2
State management
- flutter_bloc: ^6.0.6
- hydrated_bloc: ^6.1.0
Downloads
For downloading, we're using a fork of flutter_downloader package. Check pubspec.yaml
for details.
- flutter_downloader
- downloads_path_provider: ^0.1.0
- permission_handler: ^5.0.1+1
Open download link in browser
- url_launcher: ^5.7.10
Render HTML content
For rendering HTML, we're using a fork of simple_html_css package. Check pubspec.yaml
for details.
Local storage
- hive: ^1.4.4+1
- hive_flutter: ^0.3.1
Code generation
- json_annotation: ^3.1.0
- build_runner: ^1.10.3
- json_serializable: ^3.5.0
- hive_generator: ^0.8.2
- equatable: ^1.2.5
Others
- dartz: ^0.9.2
- expandable: ^4.1.4
- package_info: ^0.4.3+2