Farmbot Web Frontend
This is the Javascript / HTML / CSS related to Farmbot's browser control app. It depends on a backend API (my.farmbot.io by default).
Up and Running
- Install node if you haven't already.
- git clone https://github.com/FarmBot/farmbot-web-frontend.git
- cd farmbot-web-frontend
- npm install
- run
npm start
- Visit
http://localhost:8080/
Deploy to Production
- run
npm run build
- Upload
tools/dist/farmbot-production.min.js
to your server. - Add
<script src="entry.min.js">
to the page atapp/index.html
. This is the only endpoint we support at the moment. PRs welcome. - Please, raise an issue if you have any trouble setting up.
Configuration
All config is in the user auth token. There's no need to point to an MQTT URL or a particular bot. That information is contained in your auth token.
Low Hanging Fruit
Are you a developer? Do you want to help? Don't know where to start?
Here are some easy-to-do tasks that our (small) team hasn't gotten around to yet:
- Writing unit tests for existing code.
- Factoring out implcity
any
types. This was originally a vanilla JS project that later became TypeScript. We have a lot of "unsafe" code that does not have type annotations yet. - DRY up URL usage into a URL config object. A lot of AJAX requests are still relying on hardcoded strings rather than DRY configuration.
- Any comment in sourcode with the word
HACK
orTODO
.