Skip to content

Commit 05b73bc

Browse files
author
Matthieu Napoli
committed
Merge branch 'master' into startup-saga
# Conflicts: # README.md
2 parents 1b8b5f9 + 0b77645 commit 05b73bc

File tree

3 files changed

+63
-6
lines changed

3 files changed

+63
-6
lines changed

App/Services/WeatherService.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { create } from 'apisauce'
22
import { Config } from 'App/Config'
33

44
const weatherApiClient = create({
5+
/**
6+
* Import the config from the App/Config/index.js file
7+
*/
58
baseURL: Config.API_URL,
69
headers: {
710
Accept: 'application/json',

README.md

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,30 @@
22

33
This project is a [React Native](https://facebook.github.io/react-native/) boilerplate that can be used to kickstart a mobile application.
44

5-
This boilerplate contains:
5+
The boilerplate provides an architecture optimized for building solid applications through separation of concerns between the UI and business logic.
66

7-
- an empty React Native application created with `react-native init`
7+
## Content
8+
9+
The boilerplate contains:
10+
11+
- 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`
12+
- a [clear directory layout](#directory-layout) to provide a base architecture for your application
13+
- [Redux](https://redux.js.org/) (v3.7) to help manage state
14+
- [Redux Persist](https://github.com/rt2zz/redux-persist) (v5.9) to persist the Redux state
15+
- [Redux Sagas](https://redux-saga.js.org) (v5.0) to separate side-effects and logic from state and UI logic
16+
- [reduxsauce](https://github.com/infinitered/reduxsauce) (v0.7) to facilitate using Redux
17+
- [apisauce](https://github.com/infinitered/apisauce) (v0.15) to make [axios](https://github.com/axios/axios) even better
818
- [prettier](https://prettier.io/) and [eslint](https://eslint.org/) preconfigured for React Native
9-
- a [directory layout](#directory-layout) for organizing the code of the application
1019
- a navigation using [react-native-navigation](https://reactnavigation.org)
1120

21+
## Updates
22+
23+
The boilerplate will follow new React-Native releases as soon as libraries and tools used here are compatible.
24+
1225
## Directory layout
1326

1427
- [`App/Components`](App/Components): presentational components
28+
- [`App/Config`](App/Config): configuration of the application
1529
- [`App/Containers`](App/Containers): container components
1630
- [`App/Images`](App/Images): images used by the application
1731
- [`App/Stores`](App/Stores): redux [actions, reducers and stores](https://redux.js.org/basics)
@@ -21,15 +35,37 @@ This boilerplate contains:
2135

2236
For more information on each directory, click the link and read the directory's README.
2337

24-
## Installation
38+
## Requirements
39+
40+
Node 8 or greater is required. Development for iOS requires a Mac and Xcode 9 or up, and will target iOS 9 and up.
2541

26-
Make sure you have installed [everything needed to run React Native](https://facebook.github.io/react-native/docs/getting-started.html), then:
42+
You also need to install the dependencies required by React Native:
43+
44+
- for [Android development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-3)
45+
- for [iOS development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies)
46+
47+
## Using the boilerplate
48+
49+
To create a new project using the boilerplate:
2750

2851
- clone this repository
2952
- remove the previous git history: `rm -rf .git/`
53+
- install the npm dependencies by running `yarn`
3054
- rename the React Native project to your own project name: `npm run rename -- <YourProjectName>` (the default name is `Boilerplate`)
55+
- remove the LICENSE file and the "License" section from the README if your project is not open source
56+
57+
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.
3158

32-
You can now start the application, for example with `react-native run-android`.
59+
You can now create a new git repository for your project (using `git init`) and create the first commit.
60+
61+
## Running the project
62+
63+
Assuming you have all the requirements installed, you can setup and run the project by running:
64+
65+
- `yarn install` to install the dependencies
66+
- 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
67+
- `react-native run-android` to run the Android application (remember to start a simulator or connect an Android phone)
68+
- `react-native run-ios` to run the iOS application (remember to start a simulator or connect an iPhone phone)
3369

3470
## Useful documentation
3571

@@ -40,3 +76,13 @@ You can now start the application, for example with `react-native run-android`.
4076
## License
4177

4278
This project is released under the [MIT License](LICENSE).
79+
80+
## About us
81+
82+
[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).
83+
84+
## See also
85+
86+
Here are alternative boilerplates that you may want to check out:
87+
88+
- [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

docs/beta builds.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,11 @@ Before continuing make sure you have:
186186

187187
- [ ] This thing
188188
- [ ] This thing
189+
190+
191+
## Troubleshooting
192+
193+
### Stuck at `bundle install` running `fastlane init`
194+
195+
If the `fastlane init` process is stuck when running `bundle install` it may mean that `bundle install` is asking for root permissions.
196+
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 <your-user> <files>`).

0 commit comments

Comments
 (0)