hadley/cocktails-demo — explained in plain English
Analysis updated 2026-08-14 · repo last pushed 2024-09-02
Get cocktail inspiration by browsing three random drinks filtered by spirit and flavor.
Learn how Shiny turns R code into an interactive web page without separate frontend code.
Study the included prompts to see how to describe an app idea clearly enough for an AI to build it.
Demo AI-assisted app generation in a data science or coding class.
| hadley/cocktails-demo | yulab-smu/cast3d | hadley/logger | |
|---|---|---|---|
| Stars | 8 | 2 | 1 |
| Language | R | R | R |
| Last pushed | 2024-09-02 | — | 2024-10-16 |
| Maintenance | Stale | — | Stale |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | general | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires R and the Shiny package installed, but no external services or API keys are needed.
The cocktails-demo project is a small web app that helps you pick a cocktail to make. You open it in your browser, see three random drink ideas, and can narrow things down by choosing a base spirit (like gin, vodka, or rum) and the kind of flavors you're in the mood for (bitter, fruity, refreshing, smoky, and so on). Each cocktail comes with a short description and the ingredients you'd need. Under the hood, the app is built with R using a framework called Shiny, which lets you turn R code into an interactive web page without writing separate frontend code. The cocktail data lives in a structured text file format called YAML, where each drink has fields for its name, description, primary spirit, ingredient list, and flavor tags. The app reads that file, displays three cocktails at random, and re-filters the list whenever you pick a spirit or flavor. It's all one self-contained file, which keeps things simple. The audience here is really anyone who wants cocktail inspiration and happens to have R installed, a home mixologist, a data science instructor demoing Shiny, or someone curious about how AI tools can build small apps. It's less a production product and more a teaching example or personal utility. What's notable is that the app was largely generated by ChatGPT, with light manual edits for correctness and appearance. The README includes the actual prompts used to generate both the cocktail data and the app itself, making it a useful reference if you want to see how to describe an app idea clearly enough for an AI to build it. The project trades polish and scale for simplicity and transparency about its origin.
A small R Shiny web app that shows you three random cocktails and lets you filter by spirit and flavor. Built as a demo of AI-assisted app generation, with prompts included.
Mainly R. The stack also includes R, Shiny, YAML.
Stale — no commits in 1-2 years (last push 2024-09-02).
No license information is provided in the repository, so usage rights are unclear.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly general.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.