chore: update guidelines (#150)
Update README.md and CONTRIBUTING.md [skip ci]
This commit is contained in:
+17
-15
@@ -1,10 +1,12 @@
|
|||||||
# Contributing Guidelines
|
# Contributing Guidelines [](https://github.com/openMF/web-app/issues)
|
||||||
|
|
||||||
When contributing to this repository, please first discuss the change you wish to make via an issue.
|
When contributing to this repository, please first discuss the change you wish to make via an issue.
|
||||||
|
|
||||||
Make sure you read the [Wiki](https://github.com/openMF/web-app/wiki).
|
Make sure you read the [Wiki](https://github.com/openMF/web-app/wiki).
|
||||||
|
|
||||||
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You can join our [gitter channel](https://gitter.im/openMF/community-app) if you have any queries. Each active repository has its own channel to direct questions to. Also join the [official gitter channel](https://gitter.im/openMF/mifos) of Mifos.
|
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. If you have got any questions, please email to our [mailing list](https://sourceforge.net/projects/mifos/lists/mifos-developer). You can also join our [gitter channel](https://gitter.im/openMF/web-app) to chat about your queries in real-time.
|
||||||
|
|
||||||
|
Each active repository has its own channel to direct questions to. Also join the [official gitter channel](https://gitter.im/openMF/mifos) of Mifos.
|
||||||
|
|
||||||
Remember that this is an inclusive community, commited to creating a safe, positive environment. See the whole [Code of Conduct](https://github.com/openMF/web-app/tree/master/.github/CODE_OF_CONDUCT.md) and please follow it in all your interactions with the project.
|
Remember that this is an inclusive community, commited to creating a safe, positive environment. See the whole [Code of Conduct](https://github.com/openMF/web-app/tree/master/.github/CODE_OF_CONDUCT.md) and please follow it in all your interactions with the project.
|
||||||
|
|
||||||
@@ -32,9 +34,9 @@ Note: Please do not work on an issue which is already being worked on by another
|
|||||||
```
|
```
|
||||||
git clone https://github.com/your-username/web-app.git
|
git clone https://github.com/your-username/web-app.git
|
||||||
```
|
```
|
||||||
- Make sure you are in the `develop` branch.
|
- Make sure you are in the `master` branch.
|
||||||
```
|
```
|
||||||
git checkout develop
|
git checkout master
|
||||||
```
|
```
|
||||||
- Create a new branch with a meaningful name before adding and commiting your changes.
|
- Create a new branch with a meaningful name before adding and commiting your changes.
|
||||||
```
|
```
|
||||||
@@ -64,7 +66,7 @@ git push origin branch-name
|
|||||||
```
|
```
|
||||||
git push origin remote-branch-name --force
|
git push origin remote-branch-name --force
|
||||||
```
|
```
|
||||||
- Follow the Pull request template and submit a pull request with a motive for your change and the method you used to achieve it to be merged with the `develop` branch.
|
- Follow the Pull request template and submit a pull request with a motive for your change and the method you used to achieve it to be merged with the `master` branch.
|
||||||
- If you can, please submit the pull request with the fix or improvements including tests.
|
- If you can, please submit the pull request with the fix or improvements including tests.
|
||||||
- During review, if you are requested to make changes, rebase your branch and squash the multiple commits into one. Once you push these changes the pull request will edit automatically.
|
- During review, if you are requested to make changes, rebase your branch and squash the multiple commits into one. Once you push these changes the pull request will edit automatically.
|
||||||
|
|
||||||
@@ -83,15 +85,15 @@ git remote add upstream https://github.com/openMF/web-app.git
|
|||||||
> upstream https://github.com/openMF/web-app.git (fetch)
|
> upstream https://github.com/openMF/web-app.git (fetch)
|
||||||
> upstream https://github.com/openMF/web-app.git (push)
|
> upstream https://github.com/openMF/web-app.git (push)
|
||||||
```
|
```
|
||||||
3. To update your local copy with remote changes, run the following: (This will give you an exact copy of the current remote. You should not have any local changes on your develop branch, if you do, use rebase instead.)
|
3. To update your local copy with remote changes, run the following: (This will give you an exact copy of the current remote. You should not have any local changes on your master branch, if you do, use rebase instead.)
|
||||||
```
|
```
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
git checkout develop
|
git checkout master
|
||||||
git merge upstream/develop
|
git merge upstream/master
|
||||||
```
|
```
|
||||||
4. Push these merged changes to the develop branch on your fork. Ensure to pull in upstream changes regularly to keep your forked repository up to date.
|
4. Push these merged changes to the master branch on your fork. Ensure to pull in upstream changes regularly to keep your forked repository up to date.
|
||||||
```
|
```
|
||||||
git push origin develop
|
git push origin master
|
||||||
```
|
```
|
||||||
5. Switch to the branch you are using for some piece of work.
|
5. Switch to the branch you are using for some piece of work.
|
||||||
```
|
```
|
||||||
@@ -99,7 +101,7 @@ git checkout branch-name
|
|||||||
```
|
```
|
||||||
6. Rebase your branch, which means, take in all latest changes and replay your work in the branch on top of this - this produces cleaner versions/history.
|
6. Rebase your branch, which means, take in all latest changes and replay your work in the branch on top of this - this produces cleaner versions/history.
|
||||||
```
|
```
|
||||||
git rebase develop
|
git rebase master
|
||||||
```
|
```
|
||||||
7. Push the final changes when you're ready.
|
7. Push the final changes when you're ready.
|
||||||
```
|
```
|
||||||
@@ -114,17 +116,17 @@ After your pull request is merged, you can safely delete your branch and pull th
|
|||||||
```
|
```
|
||||||
git push origin --delete branch-name
|
git push origin --delete branch-name
|
||||||
```
|
```
|
||||||
2. Checkout the develop branch.
|
2. Checkout the master branch.
|
||||||
```
|
```
|
||||||
git checkout develop
|
git checkout master
|
||||||
```
|
```
|
||||||
3. Delete the local branch.
|
3. Delete the local branch.
|
||||||
```
|
```
|
||||||
git branch -D branch-name
|
git branch -D branch-name
|
||||||
```
|
```
|
||||||
4. Update your develop branch with the latest upstream version.
|
4. Update your master branch with the latest upstream version.
|
||||||
```
|
```
|
||||||
git pull upstream develop
|
git pull upstream master
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +1,81 @@
|
|||||||
# MifosX
|
# Mifos X Web App [](https://travis-ci.com/openMF/web-app) [](https://gitter.im/openMF/web-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
Revamped codebase of community-app
|
Mifos X Web App is the revamped version of the Mifos X Community App, an effective financial inclusion solution and the default web application built on top of the Mifos X platform for the Mifos User Community.
|
||||||
|
|
||||||
The app template is based on [HTML5](http://whatwg.org/html), [TypeScript](http://www.typescriptlang.org) and
|
It is a Single-Page App (SPA) written in standard web technologies [HTML5](http://whatwg.org/html), [SCSS](http://sass-lang.com) and [TypeScript](http://www.typescriptlang.org). It leverages the popular [Angular](https://angular.io/) framework and [Angular Material](https://material.angular.io/) for material design components.
|
||||||
[Sass](http://sass-lang.com).
|
|
||||||
|
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
1. Go to project folder and install dependencies:
|
1. Ensure you have the following installed in your system:
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Launch development server, and open `localhost:4200` in your browser:
|
[`git`](https://git-scm.com/downloads)
|
||||||
```bash
|
|
||||||
npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
## Main tasks
|
[`npm`](https://git-scm.com/downloads)
|
||||||
|
|
||||||
Task automation is based on [NPM scripts](https://docs.npmjs.com/misc/scripts).
|
2. Install [angular-cli](https://github.com/angular/angular-cli) globally.
|
||||||
|
```
|
||||||
|
npm install -g @angular/cli
|
||||||
|
```
|
||||||
|
|
||||||
Tasks | Description
|
3. Clone the project locally into your system.
|
||||||
------------------------------|---------------------------------------------------------------------------------------
|
```
|
||||||
npm start | Run development server on `http://localhost:4200/`
|
git clone https://github.com/openMF/web-app.git
|
||||||
npm run build [-- --env=prod] | Lint code and build app for production in `dist/` folder
|
```
|
||||||
npm test | Run unit tests via [Karma](https://karma-runner.github.io) in watch mode
|
|
||||||
npm run test:ci | Lint code and run unit tests once for continuous integration
|
|
||||||
npm run e2e | Run e2e tests using [Protractor](http://www.protractortest.org)
|
|
||||||
npm run lint | Lint code
|
|
||||||
npm run translations:extract | Extract strings from code and templates to `src/app/translations/template.json`
|
|
||||||
npm run docs | Display project documentation
|
|
||||||
|
|
||||||
When building the application, you can specify the target environment using the additional flag `--env <name>` (do not
|
4. `cd` into project root directory and make sure you are on the master branch.
|
||||||
forget to prepend `--` to pass arguments to npm scripts).
|
|
||||||
|
|
||||||
The default build environment is `prod`.
|
5. Install the dependencies.
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
## Development server
|
6. To preview the app, run the following command and navigate to `http://localhost:4200/`.
|
||||||
|
```
|
||||||
|
ng serve
|
||||||
|
```
|
||||||
|
|
||||||
Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change
|
The application is using the demo server with basic authentication by default. The credentials for the same are:
|
||||||
any of the source files.
|
|
||||||
You should not use `ng serve` directly, as it does not use the backend proxy configuration by default.
|
|
||||||
|
|
||||||
## Code scaffolding
|
Username - mifos
|
||||||
|
|
||||||
Run `npm run generate -- component <name>` to generate a new component. You can also use
|
Password - password
|
||||||
`npm run generate -- directive|pipe|service|class|module`.
|
|
||||||
|
|
||||||
If you have installed [angular-cli](https://github.com/angular/angular-cli) globally with `npm install -g @angular/cli`,
|
Important Note: Please do not make any alterations to these credentials.
|
||||||
you can also use the command `ng generate` directly.
|
|
||||||
|
|
||||||
## Additional tools
|
|
||||||
|
|
||||||
Tasks are mostly based on the `angular-cli` tool. Use `ng help` to get more help or go check out the
|
### Development server
|
||||||
|
|
||||||
|
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||||
|
|
||||||
|
### Code scaffolding
|
||||||
|
|
||||||
|
Run `ng generate component component-name` to generate a new component. You can also use
|
||||||
|
`ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
|
||||||
|
|
||||||
|
### Further help
|
||||||
|
|
||||||
|
To get more help on the Angular CLI use `ng help` or go check out the
|
||||||
[Angular-CLI README](https://github.com/angular/angular-cli).
|
[Angular-CLI README](https://github.com/angular/angular-cli).
|
||||||
|
|
||||||
|
|
||||||
# How to contribute
|
## Setting up a local server
|
||||||
|
|
||||||
## Design guides
|
Follow the given instructions for your operating system to setup a local server for the Mifos X platform.
|
||||||
|
|
||||||
- [Angular Material](https://material.angular.io/components/categories)
|
[Windows](https://cwiki.apache.org/confluence/display/FINERACT/Fineract-platform+Installation+on+Windows)
|
||||||
|
|
||||||
## Creating new modules/components
|
[Ubuntu](https://cwiki.apache.org/confluence/display/FINERACT/Fineract+Installation+on+Ubuntu+Server)
|
||||||
|
|
||||||
- [Setup modules](https://github.com/openMF/web-app/wiki/Create-a-new-module-component)
|
For connecting to server running elsewhere update the base API URL and/or tenant identifier property in the `environments/environment.ts` file and `environments/environment.prod.ts` file for development and production use respectively.
|
||||||
|
|
||||||
|
By default OAuth2 is disabled. To enable it, change the value of oauth.enabled property to true in the `environments/environment.ts` file and `environments/environment.prod.ts` file for development and production use respectively.
|
||||||
|
|
||||||
|
|
||||||
|
## Want to help? [](https://github.com/openMF/web-app/issues)
|
||||||
|
|
||||||
|
Want to file a bug, request a feature, contribute some code, or improve documentation? Excellent! Read up on our guidelines for [contributing](https://github.com/openMF/web-app/blob/master/.github/CONTRIBUTING.md) and then check out one of our [issues](https://github.com/openMF/web-app/issues). Make sure you follow the guidelines before sending a contribution!
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import env from './.env';
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
version: env.npm_package_version,
|
version: env.npm_package_version,
|
||||||
fineractPlatformTenantId: 'default', // For connecting the API running elsewhere update the tenant identifier
|
fineractPlatformTenantId: 'default', // For connecting to server running elsewhere update the tenant identifier
|
||||||
baseApiUrl: 'https://demo.openmf.org', // For connecting the API running elsewhere update the base API URL
|
baseApiUrl: 'https://demo.openmf.org', // For connecting to server running elsewhere update the base API URL
|
||||||
apiProvider: '/fineract-provider/api',
|
apiProvider: '/fineract-provider/api',
|
||||||
apiVersion: '/v1',
|
apiVersion: '/v1',
|
||||||
serverUrl: '',
|
serverUrl: '',
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import env from './.env';
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
version: env.npm_package_version + '-dev',
|
version: env.npm_package_version + '-dev',
|
||||||
fineractPlatformTenantId: 'default', // For connecting the API running elsewhere update the tenant identifier
|
fineractPlatformTenantId: 'default', // For connecting to server running elsewhere update the tenant identifier
|
||||||
baseApiUrl: 'https://demo.openmf.org', // For connecting the API running elsewhere update the base API URL
|
baseApiUrl: 'https://demo.openmf.org', // For connecting to server running elsewhere update the base API URL
|
||||||
apiProvider: '/fineract-provider/api',
|
apiProvider: '/fineract-provider/api',
|
||||||
apiVersion: '/v1',
|
apiVersion: '/v1',
|
||||||
serverUrl: '',
|
serverUrl: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user