71 lines
3.2 KiB
Bash
71 lines
3.2 KiB
Bash
# Copy to .env and fill in real values. .env is git-ignored — never commit secrets.
|
|
|
|
# ─── Backend selection ───
|
|
# data provider: cosmos | mock
|
|
DATA_BACKEND=cosmos
|
|
# tracker (SKU list in / decisions out): csv | gsheets
|
|
TRACKER_BACKEND=csv
|
|
|
|
# ─── COSMOS API (primary data source: cost, fees, profit, price) ───
|
|
COSMOS_BASE_URL=https://cosmos-api.utopiadeals.com
|
|
COSMOS_EMAIL=you@utopiabrands.com
|
|
COSMOS_PASSWORD=
|
|
# Marketplace enum used by COSMOS (NOT the Amazon marketplace id)
|
|
COSMOS_MARKETPLACE=AMAZON_USA
|
|
COSMOS_TIMEOUT_SECONDS=30
|
|
|
|
# ─── LLM (optional; falls back to a deterministic template if unset) ───
|
|
OPENAI_API_KEY=
|
|
OPENAI_MODEL=gpt-4.1
|
|
# Deep analysis uses a big reasoning model (gpt-5.1 default; gpt-5-pro for max depth)
|
|
OPENAI_ANALYSIS_MODEL=gpt-5.1
|
|
OPENAI_REASONING_EFFORT=high
|
|
|
|
# ─── CSV tracker (used when TRACKER_BACKEND=csv) ───
|
|
TRACKER_CSV_PATH=./data/sample_skus.csv
|
|
TRACKER_CSV_OUT=./data/sample_skus_out.csv
|
|
AUDIT_LOG_PATH=./data/audit_log.csv
|
|
|
|
# ─── Google Sheets tracker (used when TRACKER_BACKEND=gsheets) ───
|
|
GOOGLE_APPLICATION_CREDENTIALS=./config/service_account.json
|
|
TRACKER_SHEET_ID=
|
|
TRACKER_WORKSHEET=master
|
|
|
|
# ─── Apify (Buy Box / competitor price on the ASIN's Amazon PDP) ───
|
|
# Flow: SKU → COSMOS ASIN → Apify scrapes https://www.amazon.com/dp/{ASIN}
|
|
# Without APIFY_TOKEN the competitive gate stays UNKNOWN (COSMOS has no Buy Box data).
|
|
APIFY_TOKEN=
|
|
APIFY_ACTOR_ID=junglee/Amazon-crawler
|
|
# Your Amazon merchant id (seller.id on the PDP). STRONGLY RECOMMENDED: it detects
|
|
# WON vs LOST_PRICE *and* filters our own offers out of the competitor band. Without it,
|
|
# our own listings are counted as competitors.
|
|
APIFY_SELLER_ID=
|
|
APIFY_MAX_OFFERS=10
|
|
APIFY_ZIP_CODE=10001
|
|
APIFY_TIMEOUT_SECONDS=300
|
|
# Speed: cost is per actor RUN (~30-45s cold start), not per ASIN. Measured: 3 ASINs in
|
|
# one run = 47s vs ~145s one-by-one. So ASINs are batched into a single run, and raw
|
|
# payloads are cached (competitor prices don't move minute-to-minute; the actor bills
|
|
# per event). Set the TTL to 0 to disable caching.
|
|
APIFY_BATCH_SIZE=20
|
|
APIFY_CACHE_TTL_SECONDS=21600
|
|
APIFY_CACHE_PATH=./data/apify_cache.json
|
|
|
|
# ─── Competitor comparison workbook (the sibling scraper's output) ───
|
|
# For a COVERED product line this takes precedence over the per-ASIN Apify scrape: it carries
|
|
# like-for-like rivals matched on size + colour, which Apify cannot produce.
|
|
#
|
|
# Leave the path blank to auto-discover the newest Competitor_Price_Comparison_*.xlsx in the
|
|
# directories below (newest by modification time wins).
|
|
COMPETITOR_SHEET_PATH=
|
|
# Semicolon-separated search path for auto-discovery.
|
|
COMPETITOR_SHEET_DIRS=./competetor;../scraper
|
|
# true = a SKU the sheet does not cover gets an explicit N/A (the default while one product
|
|
# line is under test — every verdict then either rests on the sheet or says it has no
|
|
# competitor data, and no stray scrape can price a SKU the sheet was meant to govern).
|
|
# false = uncovered SKUs fall back to a per-ASIN Apify scrape. Switch once coverage is broad.
|
|
COMPETITOR_SHEET_ONLY=true
|
|
|
|
# ─── Mock Amazon fixtures (used only when DATA_BACKEND=mock) ───
|
|
MOCK_FIXTURES_PATH=./tests/fixtures/amazon_mock.json
|