Skip to content

Configuration

IK edited this page Mar 4, 2026 · 6 revisions

Configuration

This page documents runtime settings, persistence, defaults, and safe deployment notes.

Last reviewed: March 4, 2026

Storage Model

EVE Flipper uses two storage layers:

  1. SQLite (flipper.db)
    • backend config (/api/config)
    • watchlist data
    • scan history and cached scan results
    • cache tables (orders/history)
    • auth sessions
  2. Browser localStorage
    • UI-only state (active tab, presets, some UX preferences)
    • does not replace backend config

Default Config (Backend)

Defaults come from internal/config/config.go (config.Default()):

Key Default
cargo_capacity 5000
buy_radius 5
sell_radius 10
min_margin 5
sales_tax_percent 8
broker_fee_percent 0
split_trade_fees false
buy_broker_fee_percent 0
sell_broker_fee_percent 0
buy_sales_tax_percent 0
sell_sales_tax_percent 8
min_route_security 0.45
avg_price_period 14
purchase_demand_days 0.5
source_regions The Forge, Domain, Sinq Laison, Metropolis, Heimatar
target_market_system Jita
alert_desktop true

Config API

Read current config:

curl http://127.0.0.1:13370/api/config

Patch config (partial update):

curl -X POST http://127.0.0.1:13370/api/config \
  -H "Content-Type: application/json" \
  -d '{"min_margin":10,"cargo_capacity":10000}'

Notes:

  • POST /api/config is patch-like (only provided keys change).
  • Invalid values are clamped/sanitized server-side before save.

Validation and Clamps

Key server-side bounds from internal/api/server.go:

Key Clamp
cargo_capacity >= 0
buy_radius 0..50
sell_radius 0..50
min_margin 0..100
sales_tax_percent 0..100
broker_fee_percent 0..100
buy_broker_fee_percent 0..100
sell_broker_fee_percent 0..100
buy_sales_tax_percent 0..100
sell_sales_tax_percent 0..100
min_daily_volume >= 0
max_investment >= 0
min_item_profit >= 0
min_s2b_per_day >= 0
min_bfs_per_day >= 0
min_s2b_bfs_ratio >= 0
max_s2b_bfs_ratio >= 0
min_route_security 0..1
avg_price_period 1..365 (fallback 14)
min_period_roi >= 0
max_dos >= 0
min_demand_per_day >= 0
purchase_demand_days >= 0
shipping_cost_per_m3_jump >= 0
target_market_location_id >= 0
opacity 0..100

Additional normalization:

  • source_regions: deduplicated, trimmed, capped to 32 values
  • category_ids: deduplicated positive ints, capped to 64 values
  • ignored_system_ids: normalized against loaded SDE system list (when available)
  • alert channels: at least one channel is kept enabled

Runtime Flags

Backend flags:

./eve-flipper --host 127.0.0.1 --port 13370
Flag Default Meaning
--host 127.0.0.1 bind address (0.0.0.0 for LAN access)
--port 13370 HTTP port

Examples:

  • Local only: ./eve-flipper
  • LAN access: ./eve-flipper --host 0.0.0.0
  • Different port: ./eve-flipper --port 8080

SSO Configuration (Source/Local Builds)

Official release builds may include injected SSO credentials at build time. For local/source builds, configure .env in repo root:

ESI_CLIENT_ID=your-client-id
ESI_CLIENT_SECRET=your-client-secret
ESI_CALLBACK_URL=http://localhost:13370/api/auth/callback

If ESI_CLIENT_ID/ESI_CLIENT_SECRET are missing, SSO stays disabled.

Related page: EVE SSO Login

Presets and UI State

Presets are tab-scoped and stored in browser localStorage.

This means:

  • changing browser/profile can hide old presets
  • presets are user/browser specific
  • backend DB config and frontend presets are separate layers

Database Location and Backup

Working directory typically contains:

Eve-flipper/
|- eve-flipper(.exe)
|- flipper.db
`- data/

Backup:

cp flipper.db flipper.db.backup

Reset full local state:

rm flipper.db

Then restart app to recreate DB with defaults.

Security Notes

  • Default bind is localhost only (127.0.0.1).
  • If exposed on network, apply your own perimeter controls (firewall/reverse proxy/TLS).
  • Keep .env secrets private and never commit them.

Related Pages

🚀 Start Here

📈 Trading Modules

🏭 Industry

🧭 Guides

👤 Character & Corp

🧠 Advanced

🛠️ Development

🔗 Links

Clone this wiki locally