Code & Robots is completly FREE under the MIT license. You can even use it commercially and we welcome all contributions, see our contributing guide to get started.
There are quite a few gotchas when setting up and running the app right now. We’re working towards a better experience to get started but it’s best if you visit the Troubleshooting guide before starting and refer to it if you run into problems. For further support, send an email to codeandrobotshq@gmail.com.
If you’re new to mobile app development with React Native then here are some crash courses to bring you up to speed:
Step 1: Install and setup React Native
Step 2: git clone this repo
cd ~
git clone https://github.com/codeandrobots/codeandrobots-app.git
cd C:\Users\%username%
git clone https://github.com/codeandrobots/codeandrobots-app.git
Step 3: cd to the cloned repo
cd codeandrobots-app
Step 4: Install the Application with Yarn
yarn install --ignore-engines
Step 5: Reinstall husky to setup git hooks
npm install husky@next --save-dev
Step 6: Copy .env.example
to .env
cp .env.example .env
copy .env.example .env
Step 7: Update App Properties in .env
if necessary
Step 8: Install and run the app
react-native run-ios
react-native run-android --variant=devDebug
When running the app locally, it will rely on the properties defined in your local .env
file.
Have a look at .env.example for more information about app properties.
Have a look at https://facebook.github.io/react-native/docs/running-on-device to get your device setup.
When running an API locally and the app on a real device, you will need to find and use the primary IP address of your local machine (i.e. not localhost).
ipconfig getifaddr en0
(only works on macOS)rails s -b [primary local ip]
)http://[primary local ip]:3000/api/v1/
)This project adheres to Standard.
Lint on Commit
This is implemented using husky. There is no additional setup needed.
Bypass Lint
If you have to bypass lint for a special commit that you will come back and clean (pushing something to a branch etc.) then you can bypass git hooks with adding --no-verify
to your commit command.
Understanding Linting Errors
The linting rules are from JS Standard and React-Standard. Regular JS errors can be found with descriptions here, while React errors and descriptions can be found here.
Before running tests you will need to install Jest.
Unit and integration tests automatically run on every git commit
and git push
.
Unit and integration tests:
yarn test
yarn storybook
react-native run-ios
or react-native run-android --variant=devDebug
There are no end to end tests right now as the app development is in flux but it’s a good idea to add them in the future.
Author: codeandrobots
Demo: http://www.codeandrobots.com/
Source Code: https://github.com/codeandrobots/codeandrobots-app
#react-native #react #mobile-apps