Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme update #153

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1c5dc2d
I just updated the readme
Luckyjoseph Nov 26, 2024
9f7bcba
pj edits complete
MetzinAround Nov 27, 2024
dcbf537
Merge pull request #152 from MetzinAround/pj-edits-for-lucky
Luckyjoseph Dec 2, 2024
9cad5ed
Update setup documentation for clearer project initialization steps
Luckyjoseph Dec 11, 2024
431121c
Enhance contributing guidelines with additional setup steps and Slack…
Luckyjoseph Dec 19, 2024
d67335a
Update contributing guidelines and setup documentation for clarity an…
Luckyjoseph Dec 19, 2024
5110536
Fix link to setup documentation in contributing guidelines
Luckyjoseph Dec 20, 2024
acc04e3
Add firebase resource
Luckyjoseph Dec 22, 2024
2d735d9
Refactor README for improved clarity and formatting of feature descri…
Luckyjoseph Dec 22, 2024
0bcf36f
Update setup documentation for clarity and organization
Luckyjoseph Dec 24, 2024
c8fae37
Fix formatting in setup documentation for SSH key instructions
Luckyjoseph Dec 24, 2024
52236fb
Update contributing guidelines to reflect branch naming changes
Luckyjoseph Dec 26, 2024
f7f9e15
Add project setup guide link to README for improved onboarding
Luckyjoseph Dec 26, 2024
cf3ff71
Fix grammatical error in project setup instructions in README
Luckyjoseph Dec 26, 2024
21fdfdb
Clarify wording in contribution instructions in README
Luckyjoseph Jan 8, 2025
bad6aff
Enhance Docker setup instructions with prerequisites and detailed ste…
Luckyjoseph Jan 8, 2025
d8ced2f
Improve project startup instructions with additional details on build…
Luckyjoseph Jan 8, 2025
a556d23
Format Development Adminer DB credentials section for better readability
Luckyjoseph Jan 8, 2025
6025751
Update README for improved clarity and contribution guidelines
Luckyjoseph Jan 8, 2025
da44c3e
Correct spelling of "Personalize" to "Personalise" in README
Luckyjoseph Jan 8, 2025
9e1be8e
Update README to rename "Contribution Guidelines" section to "How to …
Luckyjoseph Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .k8s
Submodule .k8s added at c5d438
46 changes: 41 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,54 @@
# Contributing

Thank you for considering contributing to this project! Your efforts make a significant difference in the quality and success of this project.
👍🥳 First off, thank you for considering contributing to this project! Your efforts make a significant difference in the quality and success of this project.🥳👍

Before contributing, please familiarize yourself with the README and documentation to get setup.
The guide assumes that you have read and understood the readme file, able to [Setup](./docs/setup.md) the project on your local machine and familiar with JavaScript, React and Typescript.

## How to Contribute

## 1. Join the slack channel

In the channel, send an introductory message with your GitHub handle/username asking to be added to the GitHub repository (this repository).

## 2. Installing Git

Before cloning your forked repository to your local machine, you must have Git installed. You can find instructions for installing Git for your operating system [here](https://git-scm.com/downloads). Please note that if you have a Mac the page offers several options.

## 3. Fork the repository

You can fork the PeriodTracker repository by clicking 🍴 [Fork](https://github.com/Oky-period-tracker/periodtracker/fork) . A fork is a copy of the repository that will be placed on your GitHub account.

Note: It should create a URL that looks like the following -> https://github.com/<your_GitHub_user_name>/periodtracker

For example -> https://github.com/octocat/periodtracker.

## 4. Create a new branch

Create a branch for your changes to keep your work organized and separate from the main codebase:

```
git checkout -b feature/your-feature-name
```

After forking the repo, you can proceed with the guide on [contributing.md](./CONTRIBUTING.md) on how to setup the project in your local machine.

### 5. Install local codebase spell checker

You must use VS Code as your local text editor to install the VS Code extension for spell checking your codebase, Code Spell Checker.

The recommended installation method is to install Code Spell Checker directly from the VS Code text editor, and those instructions can be found [here.](https://code.visualstudio.com/docs/editor/extension-marketplace) The extension can also be installed via the VS Code Marketplace website [here.](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)

For developers who do not use VS Code, use the corresponding npm package, cspell, and those instructions can be found [here.](https://www.npmjs.com/package/cspell)

### 6. How the team works with GitHub Issues

We follow the Gitflow workflow to ensure our project's development process is organized and efficient. Here’s how you can contribute:

Switch to the `develop` branch and get the latest changes
Switch to the `master` branch and get the latest changes

```bash
git checkout develop
git pull origin develop # Ensure you're up to date
git checkout master
git pull origin master # Ensure you're up to date
```

1. Create a New Branch.
Expand Down
87 changes: 66 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,88 @@
![Oky Logo](https://cdn-jeekn.nitrocdn.com/YMylMApFOdicfeUXuODDpSFiUbWeZeKg/assets/images/optimized/rev-3ff2ed2/oky.nyc3.cdn.digitaloceanspaces.com/2020/12/oky-primary-logo-rgb.png)

# Period tracker

This is a period tracker application monorepo, consisting of a React Native app, a CMS and an API.
Oky is the world’s first period tracker app that was made with girls' input.

It provides important information about menstruation in fun, creative, and positive ways. And it brings it straight into girls’ hands through the tool they use most often every day – mobile phones.

Oky lets girls feel in control and more confident by tracking their periods, and getting information that all girls should have access to.

# Oky's Features

- :calendar: Calendar

> Oky’s calendar predicts your period with daily or monthly views, becoming more accurate the more you use the tracking. However, irregular periods may cause occasional inaccuracies.

- :girl: Personalise Oky

> Customize your Oky experience by selecting a guiding friend and theme, with the option to change them anytime.

- :two_women_holding_hands: Buddies
> Personalize your Oky app by choosing a guiding friend and theme, and switch them whenever you like!
<!-- is the above friend another human using the app? -->
- :notebook_with_decorative_cover: Encyclopedia

> Oky’s encyclopedia provides expert-reviewed information on periods and the body, with content tailored for girls with and without disabilities.

- :ledger: Daily Diaries
> Track your feelings daily to understand yourself better, with health tips and fun quizzes to help you learn more!

# Oky's Principles

- :girl: Girl-led design

> Oky was designed with input from girls in Mongolia and Indonesia, ensuring it stays relevant by letting those who would benefit most shape its design, features, and name.

- :video_game: Gamified Approach

> Oky is a girl-centered app that combines gamification for fun learning and discreet period tracking. Users can personalize avatars, unlock features, play quizzes, and enjoy positive, stigma-free content.

- :girl:Design for girls digital realities

> Oky is lightweight, offline-friendly, supports shared phones, and has secure passcode protection, all tailored to girls' contexts and languages.

- :heavy_check_mark:Evidence-based content

[Install Software Dependencies](./docs/dependencies/index.md)
> Oky provides expert-vetted, girl-friendly information on menstruation, puberty, and reproductive health, along with referrals to support services.

[Set Up the Project](./docs/setup.md)
- :open_hands:Open source

[Start the Project](./docs/start_project.md)
> Oky’s open-source code and content are free to access, fostering co-creation and a global community. The code is available on GitHub under the AGPL-3.0 License, and content can be requested.

[Run the project locally](./docs/run_project.md)
- :free:Accessible and inclusive

[Test the Project](./docs/tests.md)
> Oky is designed with input from girls with disabilities and follows accessibility guidelines to ensure wide reach. Partners also receive expert guidance on inclusion and best practices. <!-- what accesibility guidelines were/are followed?-->

[Overview of deployment and architecture](./docs/deployment/deployment_overview.md)
- :lock:Private and secure
> Oky prioritizes privacy by not collecting personal information. It’s password-protected, stores data locally, works offline, and only saves non-identifiable data and historic cycle dates online for cross-device access.

[Deploy the Project](./docs/deployment/deployment.md)
# Oky's Users

[Common Commands, Testing, Tips, and Tools](./docs/misc.md)
- :girl:Oky for girls

---
> Oky is designed for girls aged 10 to 19 but is helpful for anyone learning about menstruation. It provides engaging, accessible content to manage periods and supports girls with disabilities through accessibility features.

### Localisation
- :boy:Oky for boys

[Translations](./docs/localisation/translations.md)
> Boys can also benefit from Oky by exploring the encyclopedia to learn about puberty and other relevant topics for adolescent boys.

[Updating content](./docs/localisation/updating_content.md)
- :family:Oky for parents

[Lottie & image validation](./docs/localisation/asset_validation.md)
> Oky provides parents and caregivers with information to support adolescent daughters, including those with disabilities, in managing periods and puberty.

---
- :school:Oky for teachers
> Oky offers teachers, health workers, and community members evidence-based information on menstruation, puberty, and reproductive health. It can be used in classrooms to complement lessons and engage students in a fun, educational manner.

### Code
# How to get started:

[Contributing](./CONTRIBUTING.md)
We welcome code and on-code contributions to this project! Please follow these steps to get started:

[Submodules](./docs/modules.md)
- Setup the project by following the instruction in the [Project Setup Guide](./docs/setup.md) to prepare the environment
- Start the project using the provided [Steps.](./docs/start_project.md) to start the backend, CMS, and API for development.

[Importing optional submodules](./docs/code/optional_submodules.md)
- Connect with us on our Slack/Discord channel to stay updated, connected and collaborate! <!-- maybe link it here?-->

[Understanding the CMS & API routes](./docs/code/routes.md)
- Read our [CONTRIBUTING](./CONTRIBUTING.md) guidelines for detailed steps on contributing code, reporting issues or suggesting features.

[Recommended reading for developers](./docs/code/recommended_reading.md)
By following these steps, you’ll be ready to make meaningful contributions to the project. Thank you for your support!
1 change: 1 addition & 0 deletions app/src/resources
Submodule resources added at 0dd590
139 changes: 108 additions & 31 deletions docs/setup.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
## Setup
## Setting up the project

[Generate an ssh key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
In setting up this project you are required to follow this steps and implement them one after the other in the following sequence regardless of your local machine.

[Add the ssh key to your GitHub account](https://docs.github.com/en/enterprise-cloud@latest/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)
### Generate and add ssh key to your GitHub Account

Clone the repository:
To effectively run the "Oky Period Tracker" project, setting up and adding an SSH key to your GitHub account is essential for secure and seamless communication between your local machine and GitHub. SSH keys allow you to clone the repository, push code changes, and pull updates without repeatedly entering your GitHub credentials, ensuring a smoother development workflow and enhanced security for your project interactions.

- Use the [Guide to generate an ssh key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)

- Follow the steps to [Add the ssh key to your GitHub account](https://docs.github.com/en/enterprise-cloud@latest/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)

### Clone the repository:

Open your terminal and run the following command to clone the project:

```bash
git clone REPO_SSH_URL
git clone https://github.com/Oky-period-tracker/periodtracker.git
```

<strong>Note:</strong> 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:
After cloning the project to your local machine, navigate to the root directory of the project:

```bash
cd periodtracker
```

Install the dependencies:
### Install the dependencies:

- Install the required dependencies:

- Ensure that Node.js is installed on your local machine.[Download Node.js here](https://nodejs.org/en)

- Install Yarn globally:

```
npm install -g yarn
```

At the root directory of the project (e.g., `C:\Users\lucky\periodtracker`)

Run this

```bash
yarn
```

Navigate to the `/app` directory and install the node_modules:

```bash
cd app
```

```bash
yarn
Expand All @@ -28,50 +58,99 @@ 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
- Ensure you are at the root directory before running these commands

```bash
yarn copy-config
```

## Modules

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
Parts of the project, such as assets and translation files, are stored in Git submodules. These submodules allow for easy swapping and sharing without affecting the core repository.

> If you have local changes / commits that have not been pushed to github, they will be lost after running this command
- To reset and download the submodules listed in your urls.sh file, run this command

```bash
yarn modules
```

> [Here](./modules.md) you will find an explanation of this command, and instructions on setting up your own module repositories
- This command removes any existing submodules and downloads new ones based on the URLs specified in urls.sh.
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 submodules, update the URLs in your urls.sh file and re-run the command

- Note: Local changes or commits not pushed to GitHub will be lost after running this command.

Refer to [Modules.md](./modules.md) The documentation has been updated to include a detailed and organized explanation of the project setup steps. Let us know if further adjustments are needed!

## Firebase

For firebase to run, you need 3 files
Firebase Setup Documentation

- /packages/cms/firebase-config.json
- /app/src/resources/google-services.json
- /app/src/resources/GoogleService-Info.plist
Required Files

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](https://learn.buildfire.com/en/articles/2060582-how-to-set-up-your-firebase-certificates-for-ios-and-android) Project. Alternatively, if you are taking over a project, request these files from whoever has access to your firebase project.
To set up Firebase for this project, you will need the following files:

You will need to enter your application id / bundle id. The values of these ids can be edited in your`app.json`, which should be kept in your `/app/src/resources` submodule
- `/app/src/resources/google-services.json` (Android)

You will need to have 2 apps via the [firebase console](https://console.firebase.google.com/), 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](https://learn.buildfire.com/en/articles/2060582-how-to-set-up-your-firebase-certificates-for-ios-and-android).
- `/app/src/resources/GoogleService-Info.plist` (iOS)

For the CMS, go to:
`Project settings > Service accounts > Firebase Admin SDK > Generate new private key`
- /`packages/cms/firebase-config.json` (CMS)

This will automatically download a json file, rename this as `firebase-config.json` and save it in the /cms folder as listed above.
### Initial Setup

### Push notifications
If you are setting up this project for the first time, follow these steps:

The app makes use of firebase messaging to receive push notifications from the CMS.
- Create a Firebase Project:

Using this [guide](https://learn.buildfire.com/en/articles/2060582-how-to-set-up-your-firebase-certificates-for-ios-and-android) to learn how to create Android and iOS project on Firebase. After learning about the steps, you can proceed to the
[Firebase console](https://console.firebase.google.com/u/0/) and create a new project for Android and iOS.

- Set Application ID / Bundle ID:

- In your project, locate your application id or bundle id in the `app.json` file.

- This file should be located in the `/app/src/resources`submodule.

- Create Firebase Apps:

Create two apps within your Firebase project:

- One for Android.

- One for iOS.

- Download the respective configuration files:

- For Android: `google-services.json.`

- For iOS: `GoogleService-Info.plist.`

- Place these files in the appropriate locations as listed above. which is the `app/src/resources folder.`

### CMS Setup

For the CMS, follow these steps:

- Navigate to the Firebase Console:

- Go to Project `settings > Service accounts > Firebase Admin SDK.`

- Generate a Private Key:

- Click on Generate new private key.

- A JSON file will be downloaded automatically.

- Save and Rename:

- Rename the downloaded file to firebase-config.json.

- Place it in the /cms folder which is located at /packages/cms in the project.

### Push Notifications

The app uses Firebase Messaging to handle push notifications sent from the CMS.

Ensure that your `app.json` file includes this:

Expand All @@ -90,5 +169,3 @@ Ensure that your `app.json` file includes this:
For Apple you will need to make sure you have added the [Apple Push Notifications](https://learn.buildfire.com/en/articles/5760994-how-to-set-up-your-apple-push-notification-key-for-your-ios-firebase-certificate).

Read more [here](https://rnfirebase.io/messaging/usage), 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`
Loading