Skip to content

AI-powered wine recommendation platform — SAQ catalog scraper, Claude RAG, Telegram bot & web app

License

Notifications You must be signed in to change notification settings

vpatrin/saq-sommelier

Repository files navigation

SAQ Sommelier

AI-powered wine recommendation engine built on the SAQ (Quebec liquor board) product catalog.

CI Version Python 3.12 Ruff backend coverage scraper coverage bot coverage

  • 🍷 Scrapes ~38k products from the SAQ public sitemap into PostgreSQL
  • 🔍 FastAPI catalog API with search, filtering, and restock alerts
  • 🤖 Telegram bot for browsing, watching, and notifications
  • 📍 In-store availability lookup (planned)
  • 💬 Natural language recommendations via Claude RAG (planned)

Architecture

graph LR
    SAQ[SAQ.com]
    Scraper[Scraper]
    DB[(PostgreSQL)]
    API[FastAPI]
    Claude[Claude API]
    Bot[Telegram Bot]
    Web[React Dashboard]

    SAQ -- sitemap XML --> Scraper
    Scraper -- write --> DB
    DB -- read --> API
    API --> Claude
    Bot -- calls --> API
    Web -- calls --> API

    style Web stroke-dasharray: 5 5
    style Claude stroke-dasharray: 5 5
Loading

Dashed = planned. See docs/ARCHITECTURE.md for full details.

Quick start

make install              # install all dependencies (Poetry)
cp .env.example .env      # defaults work as-is
make run-db               # start PostgreSQL (localhost:5432)
make migrate              # create database tables
make dev-scraper          # populate the database (~38k products)
make dev-backend          # start the backend (localhost:8001)

Development

make lint          # ruff check
make format        # ruff format
make test          # pytest (all services)
make coverage      # tests + coverage badges
make migrate       # alembic upgrade head
make build         # docker build
make run / down    # docker compose (full stack / stop)

See docs/DEVELOPMENT.md for database setup options and full workflow.

Documentation

Legal

SAQ data is scraped ethically via their public sitemap (listed in robots.txt). Rate-limited to 2s between requests with transparent bot identification.

License

MIT

About

AI-powered wine recommendation platform — SAQ catalog scraper, Claude RAG, Telegram bot & web app

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published