An open API service indexing awesome lists of open source software.

https://github.com/andrewohnsland/cocktailberry

Easily serve Cocktails with Raspberry Pi and Python on any cocktail machine 🐍 + 🍸 = πŸ₯³
https://github.com/andrewohnsland/cocktailberry

cocktail cocktail-berry cocktail-machine cocktail-maker cocktailberry cocktails pi-hardware pyqt5 python raspberry raspberry-pi

Last synced: 3 months ago
JSON representation

Easily serve Cocktails with Raspberry Pi and Python on any cocktail machine 🐍 + 🍸 = πŸ₯³

Awesome Lists containing this project

README

          

CocktailBerry


![GitHub release (latest by date)](https://img.shields.io/github/v/release/AndreWohnsland/CocktailBerry)
![GitHub Release Date](https://img.shields.io/github/release-date/AndreWohnsland/CocktailBerry)
![Python Version](https://img.shields.io/badge/python-%3E%3D%203.13-blue)
![GitHub](https://img.shields.io/github/license/AndreWohnsland/CocktailBerry)
![GitHub issues](https://img.shields.io/github/issues-raw/AndreWohnsland/CocktailBerry)
[![Documentation Status](https://readthedocs.org/projects/cocktailberry/badge/?version=latest)](https://cocktailberry.readthedocs.io)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=AndreWohnsland_CocktailBerry&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=AndreWohnsland_CocktailBerry)
![GitHub Repo stars](https://img.shields.io/github/stars/AndreWohnsland/CocktailBerry?style=social)

[![Support CocktailBerry](https://img.shields.io/badge/Support%20CocktailBerry-donate-yellow)](https://www.buymeacoffee.com/AndreWohnsland)

CocktailBerry is a Python and Qt (or React for v2) based app for a cocktail machine on the Raspberry Pi.
It enables you to build your own, fully customized machine, while still being able to use the identical software on each machine.
Detailed information, installation steps and SetUp can be found at the [Official Documentation](https://docs.cocktailberry.org).

v2-demo

Supercharge your next party to a whole new level! 🐍 + 🍸 = πŸ₯³

website
documentation
dashboard

This app is used to control a cocktail machine and easily prepare cocktails via a nice-looking user interface.
It also offers the option to create and manage your recipes and ingredients via the interface and calculates the possible cocktails to prepare from given ingredients.
Track and display cocktail data for different teams to even further increase the fun.
Let's get started!

Like this project? Give it a star on GitHub! ⭐

# TL;DR

Cocktail in the making

# Features

CocktailBerry currently comes in two versions, v1 and v2.
The v1 is the stable version which ships the QT app as a single application.
[v2](https://docs.cocktailberry.org/web/) is the new version with a separate API and UI, which offers more flexibility, but might have some issues on built-in touchscreens.
Both versions have the full feature set listed below.

CocktailBerry can do:

- Prepare cocktails of a given volume and adjusted concentration of alcoholic ingredients
- Let customers pay via NFC chips/cards
- Add new ingredients and recipes with needed information via the UI
- Specify additional ingredients for later hand add within a recipe (like sticky syrup)
- Define connected ingredients to the machine and existing additional ingredients via the UI
- Auto calculate and display possible recipes dependent on given information
- Option to serve cocktails without alcohol
- Execute a cleaning program to get rid of remaining fluids
- Visualize the cocktail data and get insights
- Run headless, so you can access it from another device
- Send cocktail production data to a given endpoint, for example a webhook
- Keep track of cocktail count and volume from different teams for some fun competition
- Select different themes to fit your liking
- Switch between user interface languages
- Support WS281x LEDs on your machine
- Support for RFID/NFC reader
- Support for Service Personnel
- Implement your own [addon](https://github.com/AndreWohnsland/CocktailBerry-Addons) to extend the base functionality

In addition, there is the possibility to use and set up a second device as a dashboard:

- Provide the teams API to post and get cocktail data
- Display different modes of data for a team-by-team comparison
- _Optional_: Use the dashboard as WiFi hot-spot

# Quickstart

Here are some simple steps to get CocktailBerry running. You need to have **Python 3.13** or newer and **git** installed.
If you are using a Raspberry Pi and a current OS, you should be good to go.

On the RPi, you can try the new [all-in-one installer script](https://github.com/AndreWohnsland/CocktailBerry/blob/master/scripts/all_in_one.sh).
One command should install everything:

```bash
wget -O - https://raw.githubusercontent.com/AndreWohnsland/CocktailBerry/master/scripts/all_in_one.sh | bash
```

Otherwise, you can manually install it using [uv](https://docs.astral.sh/uv/getting-started/installation/):

```bash
cd ~
git clone https://github.com/AndreWohnsland/CocktailBerry.git
cd CocktailBerry
uv sync --extra v1 --extra nfc # <- use the nfc extra only if you want nfc support
uv run runme.py
```

This will start the CocktailBerry program. You may want to run the provided installer script for the RPi instead of pip.
See [Installation](https://cocktailberry.readthedocs.io/installation/) for more information.

```bash
sh scripts/setup.sh
```

Now you can [Set Up](https://cocktailberry.readthedocs.io/setup/#setting-up-the-machine-modifying-other-values) your CocktailBerry and tweak the settings to your liking.

# Interface

The interface was programmed with PyQt6 (v1) for the users to easily interact with CocktailBerry and enter new ingredients/recipes.
There are different views for the tasks.

The Maker GUI:

Maker

Maker

The Ingredient GUI:

Ingredient

The Recipe GUI:

Recipe

The Bottle GUI:

Bottle


# Pull Requests and Issues

If you want to support this project, feel free to fork it and create your own pull request.
To get started, have a quick look into the [Guidelines for contributing](./CONTRIBUTING.md).
Encounter a problem? Open a ticket or issue to let us know.
Have an idea for an important feature? Submit a feature requestβ€”it may be implemented in the future.

## Contributing Possibilities

Here is a general list of features or refactoring things, I may do in the future.
With your help, these things come even faster!
If your idea is not on the list, feel free to open a feature request!
Generally, it is recommended to first open an issue or an discussion to talk about your idea before directly implementing it.

- `easy`: Translate all dialogs / UI to your native language
- `easy`: Submit a feature request or issue
- `easy-hard`: Implement a cool [addon](https://github.com/AndreWohnsland/CocktailBerry-Addons) and make it verified

# Development

This project uses [uv](https://docs.astral.sh/uv/), [node.js](https://nodejs.org/en) and [yarn](https://yarnpkg.com/getting-started/install) to manage all its Python dependencies.
To get started, you need to install the tools and then install the dependencies.
See also at the [dev notes](./docs/.devnotes.md) section for a complete run down as well as extra information.

```bash
uv sync --all-extras
```

## Just Commands

This project uses [just](https://just.systems/) as a command runner for common development tasks. To see all available commands, run:

```bash
just --list
```

We also use pre-commits to check the code style and run some tests before every commit.
You can install them with:

```bash
uv run pre-commit install --install-hooks
```

This will install all dependencies and you can start developing.
Then just run:

```bash
uv run runme.py
```

If you want to develop the api, you can also run it with

```bash
uv run fastapi dev ./src/api/api.py
```

and run the web UI via:

```bash
cd web_client/
yarn install
yarn dev
```

## Mocking RFID/NFC Reader and Services

You can set the `MOCK_RFID` and `MOCK_PAYMENT_SERVICE` environment variables to use the mock implementations of the RFID reader and payment service respectively.
This is useful if you want to develop these features without having the actual hardware or service available.

The mocked NFC reader will cycle through two predefined IDs every minute. It will return a read card ID every 5 seconds for testing purposes.
If you want to test specific behavior, it is recommended not to mock but use the real hardware.

The mocked payment service will simulate successful payments without actually connecting to any external service.
It will create non-existing IDs with a default balance of 20.
The adult flag will cycle between true and false for each new id.

## Building Documentation

You can build the documentation locally using:

```bash
uv run mkdocs serve
```