From 388ad24a8d96a9c197bac9acf2589f4301db1a52 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Tue, 22 Sep 2020 01:25:50 +0000 Subject: [PATCH] added contributing file --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..98d5a46 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributing + +...is welcome! + +## Issue tracking / Repository + +From issues to wikis: everything is on [GitHub](https://github.com/krawieck/lemmur) + +## Architecture + +Lemmur is written in Dart using [Flutter](https://flutter.dev/docs). To communicate with Lemmy instances [lemmy_api_client](https://github.com/krawieck/lemmy_api_client) is used. + +### State management + +[MobX](https://github.com/mobxjs/mobx.dart) is used for global state management, [flutter_hooks](https://github.com/rrousselGit/flutter_hooks) is used for local (widget-level) state management. `StatefulWidget`s are avoided all together and any state logic reuse is moved to a [custom hook](./lib/hooks). + +### Project structure + +(relative to `lib/`) + +- `hooks/`: reusable state hooks +- `pages/`: fullscreen pages that you navigate to +- `stores/`: MobX global stores +- `util/`: utils +- `widgets/`: reusable widgets; building blocks for pages +- `main.dart`: entrypoint of the app. Sets up the stores, initializes the themes, renders the first page + +### Things to keep in mind + +- Be aware that Lemmur supports arbitrary Lemmy instances, don't hardcode instance urls +- Remember that a user is not obligated to be logged in, contributed widgets should handle this case + +## Linting / Formatting + +Everything is formatted with `dartfmt` (no flags) and linted with `dartanalyzer` ([see rules](analysis_options.yaml)). Both are enforced by the CI.