|
|
||
|---|---|---|
| api | ||
| database | ||
| web | ||
| docker-compose.yml | ||
| LICENSE | ||
| README.md | ||
MixLab
MixLab is a self-hosted web application for creating, managing, and scaling drink mixes.
Create your own drink recipes, define the ingredients and quantities, and automatically scale a recipe to the amount you want to make.
Features
- Create and manage drink recipes
- Add ingredients with configurable quantities
- Support multiple measurement units
- Scale recipes to a desired volume
- Calculate ingredient ratios
- Store recipes in a database
- Self-hosted
- Docker support
- REST API
- Simple web interface
Example
A recipe can look like this:
Blue Raspberry Fizz
Blue Raspberry Syrup 30 ml
Lemon Juice 15 ml
Sparkling Water 255 ml
────────────────────────────
Total 300 ml
Want to make 1.5 liters instead?
MixLab automatically scales the recipe:
Blue Raspberry Syrup 150 ml
Lemon Juice 75 ml
Sparkling Water 1275 ml
────────────────────────────
Total 1500 ml
Tech Stack
- PHP
- MariaDB
- HTML
- CSS
- JavaScript
- Docker
- REST API
Project Structure
mixlab/
├── api/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── services/
│ └── index.php
├── web/
│ ├── css/
│ ├── js/
│ ├── index.html
│ ├── recipes.html
│ └── mixer.html
├── database/
│ └── schema.sql
├── docker-compose.yml
└── README.md
Core Concepts
Recipes
A recipe represents a complete drink mix.
Each recipe contains:
- Name
- Description
- Ingredients
- Ingredient quantities
- Total volume
Ingredients
Ingredients are reusable components that can be used in multiple recipes.
Examples:
- Blue raspberry syrup
- Lemon juice
- Cola
- Sparkling water
- Energy drink
- Flavor concentrate
Recipe Scaling
Recipes are stored using their base quantities.
MixLab calculates a scaling factor based on the requested amount:
scaling factor = target volume / base volume
Each ingredient is then multiplied by that factor.
API
The backend exposes a REST API for managing recipes and ingredients.
Example endpoints:
GET /api/recipes
GET /api/recipes/{id}
POST /api/recipes
PUT /api/recipes/{id}
DELETE /api/recipes/{id}
GET /api/ingredients
POST /api/ingredients
PUT /api/ingredients/{id}
DELETE /api/ingredients/{id}
Running With Docker
Clone the repository:
git clone <repository-url>
cd mixlab
Start the application:
docker compose up -d
The web interface and API will then be available through the configured Docker ports.
Development
MixLab is designed to be easy to run locally and easy to self-host.
The backend and frontend are kept separate so the API can also be used by other clients in the future, such as:
- Mobile applications
- CLI tools
- Other web interfaces
- Home automation integrations
Roadmap
V1 — Core
- Project structure
- Database schema
- PHP API
- Recipe CRUD
- Ingredient CRUD
- Recipe ingredients
- Basic web interface
- Recipe scaling
V2 — Better Recipes
- Ingredient categories
- Recipe tags
- Favorites
- Search
- Recipe notes
- Improved unit handling
V3 — Advanced Mixing
- Percentage-based recipes
- Batch size calculator
- Nutrition information
- Cost calculation
- Shopping lists
- Recipe import/export
V4 — Multi-User
- User accounts
- Authentication
- Private recipes
- Shared recipes
- Public recipe links
License
Checkout LICENSE