- Control your robots using the Code & Robots Android and iOS apps
- Design your own robot mobile app using the Code & Robots Figma design with 10+ ready made screens to get you started
- Build your own robot mobile app based on the Code & Robots open source mobile app project
- Contact us if you'd like to contribute to this project or to discuss working together on your robot project
- Download the Android app (Beta) on the Google Play Store
- Download the iOS app on the App Store
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 [email protected].
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
- Mac or Linux
- Windows
Step 2: git clone this repo
- Mac or Linux
cd ~
git clone https://github.com/codeandrobots/codeandrobots-app.git
- Windows
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
- Mac or Linux
cp .env.example .env
- Windows
copy .env.example .env
Step 7: Update App Properties in .env
if necessary
Step 8: Install and run the app
- iOS
- Make sure XCode is installed
- run
react-native run-ios
- Android
- Use your Android device or run on an Android Emulator or run on Genymotion
- run
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)- Serve your backend API using the primary IP address (e.g.
rails s -b [primary local ip]
) - Update API_BASE_URL to use the primary IP address (e.g.
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
- In a new terminal, run storybook
yarn storybook
- In a new terminal, run the app
react-native run-ios
orreact-native run-android --variant=devDebug
- Choose app stories from the Storybook navigator within the app or in the browser
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.