Agroindustrial facilities typically operate hundreds of sensors and PLCs from different manufacturers, each speaking its own protocol — Modbus, OPC-UA, or proprietary variants — creating isolated data silos that are expensive to integrate, hard to maintain, and impossible to monitor from a single interface. Bridging this IT/OT gap has traditionally required specialist engineering teams and customized middleware that few small or mid-size agro-processing plants can afford. Agrync is a full-stack platform — FastAPI backend and React + Vite frontend — built to eliminate that barrier: it provides a unified, open-source layer that speaks the industrial protocols already present on the plant floor, normalises the data, and exposes it through a modern web interface, so operators can configure, monitor and manage every sensor in the facility without writing a single line of integration code.
- Modbus TCP/IP reader: collect telemetry from Modbus-enabled devices and PLCs.
- OPC UA server: optionally expose collected data via an OPC UA server for OT integration.
- FIWARE integration: forward telemetry to FIWARE or similar IoT platforms for storage and analytics.
- Sensor management center: add, edit, or remove sensors one-by-one via the web UI, or perform bulk configuration by uploading a JSON file.
- Docker Compose based deployment: the repository is configured so the entire stack can be launched with Docker Compose.
agrync_backend/— FastAPI backend (includesDockerfile)agrync_frontend/— Vite + React + TypeScript frontend (includesDockerfile)docker-compose.yml— Docker Compose configuration for development.github/workflows/ci.yml— GitHub Actions CI pipeline
- Docker & Docker Compose (recommended)
- Node.js >= 18 (for frontend development)
- Python 3.11+ (for backend development)
- Git
The recommended way to run the entire system (backend + database + frontend) is using Docker Compose from the repository root:
docker compose up --buildAfter the services start:
- Backend API: http://localhost:8000 (FastAPI app is mounted under
/api/v1) - Frontend: http://localhost:5173
To stop and remove containers:
docker compose down- Create and activate a virtual environment:
cd agrync_backend
python -m venv .venv
source .venv/bin/activate- Install Python dependencies:
pip install -r requirements.txt- Environment variables
Provide a MongoDB connection and other secrets as environment variables. Example .env:
MONGODB_URI=mongodb://localhost:27017/agrync
SECRET_KEY=some-secret-key
- Run the backend in development:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload- API docs (Swagger/OpenAPI):
Open http://localhost:8000/api/v1/docs
- Install dependencies and run the dev server:
cd agrync_frontend
npm install
npm run dev
# or use pnpm/yarn-
Dev server URL: http://localhost:5173
-
If the frontend needs a specific API URL, check
agrync_frontend/src/apior environment configuration and set the appropriate base URL.
Build backend image:
docker build agrync_backend -t agrync-backend:latestBuild frontend image:
docker build agrync_frontend -t agrync-frontend:latest- The backend uses Beanie + Motor to interact with MongoDB. Use a supported MongoDB server.
- Tasks and connectors (Modbus/OPC) are managed under
tasks/androuters/. Review their configs before enabling production connectors. - The project includes example JSON configuration files for bulk device/sensor import in
agrync_frontend/publicandagrync_backend/static.
- If TypeScript or JSX errors appear in the frontend, run
npm installinagrync_frontendto install dependencies and type packages. - If the backend cannot connect to MongoDB, check
MONGODB_URI, network access and that MongoDB is running.
See LICENSE.