From 597d7ee1f2037241c85d432150137ea2b023c26d Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 14 Aug 2018 17:02:56 +0200 Subject: [PATCH 1/8] #12 Improve the README --- README.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2d405ce1e..f61069c4f 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,24 @@ This project is a [React Native](https://facebook.github.io/react-native/) boilerplate that can be used to kickstart a mobile application. -This boilerplate contains: +The boilerplate provides an architecture optimized for building solid applications through separation of concerns between the UI and business logic. -- an empty React Native application created with `react-native init` +## Content + +The boilerplate contains: + +- an "[ejected](https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md)" React Native application (v0.55) created with `react-native init` +- a [clear directory layout](#directory-layout) to provide a base architecture for your application +- [Redux](https://redux.js.org/) (v3.7) to help manage state +- [Redux Persist](https://github.com/rt2zz/redux-persist) (v5.9) to persist the Redux state +- [Redux Sagas](https://redux-saga.js.org) (v5.0) to separate side-effects and logic from state and UI logic +- [reduxsauce](https://github.com/infinitered/reduxsauce) (v0.7) to facilitate using Redux +- [apisauce](https://github.com/infinitered/apisauce) (v0.15) to make [axios](https://github.com/axios/axios) even better - [prettier](https://prettier.io/) and [eslint](https://eslint.org/) preconfigured for React Native -- a [directory layout](#directory-layout) for organizing the code of the application + +## Updates + +The boilerplate will follow new React-Native releases as soon as libraries and tools used here are compatible. ## Directory layout @@ -17,9 +30,18 @@ This boilerplate contains: For more information on each directory, click the link and read the directory's README. +## Requirements + +Node 8 or greater is required. Development for iOS requires Xcode 9 or up and will target iOS 9 and up. + ## Installation -Make sure you have installed [everything needed to run React Native](https://facebook.github.io/react-native/docs/getting-started.html), then: +First install all the dependencies required by React Native: + +- for [Android development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-3) +- for [iOS development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies) + +Then: - clone this repository - remove the previous git history: `rm -rf .git/` From c95be0f3c43d4be6b85506de2a8aed84f83a573d Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 4 Sep 2018 14:59:13 +0200 Subject: [PATCH 2/8] Add introduction about TCM --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9703c9c66..13bcf6d51 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,7 @@ You can now start the application, for example with `react-native run-android`. ## License This project is released under the [MIT License](LICENSE). + +## About us + +[TheCodingMachine](https://www.thecodingmachine.com/) is a web and mobile agency based in Paris and Lyon. From b866e8c5721feca7b1f9c8b3b2804949c88ab9ea Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 4 Sep 2018 15:02:39 +0200 Subject: [PATCH 3/8] Mention other boilerplates --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 13bcf6d51..21b9b1755 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,9 @@ This project is released under the [MIT License](LICENSE). ## About us [TheCodingMachine](https://www.thecodingmachine.com/) is a web and mobile agency based in Paris and Lyon. + +## See also + +Here are alternative boilerplates that you may want to check out: + +- [Ignite boilerplate](https://github.com/infinitered/ignite-ir-boilerplate-andross): this boilerplate is much more opinionated and packed that this one, we wanted something lighter which is why we did no go with it From 0ea4cda79de5909272213364518de6c8b849f88a Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 4 Sep 2018 15:07:07 +0200 Subject: [PATCH 4/8] Improve company description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21b9b1755..09437cb29 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This project is released under the [MIT License](LICENSE). ## About us -[TheCodingMachine](https://www.thecodingmachine.com/) is a web and mobile agency based in Paris and Lyon. +[TheCodingMachine](https://www.thecodingmachine.com/) is a web and mobile agency based in Paris and Lyon, France. We are [constantly looking for new developers and team leaders](https://www.thecodingmachine.com/nous-rejoindre/) and we love [working with freelancers](https://coders.thecodingmachine.com/). You'll find [an overview of all our open source projects on our website](https://thecodingmachine.io/open-source) and on [Github](https://github.com/thecodingmachine). ## See also From 44e5565ac2bd0bc5c8c161552bb847692fb3e4e1 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 4 Sep 2018 16:29:32 +0200 Subject: [PATCH 5/8] Add a word about sudo fastlane init --- docs/beta builds.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/beta builds.md b/docs/beta builds.md index 89815a87c..632e18db5 100644 --- a/docs/beta builds.md +++ b/docs/beta builds.md @@ -85,6 +85,8 @@ Would you like to fallback to a manual Fastfile? (y/n) Answer `n`, and retry previous steps with a correct Apple ID and password. Make sure you are connected to internet. +If the `fastlane init` process is stuck when running `bundle install` it may mean that `bundle install` is asking for root permissions. You can stop the process and retry again with `sudo fastlane init`, however you will need to change back ownership of the generated files to your user when it finishes (`sudo chown `). + * If your account has multiple teams in the App Store Connect, you may have this question: `Multiple App Store Connect teams found, please enter the number of the team you want to use:` * Select the right team * If your account has multiple teams in the Developer Portal, you may have this question: `Multiple teams found on the Developer Portal, please enter the number of the team you want to use:` From c1fd6f715a2d5f6c339a6b5fbd236fc1856b4d30 Mon Sep 17 00:00:00 2001 From: aum Date: Fri, 7 Sep 2018 09:20:14 +0200 Subject: [PATCH 6/8] move issue to troubleshooting section --- docs/beta builds.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/beta builds.md b/docs/beta builds.md index 632e18db5..59ed0a574 100644 --- a/docs/beta builds.md +++ b/docs/beta builds.md @@ -85,8 +85,6 @@ Would you like to fallback to a manual Fastfile? (y/n) Answer `n`, and retry previous steps with a correct Apple ID and password. Make sure you are connected to internet. -If the `fastlane init` process is stuck when running `bundle install` it may mean that `bundle install` is asking for root permissions. You can stop the process and retry again with `sudo fastlane init`, however you will need to change back ownership of the generated files to your user when it finishes (`sudo chown `). - * If your account has multiple teams in the App Store Connect, you may have this question: `Multiple App Store Connect teams found, please enter the number of the team you want to use:` * Select the right team * If your account has multiple teams in the Developer Portal, you may have this question: `Multiple teams found on the Developer Portal, please enter the number of the team you want to use:` @@ -188,3 +186,11 @@ Before continuing make sure you have: - [ ] This thing - [ ] This thing + + +## Troubleshooting + +### Stuck at `bundle install` running `fastlane init` + +If the `fastlane init` process is stuck when running `bundle install` it may mean that `bundle install` is asking for root permissions. +You can stop the process and retry again with `sudo fastlane init`, however you will need to change back ownership of the generated files to your user when it finishes (`sudo chown `). From d1009ac9413dd24f7b7578642821f95bd1314166 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Tue, 11 Sep 2018 12:13:58 +0200 Subject: [PATCH 7/8] Improve the documentation to install the boilerplate and the project --- README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 09437cb29..90d7cb349 100644 --- a/README.md +++ b/README.md @@ -34,22 +34,31 @@ For more information on each directory, click the link and read the directory's ## Requirements -Node 8 or greater is required. Development for iOS requires Xcode 9 or up and will target iOS 9 and up. +Node 8 or greater is required. Development for iOS requires a Mac and Xcode 9 or up, and will target iOS 9 and up. -## Installation - -First install all the dependencies required by React Native: +You also need to install the dependencies required by React Native: - for [Android development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-3) - for [iOS development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies) -Then: +## Usage + +To create a new project using the boilerplate: - clone this repository - remove the previous git history: `rm -rf .git/` - rename the React Native project to your own project name: `npm run rename -- ` (the default name is `Boilerplate`) +- remove the LICENSE file and the License section from the README if your project is not open source + +Feel free to remove this section from the README as you will no longer need it in your project. You are encouraged to keep the rest of the documentation in your project so that it is self-explanatory. + +## Running the project + +Assuming you have all the requirements installed, you can setup and run the project by running: -You can now start the application, for example with `react-native run-android`. +- `yarn install` to install the dependencies +- `react-native run-android` to run the Android application (remember to start a simulator or connect an Android phone) +- `react-native run-ios` to run the iOS application (remember to start a simulator or connect an iPhone phone) ## License From 27fa4a290402384f2a9553aee361556c35750f2b Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Wed, 12 Sep 2018 09:52:34 +0200 Subject: [PATCH 8/8] Document to create the configuration file --- App/Service/WeatherService.js | 3 +++ README.md | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/App/Service/WeatherService.js b/App/Service/WeatherService.js index 1d9fc9933..c53d29bc7 100644 --- a/App/Service/WeatherService.js +++ b/App/Service/WeatherService.js @@ -2,6 +2,9 @@ import { create } from 'apisauce' import { Config } from 'App/Config' const weatherApiClient = create({ + /** + * Import the config from the App/Config/index.js file + */ baseURL: Config.API_URL, headers: { Accept: 'application/json', diff --git a/README.md b/README.md index 2135d66f7..50f411fa8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The boilerplate will follow new React-Native releases as soon as libraries and t ## Directory layout - [`App/Components`](App/Components): presentational components +- [`App/Config`](App/Config): configuration of the application - [`App/Containers`](App/Containers): container components - [`App/Images`](App/Images): images used by the application - [`App/Stores`](App/Stores): redux [actions, reducers and stores](https://redux.js.org/basics) @@ -41,22 +42,26 @@ You also need to install the dependencies required by React Native: - for [Android development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-3) - for [iOS development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies) -## Usage +## Using the boilerplate To create a new project using the boilerplate: - clone this repository - remove the previous git history: `rm -rf .git/` +- install the npm dependencies by running `yarn` - rename the React Native project to your own project name: `npm run rename -- ` (the default name is `Boilerplate`) -- remove the LICENSE file and the License section from the README if your project is not open source +- remove the LICENSE file and the "License" section from the README if your project is not open source -Feel free to remove this section from the README as you will no longer need it in your project. You are encouraged to keep the rest of the documentation in your project so that it is self-explanatory. +Feel free to remove the section "Using the boilerplate" from the README (you will not need it anymore in your project). You are encouraged to keep the rest of the documentation in your project so that it is self-explanatory. + +You can now create a new git repository for your project (using `git init`) and create the first commit. ## Running the project Assuming you have all the requirements installed, you can setup and run the project by running: - `yarn install` to install the dependencies +- create your [configuration file `App/Config/index.js`](App/Config) from `index.dev.js` (in you are in dev environment) and fill the missing values - `react-native run-android` to run the Android application (remember to start a simulator or connect an Android phone) - `react-native run-ios` to run the iOS application (remember to start a simulator or connect an iPhone phone)