diff --git a/README.md b/README.md index 95cc4baba..9f8ea3a8f 100644 --- a/README.md +++ b/README.md @@ -7,26 +7,15 @@ Mobile Wallet is an Android-based framework for mobile wallets based on top of < that can be used as a dependency in any other wallet based project. It is developed at MIFOS together with a global community. -| Master | Development | Chat | -|------------|-----------------|-----------------| -| ![Mobile-Wallet CI[Master/Dev]](https://github.com/openMF/mobile-wallet/workflows/Mobile-Wallet%20CI%5BMaster/Dev%5D/badge.svg?branch=master) | ![Mobile-Wallet CI[Master/Dev]](https://github.com/openMF/mobile-wallet/workflows/Mobile-Wallet%20CI%5BMaster/Dev%5D/badge.svg?branch=dev) | [![Join the chat at https://gitter.im/openMF/mobile-wallet](https://badges.gitter.im/openMF/mobile-wallet.svg)](https://gitter.im/openMF/mobile-wallet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | - -## Screenshots - -

- - - -

-

- Click here for more screenshots -

+Development | Chat | +|-----------------|-----------------| +![Mobile-Wallet CI[Master/Dev]](https://github.com/openMF/mobile-wallet/workflows/Mobile-Wallet%20CI%5BMaster/Dev%5D/badge.svg?branch=dev) | [![Join the chat at https://gitter.im/openMF/mobile-wallet](https://badges.gitter.im/openMF/mobile-wallet.svg)](https://gitter.im/openMF/mobile-wallet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ## How to Contribute -This is an OpenSource project and we would be happy to see new contributors. The issues should be raised via the GitHub issue tracker. -For Issue tracker guidelines please click here. All fixes should be proposed via pull requests. -For pull request guidelines please click here. For commit style guidelines please click here. +Thank you for your interest in contributing to the Mobile Wallet project by Mifos! We welcome all contributions and encourage you to follow these guidelines to ensure a smooth and efficient collaboration process. + +The issues should be raised via the GitHub issue tracker. For Issue tracker guidelines please click here. All fixes should be proposed via pull requests. For pull request guidelines please click here. For commit style guidelines please click here. ### Branch Policy @@ -47,54 +36,172 @@ We have the following branches : * **master** The master branch contains all the stable and bug-free working code. The development branch once complete will be merged with this branch. + +### Demo credentials +Fineract Instance: demo.mifos.io +username: demoUser123 +password: password - * **redesign** - The app is presently being redesigned. All the work done under the redesign domain should be committed to this branch. - -## Development Setup +### Development Setup Before you begin, you should have already downloaded the Android Studio SDK and set it up correctly. You can find a guide on how to do this here: [Setting up Android Studio](http://developer.android.com/sdk/installing/index.html?pkg=studio). -## Building the Code +1. **Fork the Git Repository** + + Forking the repository is the first step to start contributing. Click on the "Fork" button in the top right corner of the **[Mobile Wallet (Mifos Pay) repository](https://github.com/openMF/mobile-wallet)** to create your own fork. + + ![image](https://user-images.githubusercontent.com/44428198/254533248-3016c6eb-30b7-492b-91e8-dbbb61f76775.png) -1. Fork the repository. + Forking creates a copy of the project under your GitHub account. This enables you to work on changes without affecting the original repository directly. + +2. **Clone the Forked Repository** + + Once you have forked the repository, you need to clone it to your local development environment. Open a terminal or Git Bash and use the following command: + + ```bash + git clone https://github.com/yourUsername/mobile-wallet.git + ``` + + Replace **`yourUsername`** with your actual GitHub username. Cloning creates a local copy of the repository on your machine, allowing you to make changes and contributions. + +3. **Working Locally on Your Cloned Repository** + + After cloning, navigate to the project directory using the terminal or Git Bash. + + Before making any changes, create a new branch dedicated to the feature or bug fix you'll be working on: + + ```bash + git checkout -b "new-branch-name" + ``` + + Ensure that **`new-branch-name`** reflects the purpose of your changes (e.g., **`add-payment-feature`** or **`fix-bug-123`**). + + Make the necessary changes to the files to address the issue you're working on. Once you're done, you will be ready to proceed with verifying and committing your changes. + +4. **Perform a Gradle Check** + +All your pull requests must pass the CI build only then, it will be allowed to merge. Sometimes, when the build doesn't pass you can use these commands in your local terminal and check for the errors,
-2. Go to your fork and clone only the dev branch using `git clone -b dev `(remote_repo url refers to your fork). +For Mac OS, you can use the following commands: -3. Click on 'Open an existing Android Studio project'. +* `./gradlew check` quality checks on your project’s code using Checkstyle and generates reports from these checks.
+* `./gradlew spotlessApply` an check and apply formatting to any plain-text file.
+* `./gradlew build` provides a command line to execute build script.
-4. Browse to the directory where you cloned the mobile-wallet repo and click OK. -5. Let Android Studio import the project. +For Windows, you can use the following commands: -6. Let the gradle sync. +* `gradlew check` quality checks on your project’s code using Checkstyle and generates reports from these checks.
+* `gradlew spotlessApply` an check and apply formatting to any plain-text file.
+* `gradlew build` provides a command line to execute build script.
-7. There should be no errors in gradle build. +### **Committing Your Changes** -8. Set your remote upstream to the remote repository to pull changes whenever needed, using -`git remote add upstream https://github.com/openMF/mobile-wallet.git` +When you've finished making your changes and have tested them locally, it's time to commit your work: -9. Pull changes from dev branch of upstream, whenever needed, using -`git checkout dev` -`git pull upstream dev` +1. **Stage Changes** + + Use the following command to stage all changes: + + ```bash + git add . + ``` + + This adds all modified and new files to the staging area, preparing them for the commit. + +2. **Commit Changes** + + Commit your changes with a meaningful commit message that describes the purpose of your changes: + + ```bash + git commit -m "Your commit message goes here" + ``` + + A good commit message is concise and provides enough context about the changes made. Mifos follows its own commit style guidelines that you must follow. Learn more about it [here](https://github.com/openMF/mifos-mobile-cn/blob/master/COMMIT_STYLE.md). + +3. **Push Changes** + + Push your changes to your forked repository on GitHub: + + ```bash + git push origin new-branch-name + ``` + + Replace **`new-branch-name`** with the name of the branch you created earlier. -## GitHub Actions CI -GitHub Actions CI is a continuous integration service used to build and test software projects hosted at GitHub. We use GitHub Actions for continous integration and clean maintainence of code. All your pull requests must pass the CI build only then, it will be allowed to merge. Sometimes,when the build doesn't pass you can use these commands in your local terminal and check for the errors,
+### **Making a Pull Request** -For Mac OS, you can use the following commands: +Once your changes are pushed to your forked repository, you can initiate a pull request to merge your changes into the main project: -* `./gradlew check` quality checks on your project’s code using Checkstyle and generates reports from these checks.
-* `./gradlew spotlessApply` an check and apply formatting to any plain-text file.
-* `./gradlew build` provides a command line to execute build script.
+1. Navigate to the [Mobile Wallet (Mifos Pay) repository](https://github.com/openMF/mobile-wallet) on GitHub. +2. Click on the "Pull Requests" tab and then click "New Pull Request." +![image](https://user-images.githubusercontent.com/44428198/254533309-2df4dca7-aec3-4197-8b86-8b80988e08d7.png) -For Windows, you can use the following commands: +1. Ensure the base repository is set to "openMF/mobile-wallet" and the base branch is the main development branch `dev`. +2. Set the compare repository to your forked repository and the compare branch to the branch you just created with your changes (e.g., in my case, the head repository was set to “rchtgpt/mobile-wallet” and the comparison branch was `kotlin-migration-common`. +3. Fill out the pull request template, providing a clear description of your changes, why they are necessary, and any relevant information for the reviewers. +4. Click "Create Pull Request" to submit your changes for review. -* `gradlew check` quality checks on your project’s code using Checkstyle and generates reports from these checks.
-* `gradlew spotlessApply` an check and apply formatting to any plain-text file.
-* `gradlew build` provides a command line to execute build script.
+### **Squashing Your Commits** + +It is common for pull requests to undergo multiple rounds of review before being merged. To keep the Git history clean and organized, you should always squash your commits before finalizing the merge. Here's how you can do it: + +1. Squash your commits: + + ```bash + git rebase -i HEAD~x + ``` + + Replace **`x`** with the number of commits you want to squash. An interactive rebase will open, allowing you to choose how to combine the commits. Change **`pick`** to **`squash`** (or simply **`s`**) for all but the topmost commit. Save and exit the editor. + +2. Amend the commit message if needed. + + ```bash + git commit --amend + ``` + +3. Force push the changes to your forked repository: + + ```bash + git push --force origin your-branch-name + ``` + + Please note that force pushing rewrites the Git history, so use it with caution. + + +### **Solving Merge Conflicts** + +In some cases, your pull request might encounter merge conflicts when the changes cannot be automatically merged with the main branch. To resolve merge conflicts: + +1. Update your local branch with the latest changes from the main repository: + + ```bash + git fetch upstream + git checkout your-branch-name + git rebase upstream/master + ``` + +2. Git will pause when encountering conflicts. Open the affected files, resolve the conflicts manually, and save the changes. +3. After resolving all conflicts, stage the changes and continue with the rebase: + + ```bash + git add . + git rebase --continue + ``` + +4. Finally, force push the changes to your forked repository: + + ``` + git push --force origin your-branch-name + ``` + +Your pull request will be updated with the resolved conflicts, and the reviewers can proceed with the review process. Again, don’t forget to squash your commits. -### Instructions to get the latest APK +### Conclusion +By following these contribution guidelines, you're all set to start contributing to the Mobile Wallet (Mifos Pay) project. We appreciate your efforts and look forward to your valuable contributions. Happy coding! + +## Instructions to get the latest APK To get the latest apk fom the Github actions artifacts, follow these steps: @@ -106,3 +213,18 @@ To get the latest apk fom the Github actions artifacts, follow these steps: ## Wiki https://github.com/openMF/mobile-wallet/wiki + + +## Screenshots + +

+ + + +

+ +

+ Click here for more screenshots +

+ +