- Notifications
You must be signed in to change notification settings - Fork161
Understand and reduce your carbon footprint 🌱 iOS & Android.
License
NMF-earth/nmf-app
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Repository for theNMF.earth React Native application, built with Expo, Redux Toolkit and Typescript.Design can be found onFigma.
Carbon data comes from NMF'scarbon footprint repo while barcode product scanned data comes fromOpen Food Facts api.
Installing Dependencies:
$ yarn
Running the app:
$ yarn start
For starting the app on a specific OS:
$ yarn ios| yarn android
Eslint is used in the project to enforce code style and should be configured in youreditor.
Prettier is also used and apply automatically by eslint
Typescript is used in the project for type-checking and should be configured in youreditor.
You can check this manually by running:
$ yarn lint
or
$ yarn typescript
You can ask eslint to fix issues by running:
$ yarn lint:fix
Use the following command to run unit tests with coverage:
$ yarntest
Use the following to update unit tests
$ yarntest -u
Use the following to run unit tests in watch mode while developing:
$ yarntest --watch
Stories (*.story.tsx) can be automatically added tostoryLoader.js
with :
$ yarn prestorybook
To place new.md
files insideguides
folder or modify existing guide and then runnode scripts/generate-guides.js
to generate a new sustainable guide. Images can be used in the.md
as follow:
and should be place inassets/images/guide
.
For methodology screen, just runnode scripts/generate-methodology.js
to updatemethodology.json
frommethodology.md
.
For emission info screen, just runnode scripts/generate-emission-info.js
to updateemission-info.json
fromassets/emission-info/markdown/*.md
.
You can help us with translate the app with our online toolPOEditor. Any help is appreciate and no coding skills are needed 🤗
PS: please do not use send translations made by Google translate or similar.
Runnode scripts/generate-translation-files.js
in order to create the files needed for the new language you want to add to the app.
Runnode scripts/poeditor/group-translation-files.js
to generate 1 JSON file per language, with all the translation vars in it. From there, you can easily make any edit you want. When you're done, you can runnode scripts/poeditor/spread-translation-files.js
to merge your edits and spread them into all the translation files across the repo.
Any tag starting withv
will runs expo publish. During this stepapp.example.json
is used to generate anapp.json
file for expo's deployment, this is done with the following scriptscripts/generate-app-json.js
.
First you need to configureSENTRY_AUTH_TOKEN
andSENTRY_DSN
secrets onexpo.dev and then defineprojectId
inapp.config.js
. Then runnpm install dotenv
and place your secrets inside.env
file that you need to create withSENTRY_AUTH_TOKEN
andSENTRY_DSN
, like in.env.example
.
Runeas build -p ios
to build for theApp Store Connect andeas build -p android
for theGoogle Play Console.
More than 40 developers have contribute to the app, thanks a lot tothem!
Have a look tocontributing.md if you want to contribute!
A big thank you toChristopher Gwilliams and to the Phelps family for their amazing contribution to theKickstarter!
Repository and contributions are underGNU General Public License v3.0
About
Understand and reduce your carbon footprint 🌱 iOS & Android.