https://github.com/atshakil/react-native-scaffold
A React Native scaffold with Redux, React Navigation and i18n support
https://github.com/atshakil/react-native-scaffold
boilerplate boilerplate-application es6 eslint i18n javascript jsx react react-native react-native-vector-icons react-navigation redux starter-project starter-template
Last synced: 2 months ago
JSON representation
A React Native scaffold with Redux, React Navigation and i18n support
- Host: GitHub
- URL: https://github.com/atshakil/react-native-scaffold
- Owner: atshakil
- License: mit
- Created: 2017-04-12T03:47:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-07T19:00:18.000Z (over 8 years ago)
- Last Synced: 2025-02-01T21:34:37.092Z (about 1 year ago)
- Topics: boilerplate, boilerplate-application, es6, eslint, i18n, javascript, jsx, react, react-native, react-native-vector-icons, react-navigation, redux, starter-project, starter-template
- Language: JavaScript
- Homepage:
- Size: 687 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native Scaffold
A React Native scaffod featuring Redux and React Navigation
### Features
- [Redux](https://github.com/reactjs/redux)
- [React Navigation](https://github.com/react-community/react-navigation)
- [React Native i18n](https://github.com/AlexanderZaytsev/react-native-i18n)
- [React Native FCM](https://github.com/evollu/react-native-fcm)
- [React Native Vector Icons](https://github.com/oblador/react-native-vector-icons)
- [ESLint](https://github.com/eslint/eslint)
- [Node HTTP Status](https://github.com/adaltas/node-http-status)
### NPM Scripts
- `npm start` - Starts JS server
- `npm run lint` - Runs the `ESLint` linter
- `npm run test` - Invokes Jest test runner
### Installation
#### Prerequisites
This project depends on [Node.js](https://nodejs.org) and `react-native-cli`. The `Node.js` installation method varies from platform to platform.
If you are using a Debian distribution, please follow the steps below,
```sh
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ sudo apt-get install -y nodejs
```
Or, if you are using some other linux distribution or a different platform, please follow the instruction provided [here](https://nodejs.org/en/download/package-manager/).
`react-native-cli` module requires a global installation.
```sh
$ sudo npm install -g react-native-cli
```
Now, change CWD to project root and install dependency modules.
```sh
$ npm install
```
Create a gradle property file by renaming `gradle.properties.example` as `gradle.properties` (located in `android/`)
##### FCM Support
###### Android
FCM requires a configuration file (`google-services.json`) to work. In order to
get the file, follow the steps bellow.
- Go to your project in [https://console.firebase.google.com](https://console.firebase.google.com), or create one.
- Now, from project Settings > General > Your apps, use "Add APP" to add an
android app to the project
- `google-services.json` will now be available for download
###### iOS
TODO
Once the FCM configuration file is added, app will start to receive notifications
without the necessity of taking any further step. But, if the app requires
advanced feature like Android `click_action`, then some [additional
configuration](https://github.com/evollu/react-native-fcm#config-for-notification-and-click_action-in-android) will be required.
For a more detailed configuration instruction, please visit the FCM module
[documentation](https://github.com/evollu/react-native-fcm#configure-firebase-console).
#### Development
Create a configuration file by copying `application.json.example` as `application.json` (located in `app/config`)
Now, start the JS server.
```sh
$ react-native start
```
And, finally deploy the development app. to a device / emulator using,
```sh
$ react-native run-android
$ react-native run-ios
```
One way of logging is to use any of the following commands
```sh
$ react-native log-android
$ react-native log-ios
```
#### Production
##### Android
Create a keystore for the production app signing. You may update the available parameters (e.g. keystore name, alias, validity) to fit your requirement.
```
keytool -genkey -v -keystore primary-release-key.keystore -alias keystore_alias -keyalg RSA -keysize 2048 -validity 10000
```
Now copy the keystore file to `android/app` directory.
In the global `gradle.properties` file (located in `android/` directory), update the `STORE_PASSWORD`, `KEY_PASSWORD`, `KEY_ALIAS` and `STORE_FILE` parameter with your keystore parameters.
Finally generate the release build using,
```
react-native run-android --flavor=release
```
which generates a release apk in `android/app/build/outputs/apk` directory.
##### iOS
TODO
### License
MIT