Bar Companion Docs

Ethan Katte

Bar Companion

Quickstart

  • Install Python deps from requirements.txt
  • Run python app.py in bar_companion
  • Ensure secrets.json contains OPENAI_KEY (descriptions, notes, distilleries)
  • SQLite DB at ./database/bar_companion.db
  • Uploads stored under ./database_images
Bar Companion home screen

Description

The Bar Companion is a Flask-based web app for managing a spirits collection and tasting experiences: it stores bottle inventory in a SQLite database, supports adding bottles with images and descriptions, tracks users and their reviews/tasting notes, exposes pages/APIs for inventory browsing, user profiles, and event-based tastings (with client and console views for running events), and adds a distillery catalog with a globe view.

Capabilities

What the app supports today.

Inventory and Bottles

  • Browse and filter inventory
  • Add bottles with images and descriptions
  • Auto-generate bottle descriptions
  • Mark bottles unavailable
  • Flag bottles as special

Users and Reviews

  • Create users with profile photos
  • Collect bottle reviews and scores
  • Attach tasting notes to reviews
  • Aggregate community notes per bottle

Events

  • Create tasting events
  • Assign bottles and participants
  • Collect event-specific reviews
  • Upload event photos

Distilleries

  • Browse distillery catalog and globe view
  • Auto-populate distillery metadata
  • Attach and update distillery images
  • Merge duplicate distilleries

Expert Notes

  • Set curated tasting notes per bottle
  • Edit bottle descriptions

Data Model

Main tables and their roles.

Table
Purpose
bottles
Inventory items and metadata (availability, special, distillery mapping)
distilleries
Distillery metadata and geo coordinates
users
Tasting participants and reviewers
reviews
User reviews and scores for bottles
events
Tasting events and photo folders
event_participants
Users linked to events
event_drinks
Bottles linked to events
tasting_notes
Hierarchical tasting note taxonomy
community_notes
Notes tied to reviews
expert_notes
Curated notes tied to bottles

Limitations and Notes

Operational constraints to keep in mind.

Security and Auth

  • No authentication or role checks
  • CORS is enabled for all origins
  • Admin page is a public route

Data and Validation

  • SQLite is local file based
  • Route inputs are lightly validated
  • Inventory sorting uses raw column names
  • Events use name + date to build folder paths

External Services

  • OpenAI calls (descriptions, notes, distilleries) require OPENAI_KEY
  • DuckDuckGo image search needs network access
  • Distillery refresh uses OpenStreetMap Nominatim (network required)