Commit graph

2 commits

Author SHA1 Message Date
lekss361
ab57e5756c feat(tradein): Stage 4b — IMV benchmark badge + house info card on estimate result
UI exposure for Stage 3 (IMV cache) + Stage 2c (houses data).

New components:
- IMVBenchmark: показывает Avito recommended price + range + market_count + сравнение с нашей оценкой (diff %)
- HouseInfoCard: показывает ближайший дом — rating + reviews + 9 characteristics (year/floors/elevators/concierge/etc)

New hooks:
- useEstimateImvBenchmark(id) → GET /api/v1/trade-in/estimate/{id}/imv-benchmark
- useEstimateHouses(id) → GET /api/v1/trade-in/estimate/{id}/houses

2 new TS types: HouseInfoForEstimate, IMVBenchmarkResponse (mirror Stage 4a backend Pydantic schemas).

Wired в page.tsx между HeroSummary и ListingsCard в result section.
Components conditionally render: возвращают null если data unavailable.

CSS: добавлены .imv-benchmark + .house-info-card стили (responsive grid).
TS strict, ESLint clean, next build pass.

Refs: AvitoScraper_v2_Implementation_Plan Stage 4b. Backend contract: PR Stage 4a (паралельный).
2026-05-23 16:20:42 +03:00
lekss361
02267d0306 feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in)
- FastAPI backend: PostGIS estimator + 3 scrapers (Avito/Cian/Yandex)
- Next.js 15 frontend: tradein.html mockup design, basePath=/trade-in
- WeasyPrint PDF (Брусника-style 4-page report)
- Address autocomplete с typo-tolerance + 6 EKB presets
- Изолированный docker stack gendesign-tradein (отдельная postgres БД)
- Caddy inline routes: gendsgn.ru/trade-in/* и /trade-in/api/v1/*
- Forgejo Actions: .forgejo/workflows/deploy-tradein.yml (shell-based GHCR login)
- Триггер только по paths: tradein-mvp/** (не пересекается с deploy.yml)
- Образы: ghcr.io/lekss361/gendesign-tradein-{backend,frontend}:latest

Первый запуск на сервере (вручную, один раз):
  - создать /opt/gendesign/tradein-mvp/.env.runtime (postgres pwd, contact email)
  - docker network create gendesign_shared (если нет)
  - docker compose -p gendesign-tradein up -d
  - docker compose -p gendesign exec caddy caddy reload
2026-05-21 00:25:39 +03:00