Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Latest commit

 

History

History
85 lines (64 loc) · 2.94 KB

README.md

File metadata and controls

85 lines (64 loc) · 2.94 KB

Boilerplate React-Native

This opinionated boilerplate was born because I always need to configure the same generic libs in order let my app ready-to-production.

This project was bootstrapped with Create React Native App.

Enviroment

  1. Install the Mac Iphone Simulator
  2. Geny motion for Android
  3. Node (8+)

Commands

Run the command bellow:

npm install
npm start
npm test

Commits

Use only the command bellow to create commit

npm run commit

Sentry

Create a sentry account and put your ID here

Sonnar

  1. Start the docker container in your machine with the following command docker run -d --name sonarqubeLocal -p 9001:9000 -p 9092:9092 arturbdr/sonarqube-pluggins:6.7.1.1-lts This command will download the image and start a docker container in your machine and bind the host ports: 9001 and 9092 to the container port 9000 and 9092 respectively.
  2. After the container is started, you can access it in the browser in local sonar docker
  3. Publish the project to this container with the command gulp sonar
  4. Check the results in local sonar docker

All the sonar configuration are in the file sonar-project.properties

Features

  • react-navigate - main lib (with create-react-native-app)
  • eslint - to standarlize the project
  • commitzen - to create nice commits
  • prettier - to standarlize the code
  • flow-type - to create static types
  • husky - for prevent commit with errors (of lint, tests, flow)
  • saga - lib to fetch async data
  • jestSetup - to configurate react-native with jest
  • enzyme - to test components
  • jsdom - to simulate window and globals
  • I18n - to translate texts
  • recompose - to compose HOCs
  • apisauce - to fetch external datas
  • sentry - to log erros
  • file api module (to fetch data) - to configurate apisauce and services
  • initial folders (services/ components) - to define the architeture standard
  • environment variables - to fetch external datas in diferent enviroments
  • icon - to setup home icon
  • splashscreen - to setup inaital screen before open the app
  • remove @FIXME
  • example of unit test - to integrate test since the begin
  • Header example - to let easier to implement header throught props
  • Styled components with jest - to let easier to implement nested css
  • nativeBase - to use standarlized components

TODO

  • build ci (with fasltlane or expo)
  • try immutable - to let transformation data less verbose
  • example of reselect lib - to optimize data flow
  • example of integration tests - to integrate test since the begin
  • example of e2e detox (choose screenplay or pageObject)- to integrate e2e since the begin