Finds Grailed items that are starting to sell well: live listings (active and sold) grouped into brand → product type → model, with sales growth, time to sell, price and supply. The runtime has no mock, replay, synthetic-source, or offline acceptance mode.
Requirements: brew install uv node@20 pnpm (uv provides Python 3.11.9 from .python-version).
- Run
make setuponce. It createsbackend/.venv, installs backend and frontend packages, applies migrations and builds the UI. It is safe to rerun;scripts/setup.sh --forcerecreates the venv. - Run
make start. It rebuilds the UI when sources changed, applies migrations, and opens http://127.0.0.1:8000. For development usemake dev(backend :8000 + Next.js :3000). - Add brands on Brands, press Update data on Collect data, then open Trends:
models with growing sales, fast sales and small supply, plus liquidity (P30, Liquidity Score),
prices by condition, seasonality and a resale calculator; the metrics are checked by a
backtest (
python -m app.cli metrics-backtest, see docs/METRICS.md). Groups are brand + product type + model (docs/GROUPING.md) and can be renamed, merged or split on the group card.
Before any Grailed request, review the applicable ToS, robots.txt, and law.
Do not run Uvicorn with --reload or multiple workers: the backend holds a single-instance
lock and SQLite has one writer.
make check # everything CI runs
make backend-check # ruff, mypy, pytest --cov
make frontend-check # eslint, tsc, vitest, next build
make test ARGS="tests/test_metrics.py -k <name>"make help lists all targets.
Source-independent checks do not replace the bounded live canary required by docs/TESTING.md
(python -m app.cli discover, canary, taxonomy-check).
From backend/ with the venv active (source .venv/bin/activate):
python -m app.cli retention
python -m app.cli retention --apply
python -m app.cli db-backup
python -m app.cli regroup
python -m app.cli grouping-report --brand "Rick Owens"
python -m app.cli db-restore data/backups/grailed-YYYYMMDDTHHMMSSZ.sqlite3
python -m app.cli db-restore data/backups/grailed-YYYYMMDDTHHMMSSZ.sqlite3 --applyStop the backend before applying a restore.