Go to file
wasrusgen 9e652c4a34 catalog: models cache in Sheets — AI picks from real list, no SKU hallucination
NEW MODULE app/catalog.py:
- refresh_catalog(cats, sources, per_brand, delay) — runs parsers for seed brand+category pairs
- list_catalog(cat, tier, brand) — reads from Sheets
- list_for_ai(cats, tiers) — compact text for AI prompt context
- SEED_BRANDS_BY_TIER + CATEGORY_QUERIES — 22 brands × 8 cats = 176 combos
- Saves top-2 relevant results per (brand × cat), filters by brand presence in title
- Dedup by title hash within (cat, brand) bucket

SHEETS:
- ensure_sheet(name, headers) — auto-creates Catalog tab on first refresh
- Schema: id, category, brand, tier, model_name, search_query, price_min/max, image_url, source, url, last_seen_at

ENDPOINTS:
- POST /api/catalog/refresh?cat=X&per_brand=N — manual refresh (1 cat ~2-5 min)
- GET /api/catalog/list?cat=&tier=&brand= — read with filters
- GET /api/catalog/preview_ai?cats=fridge — debug what AI receives

AI PROMPT:
- Rule #0: if catalog passed in user prompt — MUST select only from there
- _build_catalog_context: filters by checklist.budget_preset → tier subset
  (luxe→premium, premium→premium+middle, middle→middle, budget→middle+budget)

_handle_podbor:
- Loads catalog subset, appends to user_prompt as 'ДОСТУПНЫЙ КАТАЛОГ МОДЕЛЕЙ'
- AI 'выбирай ТОЛЬКО из этого списка' rule reinforced

NEXT: trigger refresh manually for 1 category (~3 min), then real podbor test
to verify AI uses catalog models instead of hallucinating SKUs
2026-05-12 06:32:39 +03:00
.github/workflows ci: re-trigger Pages deploy after enabling 2026-05-09 01:11:54 +03:00
backend feat(backend): switch AI provider from Anthropic to GigaChat (Sber) — OAuth token caching, callAI dispatch 2026-05-10 14:22:53 +03:00
backend-py catalog: models cache in Sheets — AI picks from real list, no SKU hallucination 2026-05-12 06:32:39 +03:00
bot feat(infra): Python FastAPI backend + Docker compose for VPS deploy (GigaChat with Russian root CA) 2026-05-10 17:44:21 +03:00
deploy feat(deploy): add Cloudflare Quick Tunnel service for public HTTPS while domain is on verification-hold 2026-05-10 22:16:07 +03:00
design-drafts miniapp: hierarchical wizard for fridge category (style D pictograms) 2026-05-10 23:57:03 +03:00
docs chore: initial scaffold (bot, miniapp, backend, docs) 2026-05-08 23:56:48 +03:00
miniapp simplify: remove 'features' step from all 8 categories 2026-05-11 23:37:41 +03:00
.gitignore gitignore: wb.json test artifact 2026-05-11 16:49:02 +03:00
.tmp_ssh.py miniapp: hierarchical wizard for fridge category (style D pictograms) 2026-05-10 23:57:03 +03:00
README.md chore: initial scaffold (bot, miniapp, backend, docs) 2026-05-08 23:56:48 +03:00

ZOV Tech — AI-подбор кухонной техники

Telegram-бот + MiniApp для подбора техники под кухню фабрики ЗОВ. Менеджер заполняет с клиентом чек-лист → нейросеть собирает предложение → менеджер получает результат за минуту.

Структура

zov-tech/
├── bot/         — Telegram-бот (Python + aiogram)
├── miniapp/     — MiniApp (HTML + JS, хост на GitHub Pages)
├── backend/     — Google Apps Script (бэкенд + работа с Sheets)
├── docs/        — Документация (ТЗ, deployment, decisions)
└── .claude/     — настройки Claude Code (вне репо)

Стек

Слой Технология
Бот Python 3.10+, aiogram 3.x
AI Anthropic Claude (Haiku 4.5)
MiniApp Vanilla JS + HTML, без сборки
Backend Google Apps Script (Web App)
БД Google Sheets (на старте), PostgreSQL (после роста)
Хостинг бота VPS (Selectel / Timeweb)
Хостинг MiniApp GitHub Pages

Быстрый старт (когда будет код)

cd bot
python -m venv .venv
.venv\Scripts\activate    # Windows
pip install -r requirements.txt
copy .env.example .env    # заполнить токены
python main.py

Документация

Контакты

Куратор / заказчик: Василий (@wasrusgen) Канал: @wasrusgen1