Skip to content

Latest commit

 

History

History
137 lines (88 loc) · 7.48 KB

CONTRIBUTING.md

File metadata and controls

137 lines (88 loc) · 7.48 KB

Contributing

First of all, thank you for thinking about contributing. 🔥

You're more than welcome to contribute to the project. When contributing, please keep in mind that the project is open source, therefore is maintained by several people - your code should be simple and readable. If there's a specific question you need to discuss with someone, please join our Slack.

How to Contribute

First of all, you should join our Slack, if you haven't already. Joining Slack is a great opportunity to meet the contributors of FogosPT projects and to discuss how you can help.

When you decide to contribute, gives us a shout at Slack so we can add you to the contributors (it's easy for us to test and validate your contributions if you branch of our repo than forking to your own repo).

If you already know us, take a look at the issues and take a stab at them. We'll try to make the issue as verbose as possible, so it is easy for you to help. When you're done, create a Pull Request (on the PR's description, you should include closes #<issue-number> so you know what issue you're fixing and to make sure the issue is closed when we merge your PR).

If you have a suggestion of a feature or a thing that should be improved, speak with us on Slack. We'll be more than happy to listen to your thoughts.

You don't need to code to help us. If you see some bugs or other things that could be better, open an issue on Github.

Setup and run project

This app is built with Flutter and Dart 2, follwing Redux's design Pattern.

Make sure you have installed Flutter following these instructions.

Important: We use the stable Flutter channel. Make sure you are on the same channel running

flutter channel stable

Clone our repo and check flutter doctor

git clone https://github.com/FogosPT/fogosmobile
cd fogosmobile
flutter doctor

Fix anything flutter doctor asks.

Now, you need configure some files and tokens to run app

Configure key.properties (android/key.properties)

If file key.properties is created, ⚠ only if created, you need add some variables to run app

# Config to firebase notifications
FCI_KEYSTORE_PASSWORD=myKeystorePassword
FCI_KEY_ALIAS=MyReleaseKey
FCI_KEY_PASSWORD=myKeypassword
# Config to create Android release
storePassword=MyStorePassword
keyPassword=MyKeyPassword
keyAlias=MyKeyAlias
storeFile=MyStoreFileRoute

This file is on .gitignore so it shouldn't show up on git status. If it does, be sure to not commit that file. After that, everything should be working normally.

Configure mapbox

Mapbox is a feature to use map into app. To use mapbox, you need config some enviroment variables and token. Follow this Android page and this iOS page or this steps:

  • Create a mapbox account here
  • Create a API Token with all secret scopes selected (ref)
  • Add two enviroment variables into your OS. A variable with name SDK_REGISTRY_TOKEN and other with name MAPBOX_DOWNLOADS_TOKEN, both with same value: the api token generate in previous step. This is necessary because this issue with flutter-mapbox package
  • Replace MAPBOX_DOWNLOADS_TOKEN in android/main/res/values/strings.xml with the same api token generated in mapbox page

Run project

Make sure you have a device connected (Simulator or Emulator or a real device connected) and then run

flutter pub get
flutter run

If when run don't work, please try this steps:

  • Run flutter clean
  • Reset your code editor (VS Code or Android Studio or whatever)

Reading material

If you want to know more about Dart and Flutter, follow this useful links:









Still have a question?

If you need to know anything that is not on this document, feel free to reach out via Slack or Twitter.