proustibat / fbrgsmn.mobile.app

https://proustibat.github.io/fbrgsmn.mobile.app/
GNU Affero General Public License v3.0
3 stars 1 forks source link

Faubourg Simone: mobile app GitHub license Twitter Follow

Source code of Faubourg Simone mobile applications built with Ionic.


Get it on Google Play
Get it on Apple Store
Build Status
Sonar quality gate
Code Climate
Sonar Coverage
Maintenance
GitHub last commit
Open issues
Greenkeeper badge
Dependencies Status
DevDependencies Status

Features


For Developers

Prerequisites

Be sure Ionic and Cordova are installed:

cordova -v
ionic -v

If it's not the case, run npm install -g ionic cordova.

You also needs sdks:

Run ionic info to be sure your system is ok.

Installation

git clone git@github.com:proustibat/fbrgsmn.mobile.app.git
cd fbrgsmn.mobile.app
ionic cordova prepare

Answer Y to the following question to run npm install automatically:

? Looks like a fresh checkout! No ./node_modules directory found. Would you like to install project dependencies? (Y/n) 

Watching

In a browser

ionic serve -l

On a device

ionic cordova run android -l -c -s

On a simulator

ionic cordova emulate ios --target="iPhone-8"

Code documentation is available here

Building

ionic cordova build ios android

Testing

Config files are in 'test-config' folder. Mocks file are in 'test-config/mocks', if you need to add some, please add it here.

Unit testing

npm run test

It starts Karma to watch tests and work on them. Each file of the sources matches a test file with '.spec.ts' extension. We choose the Jasmine framework (v2.8), so if you're not familiar, please read the documentation

E2E Testing

npm run e2e

It runs [Protractor](). Protractor is a Node.js program, and runs end-to-end tests that are also written in JavaScript and run with node. Protractor uses WebDriver to control browsers and simulate user actions. Note that you need to run ionic serve -l before running e2e tests

Tests linting

By default, tests are removed from tslint and tslint:codeclimate scripts because of incompatible rules. They should be checked with npm run tslint:tests

Contributing

Recommandations

Use Gitflow Worklow

We use Gitflow Workflow. Please follow this branching model. Once your branch is pushed (hotfix or feature), make a pull request here. Travis will check if tests are passed and we'll accept your PR depending on results.

Check your contribution before submitting it

Linting

Be sure your code is alright: run npm run all-custom-lint and npm run lint. Also run npm run test-ci to be sure your work will be accepted on our Travis CI process.

Config files are in source code:

Don't hesitate to create an issue if you wanna change its and discuss about theses changes.

If you wanna be perfect :-) install CodeClimate and use npm run codeclimate:analyze to see what will displayed on our CodeClimate Dashboard

Tests and Coverage

Please run or add unit tests and e2e tests if needed. Make sure it covers the right parts. You can use npm run test-coverage to see the code coverage. It will create a coverage folder, the same that is automatically published here

Update the documentation

If you update the code documentation or add commented code, you could check your changes by running npm run typedoc, it will create a 'documentation' folder. This will be published automatically on the public documentation

Support

If you are having issues, please let us know: tech.team@faubourgsimone.com

License

The project is licensed under the GNU Affero General Public License v3.0 license


Tools Summary

Travis CI

Triggered at each push action on the repo (on any branches). You could see our dashboard here Used to run tests, linting, generate code coverage results and code documentation. Then it publishes it on our public results.

CodeClimate

Our dashboard is updated at each push.

Sonarqube

We use Sonarqube on Sonarcloud.io to keep our code safe. Our dashboard is available here: https://sonarcloud.io/dashboard?id=fbrgsmn.mobile.app

Greenkeeper

It's a real-time monitoring and automatic updates for npm dependencies. If an update is available on our dependencies, it updates it on a specific branch and creates a pull request. Travis will then be triggered, if tests are passed we can accept the pull request. Learn more about it here

Typedoc

A documentation generator for TypeScript projects: our results are here Learn more about it here

Commitizen

If you wanna contribute to the project and create a pull request, use it by running git cz instead of git commit. Learn more about it here


A glance at our actual Sonarqube metrics

Complexity

How simple or complicated the control flow of the application is.

Complexity Complexity per file Cognitive Complexity

Cyclomatic Complexity measures the minimum number of test cases requiref for full test coverage. Cognitive Complexity is a measure of how difficult the application is to understand

Complexity for Javascript or typescript is incremented by one for each:

Complexity of the web page is measured by counting the decision tags (such as if and forEach) and boolean operators in expressions (&& and ||), plus one for the body of the document. The decision tags and the operators are configurable through the Complexity rule.

Documentation & sizes

Lines Lines of code Comment lines Comments (%)

Directories Files Classes Functions

Duplications

Duplicated blocks Duplicated lines

Issues

Open issues Confirmed issues Won't fix issues

Maintainability

Issues in this domain mark code that will be more difficult to update competently than it should

Code smells SQALE Rating

Rating given to the project related to the value of the Technical Debt Ratio. The default Maintainability Rating grid is:

The Maintainability rating scale can be alternately stated by saying that if the outstanding remediation cost is:

Technical debt

Effort to fix all maintainability issues. The measure is stored in minutes. An 8-hour day is assumed when values are shown in days. (The value of the cost to develop a line of code is 0.06 days)

Technical debt Technical debt ratio

Reliability

Issues in this domain mark code where you will get behavior other than what was expected.

Bugs Reliability remediation effort Reliability Rating

Reliability remediation effort

Effort to fix all bug issues. The measure is stored in minutes. An 8-hour day is assumed when values are shown in days.

Reliability rating

Security

Vulnerabilities Security remediation effort Security Rating

Security remediation effort

Effort to fix all vulnerability issues. The measure is stored in minutes in the DB. An 8-hour day is assumed when values are shown in days.

Security rating