Configuration reference
Everything is an environment variable, prefixed FLIPDESK_, loaded from backend/.env (see backend/.env.example for the copy-paste starting point) or the real environment. All values are optional — defaults work out of the box in read-only mode. Source of truth: backend/app/config.py.
Ports
| Var | Default | Notes |
|---|---|---|
FLIPDESK_WEB_PORT | 5873 | Vite dev server. This also drives the SSO redirect URI and CORS origin — see below. |
FLIPDESK_BACKEND_PORT | 8743 | uvicorn API; Vite proxies /api + /auth here in dev. |
Both are deliberately off the common defaults (not 3000/3333/5000/5173/5174/8000/8080/ 8888) to avoid clashing with other local services. Change them together — the justfile, web/vite.config.ts, and backend/app/config.py all read the same two vars, so setting one without the other (or without restarting both processes) will break the dev proxy or the SSO redirect.
ESI client
| Var | Default | Notes |
|---|---|---|
FLIPDESK_ESI_BASE_URL | https://esi.evetech.net | |
FLIPDESK_ESI_DATASOURCE | tranquility | |
FLIPDESK_ESI_USER_AGENT | placeholder | Set this. CCP requires an identifying User-Agent (app/version (char name; contact)); a placeholder violates ESI's terms in spirit even if it doesn't 4xx. |
SSO / auth
| Var | Default | Notes |
|---|---|---|
FLIPDESK_ESI_CLIENT_ID | "" | From developers.eveonline.com. Until both id + secret are set the login button stays disabled. |
FLIPDESK_ESI_CLIENT_SECRET | "" | |
FLIPDESK_ESI_REDIRECT_URI | derived | Blank = http://localhost:{WEB_PORT}/auth/callback. Set explicitly only if the origin you log in from differs from WEB_PORT (e.g. a LAN/phone origin) — it must exactly match the Callback URL registered at developers.eveonline.com. |
SSO scopes
flipdesk requests scopes to read your own market orders, wallet-relevant skills, and standings (for fee derivation), and — if you add a citadel hub — structure market access. If a login predates a scope flipdesk now needs (e.g. you added structure support after first logging in), the header shows a warning; log out and back in to re-authorize with the current scope set. Skill-ID verification runs on every login: if CCP ever remaps the Broker Relations / Accounting skill type IDs, flipdesk detects the name mismatch and falls back to placeholder fees rather than silently computing wrong numbers (me().skills_verified: false).
Market scope
| Var | Default | Notes |
|---|---|---|
FLIPDESK_REGION_ID | 10000002 | The Forge. |
FLIPDESK_HUB_STATION_ID | 60003760 | Jita IV - Moon 4 - Caldari Navy Assembly Plant — the seeded NPC hub, always available even logged out. |
FLIPDESK_CITADEL_OWNER_FEE | 0.0 | Your hub citadel's owner-set broker fee (skills don't apply at citadels — this is a manual override, not derived). SCC's 0.5% is added automatically. Leave 0.0 while the selected hub is an NPC station. |
Fee placeholders (logged-out fallback)
| Var | Default |
|---|---|
FLIPDESK_DEFAULT_BROKER_FEE | 0.01 |
FLIPDESK_DEFAULT_SALES_TAX | 0.0337 |
Replaced by rates derived from your live skills + standings once logged in (see GET /api/me → fees.derived).
Reprice advisor
| Var | Default | Meaning |
|---|---|---|
FLIPDESK_REPRICE_HYSTERESIS_PCT | 0.02 | Ignore drift smaller than this % of price — prevents flapping suggestions on sub-tick noise. |
FLIPDESK_REPRICE_MIN_DRIFT_ISK | 1.0 | ...or this absolute ISK, whichever gate is stricter for cheap items. |
FLIPDESK_REPRICE_COOLDOWN_S | 60.0 | Don't re-suggest the same order within this window even if it drifts again. |
FLIPDESK_REPRICE_MIN_MARGIN_PCT | 0.5 | A buy reprice that would drop flip margin below this → suggest cancel instead of chasing the market down. |
Scanner: depth + capture threshold
| Var | Default | Meaning |
|---|---|---|
FLIPDESK_DEPTH_TOLERANCE_PCT | 0.5 | Aggregate order depth within this % of the best price counts toward bid_depth/ask_depth/executable_qty. |
FLIPDESK_MIN_FLIP_NET_PCT | 0.5 | Legacy capture-play threshold. |
Scanner: maker-flip liquidity/sanity gates
The citadel-hub edge case — quoting both sides only makes sense where the book is thick enough to actually fill both legs.
| Var | Default | Meaning |
|---|---|---|
FLIPDESK_MAKER_MIN_PRICE | 1000.0 | Skip dust below this ISK on either side. |
FLIPDESK_MAKER_MIN_DEPTH | 5 | Minimum executable units on each side to count as a maker row. |
FLIPDESK_MAKER_MAX_SPREAD_PCT | 100.0 | Wider gross spread than this = probably stale/illiquid, excluded entirely. |
FLIPDESK_MAKER_THIN_SPREAD_PCT | 25.0 | Above this, UI shows the "FILL UNLIKELY" caution badge (still listed, flagged). |
Price history / trend recommender (Phase 4)
Sampled by flipdesk itself, tiered: a WATCH set (board rows + your own order types) every ingest pull, the whole book once an hour (discovery tier) — ESI has no structure trade-history endpoint, so this is the only way to build a series.
| Var | Default | Meaning |
|---|---|---|
FLIPDESK_HISTORY_ENABLED | true | Master switch. |
FLIPDESK_HISTORY_RETENTION_DAYS | 7 | Prune samples older than this. |
FLIPDESK_HISTORY_DISCOVERY_INTERVAL_S | 3600 | Whole-book sample cadence. |
FLIPDESK_HISTORY_MAX_WATCH_TYPES | 1000 | Cap on the per-pull watch set size. |
FLIPDESK_TREND_LOOKBACK_HOURS | 6.0 | Window for momentum / mean-reversion calculations. |
FLIPDESK_TREND_MIN_SAMPLES | 6 | Minimum samples before a type can get a recommendation. |
FLIPDESK_TREND_TOP_N | 100 | |
FLIPDESK_TREND_MOMENTUM_THR_PCT | 2.0 | Above this → rising signal. |
FLIPDESK_TREND_DIP_THR_PCT | 3.0 | Below own mean by more than this → dip signal. |
FLIPDESK_TREND_WIDE_SPREAD_PCT | 15.0 | Above this → wide (market-make) signal. |
FLIPDESK_TREND_W_MOMENTUM / _W_DIP / _W_SPREAD / _W_LIQUIDITY | 1.0 / 1.0 / 0.5 / 0.3 | Ranking score weights — raise to bias the top-N toward that signal type. |
Hub discovery + book cache
| Var | Default | Meaning |
|---|---|---|
FLIPDESK_HUB_CACHE_S | 300 | Serve a hub's orderbook from SQLite (zero ESI calls) until it's this old — a ceiling under the ESI Expires header so switching back to a recently-viewed hub doesn't re-pull the whole book. |
FLIPDESK_HUB_DISCOVERY_INTERVAL_S | 900 | Run full structure discovery (what citadels your character can access) at most this often. |
FLIPDESK_HUB_CORP_403_COOLDOWN_S | 21600 | After a /corporations/{id}/structures/ 403, stop retrying it for this long. |
Storage
| Var | Default |
|---|---|
FLIPDESK_DB_PATH | flipdesk.db |
SQLite, WAL mode, disposable — it's an orderbook + price-history cache, not user data. Safe to delete any time (e.g. after a schema change breaks an old file); the next ingest cycle rebuilds it.