-
MongoDB Shell (mongosh) installed (at least version 2.0)
-
Node.js (14 or higher): Installed and up to date
-
Python (3.12 or higher): The project relies on Python to run the backend and manage dependencies.
-
Docker (27.4.0 or higher): The project relies on Docker to run the frontend and backend components.
-
PostgreSQL (15.10 or higher): The demo will use a hosted PostgreSQL cluster.
-
MongoDB Atlas Cluster (8.0.4 or higher): Under
atlasAdmin
role: -
Apache Kafka (3.9.0): For the purpose of this internal README, the demo will use a hosted Kafka cluster.
-
Java JDK (Minimum version 23): Java JDK is essential for running Kafka and its plugins.
-
Git: Ensure you have Git installed on your development machine.
- Create a .env file and add the following lines:
MONGO_URI="<YOUR_CONNECTION_STRING>"
NEXT_PUBLIC_BACKEND_URL="http://localhost:8000"
- Create a .env file and add the following lines:
MONGO_URI="<YOUR_CONNECTION_STRING>"
BACKEND_URL="http://localhost:8000/"
SQL_USERNAME="<YOUR_SQL_DEPLOYMENT_USER>"
SQL_PASSWORD="<YOUR_SQL_DEPLOYMENT_PASSWORD>"
SQL_HOSTNAME="<YOUR_CONNECTION_STRING_TO_YOUR_SQL_DEPLOYMENT>"
SQL_DATABASE="leafyfactorydb"
MQTT_TOPIC = "sensor/data"
- Once you have created the .env files, now you can run the following command on the
leafy_factory
folder:
docker-compose up --build -d
-
To install the dependencies and packages, execute
npm install
in your Terminal. -
You're all set, now you can run
npm run dev
- To execute the backend dependencies and start your server.
-
Once finalized both steps in
frontend
andbackend
, now you can: -
Run
uvicorn app.main:app --reload
in your backend folder. -
Run
npm run dev
in your frontend/src folder.