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 installRun the docker services
cpu@user:$ docker-compose up -dRun 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_URIthe connection string for the MongoDB (default: mongodb://root@pass:localhost)BREW_APP_DIRECTORYthe absolute path for the frontend buildASPNETCORE_URLSthe url where the frontend and backend is hosted (default: http://127.0.0.1:5000)BREW_OPCUA_SERVER_ADDRESSthe OPC UA address for the communicating with the hardware (default: opc.tcp://localhost:4840)BREW_DISABLE_OPCUAif set, it disables the communication with the OPC UA server