farmcontrol-server/readme.md
Tom Butcher fa389e3eb7
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
Update CI pipeline, documentation, and config for Bun/Electrobun.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 22:03:23 +01:00

58 lines
1.4 KiB
Markdown

# Farm Control Server
[![Build Status](https://ci.tombutcher.work/buildStatus/icon?job=farmcontrol%2Ffarmcontrol-server%2Fmain&style=flat-square)](https://ci.tombutcher.work/job/farmcontrol/job/farmcontrol-server/job/main/)
A Bun application that bridges communication between Farm Control cloud services, local websocket clients, and connected printers.
## Features
- Connects to the Farm Control websocket API
- Provides a local HTTP server for CLI and integrations
- Desktop UI built with React, Ant Design, and Electrobun
- Headless Linux service packaging for servers and Raspberry Pi hosts
- Relays printer and document printer state to the desktop UI
## Requirements
- [Bun](https://bun.sh) 1.1 or newer
## Installation
1. Clone this repository
2. Install dependencies:
```
bun install
```
3. Edit `config.json` for your environment
4. Start the server:
```
bun run dev
```
## Development
- Headless server: `bun run dev`
- Desktop app with hot reload: `bun run dev:app`
- Renderer only: `bun run dev:renderer`
## Building
- Desktop app (current platform): `bun run build:app`
- Linux headless packages: `bun run build:linux`
Electrobun handles desktop packaging. Linux headless builds use `bun build --compile`.
## Configuration
`config.json` contains `development` and `production` sections. Each section supports:
- `logLevel`
- `url` (websocket server)
- `apiUrl`
- `host.id` and `host.authCode`
- `dataDir`
## License
MIT