StartupJS
:fire: React (Native + Web) starter kit and realtime model synchronization engine for Node.js with ORM (full-stack framework).
Intro
This boilerplate launches with a React web app and React Native app and allows to use a single code for all platforms.
The project is super helpful to kick-start your next project, as it provides a lot of the common tools you may reach for, all ready to go. Specifically:
Requirements
OR
Quick start
- Initialize a new boilerplate project. Change
myapp
to your project name (use lower case)
npx startupjs init myapp --version=latest && cd myapp
- Start server (in a separate terminal tab)
yarn server
- Start web (in a separate terminal tab). Open
http://localhost:3000
yarn web
- Start metro, if you want to develop native iOS or Android apps (in a separate terminal tab)
yarn metro
- Run android (in a separate terminal tab)
yarn android
- Run ios (in a separate terminal tab)
yarn ios
Docker development
Alternatively you can run a docker development image which has node, yarn, mongo and redis already built in.
You only need docker
for this. And it works everywhere -- Windows, MacOS, Linux.
Keep in mind though that since docker uses its own driver to mount folders,
performance (especially when installing modules) might be considerably slower compared
to the native installation when working with the large amount of files.
- Initialize a new project (change
awesomeapp
at the end to your app name):
docker run --rm -it -v ${PWD}:/ws:delegated startupjs/dev init awesomeapp
- Go into the created project folder. Then run the development docker container with:
./docker
- While inside the running container, start your app with:
yarn start
Open http://localhost:3000
and you should see your app.
- You can quickly exec into the running container from another terminal window using:
./docker exec
Packages configuration
To get this project running with all dependencies, follow steps given below:
CodePush
CodePush is a cloud service that enables React Native developers to deploy mobile app updates instantly to their user's devices. Following steps will help in configuring CodePush for project.
- Install CodePush CLI
npm install -g code-push-cli
- Create/Login a CodePush account
// Register
code-push register
// Login if registered already
code-push login
- Register your app
// For Android
code-push app add <App-Name-Android> android react-native
// For iOS
code-push app add <App-Name-Ios> ios react-native
For Android
- Add empty
reactNativeCodePush_androidDeploymentKey
string item to /path_to_your_app/android/app/src/main/res/values/strings.xml
. It may looks like this:
<resources>
<string name="reactNativeCodePush_androidDeploymentKey" moduleConfig="true"></string>
<string name="app_name">Lingua.Live</string>
</resources>
- Get keys using
code-push deployment ls <App-Name-Android> --displayKeys
and copy both Debug and Release key in /path_to_your_app/android/app/build.gradle

- Go to
/path_to_your_app/android/app/src/main/java/com/lingua/MainApplication.java
and add code which set keys. It may looks like this:
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
for(ReactPackage reactPackage: packages) {
if (reactPackage instanceof CodePush) {
((CodePush)reactPackage).setDeploymentKey(BuildConfig.CODEPUSH_KEY);
}
}
return packages;
}
For iOS
- Add
CodePushDeploymentKey
string item with value $(CODEPUSH_KEY)
to /path_to_your_app/ios/your_app/Info.plist
. It may looks like this:
<plist version="1.0">
<dict>
<key>CFBundleVersion</key>
<string>1</string>
<key>CodePushDeploymentKey</key>
<string>$(CODEPUSH_KEY)</string>
<key>LSRequiresIPhoneOS</key>
</dict>
</plist>
- Get keys using code-push deployment ls --displayKeys then open
/path_to_your_app/ios
using Xcode
and copy both Debug and Release key in

Packages
Troubleshooting
If you have any problem, search for the issues in this repository. If you don't find anything, you can raise an issue here.
References
Licence
(MIT)