Skip to content

Commit 0b77645

Browse files
author
Matthieu Napoli
committed
Merge branch 'readme' into 'master'
#12 Improve the README Closes #12 See merge request tcm-projects/react-native-boilerplate!10
2 parents 5fd86b1 + 27fa4a2 commit 0b77645

File tree

2 files changed

+55
-6
lines changed

2 files changed

+55
-6
lines changed

App/Service/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,15 +2,29 @@
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
19+
20+
## Updates
21+
22+
The boilerplate will follow new React-Native releases as soon as libraries and tools used here are compatible.
1023

1124
## Directory layout
1225

1326
- [`App/Components`](App/Components): presentational components
27+
- [`App/Config`](App/Config): configuration of the application
1428
- [`App/Containers`](App/Containers): container components
1529
- [`App/Images`](App/Images): images used by the application
1630
- [`App/Stores`](App/Stores): redux [actions, reducers and stores](https://redux.js.org/basics)
@@ -19,15 +33,37 @@ This boilerplate contains:
1933

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

22-
## Installation
36+
## Requirements
37+
38+
Node 8 or greater is required. Development for iOS requires a Mac and Xcode 9 or up, and will target iOS 9 and up.
2339

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

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

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

3268
## Useful documentation
3369

@@ -38,3 +74,13 @@ You can now start the application, for example with `react-native run-android`.
3874
## License
3975

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

0 commit comments

Comments
 (0)