This is the repository for the BrewController project
The BrewController project offers a user interface in order to preview the current state of the hardware for brewing beer.
It can also control the various controllers onboard with a clean user interface usable with a computer or a tablet.
The backend is the main part of this project.
It interacts with all the other services.
The app is the Svelte frontend application that the user will interact with.
It interacts with the backend with GraphQL.
The user can:
- visualize the current data of the brew machine
- modify the state of the brew machine
- configure the components of the brew machine
The main part of this project, it saves and updates the information of the brew machine.
It offers a GraphQL API and interacts with the brew machine with the OPC UA protocol
The MongoDB database acts as a source of truth of for the BrewController.
It contains:
- a historic record of the states from the brew machine
- logs of the events made by users
- current status of the brew machine and its components
- details of the components (given by the user)
For sake of simplicity, we use docker-compose for setting the project as well as pnpm
nodejs
pnpm
dotnet 5.0 sdk
docker
docker-compose
Install npm packages for the frontend
cpu@user:$ cd frontend
cpu@user:$ pnpm install
Run the docker services
cpu@user:$ docker-compose up -d
Run the backend with your favorite IDE for C# (Rider, VS, ...)
Run the web app
cpu@user:$ cd frontend
cpu@user:$ pnpm run dev
- http://localhost:5000/graphql the interface to interact with the GraphQL API (disabled in production)
- http://localhost:3000 the frontend interface
BREW_DB_URI
the connection string for the MongoDB (default: mongodb://root@pass:localhost)BREW_APP_DIRECTORY
the absolute path for the frontend buildASPNETCORE_URLS
the url where the frontend and backend is hosted (default: http://127.0.0.1:5000)BREW_OPCUA_SERVER_ADDRESS
the OPC UA address for the communicating with the hardware (default: opc.tcp://localhost:4840)BREW_DISABLE_OPCUA
if set, it disables the communication with the OPC UA server