https://github.com/glific/mobile
https://github.com/glific/mobile
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/glific/mobile
- Owner: glific
- Created: 2023-03-04T20:48:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T22:09:22.000Z (about 2 years ago)
- Last Synced: 2025-04-20T01:58:10.557Z (about 1 year ago)
- Language: TypeScript
- Size: 3.56 MB
- Stars: 8
- Watchers: 4
- Forks: 17
- Open Issues: 8
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Glific mobile
## Getting Started
### Prerequisites
- Nodejs >=@18.16.0
- Android SDK
- Yarn >=@v1.22.19
### Setup
The following setup helps you to run the application on an android machine. Read the [documentation](https://reactnative.dev/docs/running-on-simulator-ios) of react-native to know about running it on iOS devices.
1. Clone the repository
```sh
git clone git@github.com:glific/mobile.git
```
You can also use https to clone the repository. To know more read this [documentation](https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html#clone-with-https).
2. Now change the directory by navigating into the cloned repository. Use the following command, in case of linux.
```sh
cd mobile
```
1. Create an environment file in the project's home directory with the filename `.env`, copy the contents from `.env.example` and update the key-value pairs based on the current environment the application is running in.
2. Install the dependencies using yarn.
```sh
yarn install
```
1. Start the metro server.
```sh
yarn start
```
Note that you need to connect either an android device or an emulator with your PC to run the application.
### Testing (Android phone)
- Download Expo Go app from playstore
- Scan the QR from your CLI
## Contributing
### Pull Request Submission Guidelines
When submitting a pull request, please ensure that it meets the following requirements:
- The code passes all relevant unit test cases.
- The pull request references the related issue and clearly explains the problem it aims to solve.
- The code has been scanned for any deepscan issues and none are present.
- The code follows the project's formatting guidelines and has been formatted using prettier.
Please make sure to address all the checkboxes above before submitting your pull request. This will help in ensuring the quality and maintainability of the project.
## Developer Guidelines
### Theme Constants Usage
Import the project theme constants from the constants folder:
```sh
import { COLORS, SIZES, FONTS, SCALE } from '/path/to/constants';
```
Here are the project theme constants available for usage:
- **COLORS**: Contains color-related constants, ex. `COLORS.primary400`.
- **SIZES**: Includes size-related constants, ex. `SIZES.m10`, `SIZES.r4` etc.
- **FONTS**: Provides font-related constants, ex. `...FONTS.regular14`.
- **SCALE**: Offers custom scaling constants which are not included in SIZES for text and other UI elements, ex. `SCALE(100)`.
Refer to the /constants/theme.ts file containing the project theme constants.
### Naming Convention for testID and class
- For `testID` and `class` attributes used in your code, follow the camelCase naming convention.
- Use lowercase for the first letter of the attribute name and capitalize the first letter of subsequent words within the name.
Example:
```jsx
// Correct:
// Incorrect:
```
Following these guidelines helps to ensure a smoother development process and easier maintenance.
If you have any questions or need further assistance, feel free to reach out to the project team. Happy coding!