Skip to content

Commit

Permalink
Document app architecture in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
holybiber committed Oct 17, 2023
1 parent 47a30c4 commit 64a78e9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ This app is an offline version of the website [4training.net](www.4training.net)

Both, the app and the website are projects by [holydevelopers.net](https://holydevelopers.net/).

## Architecture
* For navigation we use the Navigator with named routes ("Navigator 1.0", no routing package). See the folder [lib/routes/](lib/routes), especially the [overview of the route names](lib/routes/routes.dart).
* For viewing a page, we use route names that are the same as on the [4training.net](https://www.4training.net) website: `/view/PageName/languageCode`, e.g. `/view/Dealing_with_Money/de` for viewing https://www.4training.net/Dealing_with_Money/de
* For state management we use [Riverpod](https://pub.dev/packages/riverpod) (version 2 but without using code generation)
* Internationalization via the [standard flutter internationalization approach](https://docs.flutter.dev/ui/accessibility-and-localization/internationalization)
* Widgets are in the [lib/widgets](lib/widgets) folder

### Content: synchronized from a git repository
* The content comes as HTML and is rendered via the [flutter_html](https://pub.dev/packages/flutter_html) package
* The app works offline and displays only content that has been downloaded to the device. For each language we have a repository that is hosted on github. The location is `https://github.com/4training/html-languageCode`, for English it is https://github.com/4training/html-en.
* When the user decides to download a language, the contents of the corresponding repository are fetched with the [download_assets](https://pub.dev/packages/download_assets) package and stored on a folder on the device.
* The repository contains HTML files for each page, images and a JSON with the structure. It is generated by the `ResourcesBot` of our [pywikitools](https://github.com/4training/pywikitools) repository (see [ExportHTML](https://github.com/4training/pywikitools/blob/main/pywikitools/resourcesbot/export_html.py) and [ExportRepository](https://github.com/4training/pywikitools/blob/main/pywikitools/resourcesbot/export_repository.py))

## License
Jesus says in Matthew 10:8, “Freely you have received; freely give.”
We follow His example and believe His principles are well expressed in the developer world through free and open-source software.
Expand Down

0 comments on commit 64a78e9

Please sign in to comment.