Farmbot-Web-App/README.md

62 lines
4.4 KiB
Markdown
Raw Normal View History

2018-03-19 06:03:54 -06:00
# FarmBot Web App
[![codebeat badge](https://codebeat.co/badges/7f81859b-67fe-4bdb-b56f-050bfed35e9c)](https://codebeat.co/projects/github-com-farmbot-farmbot-web-app-staging)
[![codecov](https://codecov.io/gh/FarmBot/Farmbot-Web-App/branch/master/graph/badge.svg)](https://codecov.io/gh/FarmBot/Farmbot-Web-App)
2018-03-23 09:16:32 -06:00
[![Coverage Status](https://coveralls.io/repos/github/FarmBot/Farmbot-Web-App/badge.svg)](https://coveralls.io/github/FarmBot/Farmbot-Web-App)
2018-01-10 15:53:16 -07:00
[![Maintainability](https://api.codeclimate.com/v1/badges/74091163d8a02bb8988f/maintainability)](https://codeclimate.com/github/FarmBot/Farmbot-Web-App/maintainability)
2017-06-29 15:34:38 -06:00
# Q: Do I need this?
2015-08-19 09:37:13 -06:00
2017-10-06 14:11:53 -06:00
This repository is intended for *software developers* who wish to modify the [Farmbot Web App](http://my.farmbot.io/). **If you are not a developer**, you are highly encouraged to use [the publicly available web app](http://my.farmbot.io/). Running a server is *a non-trivial task with security implications*. It requires an intermediate background in Ruby, SQL and Linux system administration.
2015-08-19 09:37:13 -06:00
2017-06-29 15:34:38 -06:00
If you are a developer interested in contributing or would like to provision your own server, you are in the right place.
2015-08-19 09:37:13 -06:00
2018-01-14 19:38:36 -07:00
# Q: Where do I report security issues?
We take security seriously and value the input of independent researchers. Please see our [responsible disclosure guidelines](https://farm.bot/responsible-disclosure-of-security-vulnerabilities/).
2018-01-14 19:38:36 -07:00
2017-06-30 08:09:27 -06:00
# Q: What is the Farmbot Web App?
2015-11-25 12:59:54 -07:00
2017-10-06 14:11:53 -06:00
This repo contains FarmBot's web based user interface, a RESTful JSON API and a Dockerized MQTT server. The API stores data such as user account information, plant data, authorization tokens and a variety of other resources. The MQTT server facilitates realtime messaging from the browser to the device.
2017-06-29 15:34:38 -06:00
# Q: Can I see some example API requests?
2016-12-07 12:27:46 -07:00
2017-06-29 15:34:38 -06:00
For a list of example API requests and responses, see our [reference documentation](https://gist.github.com/RickCarlino/10db2df375d717e9efdd3c2d9d8932af). If you wish to write an add-on application that uses the FarmBot API, please let us know in an issue. We are happy to answer any specific questions you may have.
2016-12-07 12:27:46 -07:00
2017-06-30 08:09:27 -06:00
# Q: How do I Setup an instance locally?
2017-06-29 15:34:38 -06:00
## Prerequisites
2016-09-26 15:27:56 -06:00
2018-06-04 09:36:16 -06:00
Installation requires an x86 desktop machine running a fresh installation of Ubuntu 18.
We **do not recomend running the server on a Raspberry Pi** due to issues with ARM compilation and memory usage. **Windows is not supported** at this time.
## Setup
A step-by-step setup guide for Ubuntu 18 can be found [here](https://github.com/FarmBot/Farmbot-Web-App/blob/master/ubuntu_example.sh). Installation on distributions other than Ubuntu is possible, but we do not provide installation support.
Installation was last tested against Ubuntu 18.04 in June of 2018. Please [Raise an issue](https://github.com/FarmBot/Farmbot-Web-App/issues/new?title=Installation%20Failure) if you hit problems with any of these steps. *We can't fix issues we don't know about.*
2017-06-29 15:34:38 -06:00
# Config Settings (important)
We try our best to follow the [12 Factor Methodology](https://12factor.net/). Part of that means using ENV variables as a means of [storing configuration](https://12factor.net/config). **Your server won't run without setting ENV variables first**.
You can accomplish this by setting the ENV variables directly from your shell / server management tool or by writing an `application.yml` file.
See `config/application.example.yml` for a list of all the variables that must be set.
2017-06-30 08:13:29 -06:00
**Encryption keys**: Encryption keys will be auto-generated if not present. They can be reset using `rake keys:generate`. If `ENV['RSA_KEY']` is set, it will be used in place of the `*.pem` files. Useful for environments like Heroku, where file system access is not allowed.
2017-06-29 15:34:38 -06:00
# Want to Help?
2016-10-05 16:09:48 -06:00
2017-07-05 11:47:28 -06:00
[Low Hanging Fruit](https://github.com/FarmBot/Farmbot-Web-App/search?utf8=%E2%9C%93&q=todo). [Raise an issue](https://github.com/FarmBot/Farmbot-Web-App/issues/new?title=Question%20about%20a%20TODO) if you have any questions.
## Translating the web app into your language
2017-09-02 15:33:11 -06:00
Thanks for your interest in internationalizing the FarmBot web app! To add translations:
1. Fork this repo
0. Navigate to `/public/app-resources/languages` and run the command `node _helper.js yy` where `yy` is your language's [language code](http://www.science.co.il/Language/Locale-codes.php). Eg: `ru` for Russian.
0. Edit the translations in the file created in the previous step: `"phrase": "translated phrase"`.
0. When you have updated or added new translations, commit/push your changes and submit a pull request.