Coder Social home page Coder Social logo

ptzagk / reactnative-mobile-app-base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seedstars/reactnative-mobile-app-base

0.0 0.0 0.0 120 KB

Seedstars Labs React Native Mobile App Base Project (Frontend)

License: MIT License

Python 1.30% Java 6.34% JavaScript 92.36%

reactnative-mobile-app-base's Introduction

Mobile App Base Project (Frontend)

This repository includes a boilerplate project used for all Seedstars Labs mobile applications. It uses Django as backend and React as frontend.

To test the application you need to also run this backend: https://github.com/seedstars/reactnative-backend-base

We build on the shoulders of giants with the following technologies:

Readme Notes

  • Command line starts with $, the command should run with user privileges
  • Command line starts with #, the command should run with root privileges

Retrieve code

  • $ git clone https://github.com/seedstars/reactnative-mobile-app-base.git
  • $ cd reactnative-mobile-app-base
  • $ git submodule init
  • $ git submodule update
  • $ ./scripts/get_static_validation.sh

Remember that when you copy this repository for a new project you need to add the scripts external module using:

  • $ git submodule add https://github.com/Seedstars/culture-scripts scripts

Installation

NODEJS

  • # wget -qO- https://deb.nodesource.com/setup_4.x | sudo bash -
  • # apt-get install --yes nodejs

Main Project

  • $ npm install

Running

Installing React Native / Android Studio

Follow instructions in React Native website:

https://facebook.github.io/react-native/docs/getting-started.html

Required Configuration

You need to edit the environment files to be able to use external SDKs (facebook, analysis, onesignal, etc) and also access backend. The files are in root of project and are called: .env.local_dev, .env.production and .env.staging.

Development

Export needed variables

  • $ export ANDROID_HOME=~/Android/Sdk
  • $ export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

Start react-native development server

  • $ npm run start

Run app on emulator

  • $ ENVFILE=.env.local_dev react-native run-android # or any other .env

Testing

Confirm that the current app version don't have a staging version in codepush, other wise it will download the update.

  • code-push deployment ls "Seedstars Base" -k

Static analysis

Frontend (javascript static analysis)

  • $ npm run lintjs

Deploy

  • increment app version in .env.production

  • $ cd android && ENVFILE=.env.production ./gradlew assembleRelease

CodePush Deploy

if you have not registered in Codepush do:

  • $ code-push register

In case you have already registered you should run:

  • $ code-push collaborator add <appName> <collaboratorEmail>

After that you can do a release:

  • $ code-push release-react "Seedstars Base" android -m --description "Message"

The version is now in staging. After confirming that everything is ok, promote the version to Production.

  • $ code-push promote "Seedstars Base" Staging Production

In case you face any difficulty, please check the Documentation

reactnative-mobile-app-base's People

Contributors

lfrodrigues avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.