Skip to content

penguincrest/BarAssistant-Reddit-Importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍸 Cocktail Import Pipeline

Reddit → Bar Assistant cocktail recipe import pipeline with LLM-powered parsing and a side-by-side review UI.

Features

  • Multi-source fetching: Import from XLSX spreadsheets, local HTML files, PullPush API, or Browserless.io
  • Multi-LLM parsing: Claude, OpenAI, Google AI, Ollama (local), LM Studio (local)
  • Side-by-side review: Original Reddit post on the left, parsed recipe proposal on the right
  • Direct BA import: Approve recipes and they're POSTed directly to your Bar Assistant instance, including images
  • Ingredient matching: Auto-matches parsed ingredients against your BA ingredient database
  • Persistent state: Recipe queue and settings survive container restarts
  • Docker-ready: Single container, minimal config

Quick Start

Docker Compose (recommended)

git clone https://github.com/YOUR_USER/cocktail-pipeline.git
cd cocktail-pipeline
docker compose up -d

Open http://localhost:3847

Manual / Development

npm install
npm run dev

Frontend runs on :5173 (Vite), backend on :3847 (Express). Vite proxies /api/* to the backend automatically.

Configuration

All configuration is done through the Settings page in the UI:

Setting Description
BA API URL Your Bar Assistant API base URL
BA API Token Bearer token for BA authentication
Browserless Key Optional — for fetching Reddit posts via headless Chrome
LLM Providers Add one or more: Claude, OpenAI, Google, Ollama, LM Studio

For local LLMs (Ollama / LM Studio)

When running in Docker, local LLM endpoints should use http://host.docker.internal:11434 (Ollama) or http://host.docker.internal:1234 (LM Studio) instead of localhost.

Workflow

  1. Settings → Configure BA connection and LLM provider(s)
  2. Fetch → Load recipes from spreadsheet or HTML files
  3. Browse → Filter/search the recipe queue
  4. Parse & Review → Select a recipe, parse with your chosen LLM, review the proposal side-by-side
  5. Approve/Edit/Reject → Approved recipes are imported to BA with images

Data Persistence

The ./data volume stores:

  • html/ — Fetched Reddit post HTML files
  • images/ — Downloaded cocktail images
  • pipeline-state.json — Recipe queue, config (minus API keys), and processing state

API Endpoints

The Express backend proxies all external calls to avoid CORS issues:

Endpoint Purpose
GET/POST /api/ba/* Bar Assistant API proxy
POST /api/ba-image/:id Upload images to BA cocktails
POST /api/browserless/content Browserless.io proxy
GET /api/pullpush/submission PullPush Reddit archive
GET /api/pullpush/comments PullPush comments
POST /api/llm/chat LLM inference proxy (all providers)
POST /api/import/xlsx Parse XLSX spreadsheet
GET/POST /api/files/html Local HTML file management
GET /api/state Load persisted state
POST /api/state Save state

Architecture

┌─────────────────────────────────────────────┐
│              Docker Container               │
│                                             │
│  ┌─────────┐    ┌──────────────────────┐   │
│  │  React   │───▶│   Express Backend    │   │
│  │ Frontend │    │                      │   │
│  │ (Vite)   │    │  /api/ba/*  ──▶ BA   │   │
│  │          │    │  /api/llm/* ──▶ LLM  │   │
│  └─────────┘    │  /api/files ──▶ disk  │   │
│                  └──────────────────────┘   │
│                         │                    │
│                    ./data/ volume            │
└─────────────────────────────────────────────┘

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages