This project is a React Native app designed to provide real-time alerts and notifications for wildfire incidents in the Knuckles mountain region. The app allows users to report, confirm, and track wildfire events, engaging the community and forest officials in swift responses.
- Features
- Project Setup
- Branching Strategy
- Naming Conventions
- Code Quality
- Testing
- Contributing
- License
- Real-time wildfire alerts and notifications
- Map integration to locate fires
- Role-based actions (report, confirm, accept/decline)
- Notification escalation (app, SMS, and phone call)
Follow these steps to set up the app on your local machine.
- Node.js (>=20.x.x)
- Yarn or npm
- React Native CLI
- Android Studio or Xcode (for iOS development)
- Expo Go App (for test locally)
-
Clone the Repository
git clone https://github.com/InventorsUOP/LifeKnucles.git cd LifeKnules -
Install Dependencies
Using Yarn:
yarn install
Or using npm:
npm install
-
Running the App
For Expo go
npm startScan the QR code using expo go app
For iOS:
npx react-native run-ios
For Android:
npx react-native run-android
Our project follows a feature-branching strategy to ensure smooth collaboration and clean code management.
-
Development Branch:
- All new features must be branched off from the
developbranch.
- All new features must be branched off from the
-
Feature Branch Naming:
- Create a feature branch following this pattern:
feature/<developer_name>/<feature_name>. - Example:
feature/john_doe/login-page
- Create a feature branch following this pattern:
-
Branching from Master:
- Do not branch from
masterdirectly. - Branching from
masteris strictly reserved for release purposes.
- Do not branch from
-
Merging to Master:
- Only allowed during release phases, following strict review procedures.
-
Code Reviews:
- All feature branches must be reviewed by at least one team member before merging.
- No direct merges to
developormasterwithout a review.
-
Sonar Gate:
- All code must pass SonarQube scans.
- Resolve all SonarQube issues before merging any branch.
Consistency in naming is critical for maintaining readable and understandable code.
- Page names should follow the format:
Login-Page,Dashboard-Page, etc. - When used in the code, they should be renamed as:
loginPage,dashboardPage.
- Components should follow
PascalCase.
Example:
LoginButton,FireAlertModal.
- File names should use the same naming conventions as the components and pages:
- For a page component:
LoginPage.tsx - For a reusable component:
LoginButton.tsx
- For a page component:
We ensure adherence to coding standards using SonarQube to scan for best practices, vulnerabilities, and code smells.
- All SonarQube issues must be resolved before a branch can be merged.
- Regularly run the SonarQube scanner to maintain code quality:
- Install sonarlint extention for VS Code
-
All new features and bug fixes should include corresponding unit tests.
-
Use Jest for testing components and logic:
yarn test -
Make sure tests pass before submitting a pull request.
- Aim for at least 80% coverage of unit tests across all files.
- SonarQube will report on test coverage and highlight any untested code.
To contribute to this project, follow these steps:
- Create a Branch from
developfollowing the branching strategy. - Work on your feature.
- Ensure that all SonarQube issues are resolved.
- Submit a pull request for review.
- Your feature will be reviewed by at least one team member.
- Once approved, the feature will be merged into
develop.
- Never branch directly from
master. - Never merge directly into
master. All merges intomastershould only be done during release phases after code review and approval.
This project is licensed under the MIT License.
To streamline the contribution process, we use standardized issue and pull request templates.
- In your project repository, create a folder named
.github. - Inside
.github, create two files:ISSUE_TEMPLATE.mdPULL_REQUEST_TEMPLATE.md