Add the ssh key to your GitHub account
Clone the repository:
git clone REPO_SSH_URL
Note: Replace REPO_SSH_URL
with the url for this repository. On github, click on the green Code button, select SSH and copy paste the url
Go to the root directory of the project:
cd periodtracker
Install the dependencies:
yarn
There are several untracked files which need to be created for the project to run, such as .env files. These can all be created from their templates with this one command
If your .env files already exist, re-running this command will not overwrite them
yarn copy-config
Parts of the project are kept in git submodules, such as assets and translations files, so that they can easily be switched out while still allowing everyone to share this core repo. The .gitmodules
file is untracked so that you don't need to commit changes to the core repo in order to change which modules you are using.
This one command will remove any submodules you currently have in your project, and download the submodules via the github URLs you have listed in your urls.sh
To switch between different submodules, simply change the URLs in your urls.sh
file, and re-run the command below
If you have local changes / commits that have not been pushed to github, they will be lost after running this command
yarn modules
Here you will find an explanation of this command, and instructions on setting up your own module repositories
For firebase to run, you need 3 files
- /packages/cms/firebase-config.json
- /app/src/resources/google-services.json
- /app/src/resources/GoogleService-Info.plist
If you are setting up this project for the first time, you will need to set up firebase you will need to create your own Firebase Project. Alternatively, if you are taking over a project, request these files from whoever has access to your firebase project.
You will need to enter your application id / bundle id. The values of these ids can be edited in yourapp.json
, which should be kept in your /app/src/resources
submodule
You will need to have 2 apps via the firebase console, within your new project. An iOS app and Android app, for the react native app. Download the config files for each app and place them in the correct location, the steps can be found here.
For the CMS, go to:
Project settings > Service accounts > Firebase Admin SDK > Generate new private key
This will automatically download a json file, rename this as firebase-config.json
and save it in the /cms folder as listed above.
The app makes use of firebase messaging to receive push notifications from the CMS.
Ensure that your app.json
file includes this:
{
"expo": {
"ios": {
"entitlements": {
"aps-environment": “production”
}
}
}
}
For Apple you will need to make sure you have added the Apple Push Notifications.
Read more here, bear in mind that this is an expo managed project, so changes within the native /android
and /ios
folders are not required
Notifications can also be customised eg the colour, via the app.json