Advanced Engineering for Research and Analytics — a local platform for quantitative trading research, visualization, and backtesting.
- Frontend: React + Vite (Lumina UI)
- Backend: Node/Express (API + Python indicator execution)
- Chart: TradingView Lightweight Charts
- Desktop (optional): Electron shell
Note: frontend config lives in root-files/ now; use npm --prefix root-files ... (or cd root-files) for frontend scripts.
Install dependencies:
npm install --prefix root-files
npm install --prefix serverRun frontend + backend:
npm --prefix root-files run appMain checks and tests:
npm --prefix root-files run check # minimal lint + typecheck
npm --prefix root-files run test # backend tests (includes smoke)
npm --prefix root-files run test:ui:smoke # Playwright UI smoke (expects backend serving dist on :4800)
npm --prefix root-files run test:chart:perf # chart perf smoke (requires debug mode + backend on :4800)Run the Debug Doctor:
npm --prefix root-files run debug:doctorGenerate an agent report:
npm --prefix root-files run debug:cli report --json --out agent-report.jsonExecute a debug command:
npm --prefix root-files run debug:cli "list indicators"Replay anchor (headless):
npm --prefix root-files run debug:cli replay --asset=CL1! --tf=M15 --back=1dOverride the backend URL with THELAB_DEBUG_URL (for the CLI).
- Default: same-origin
/apirequests (works withnpm --prefix root-files run appand the Electron shell). - Non-HTTP origins (e.g. opening
dist/index.htmlviafile://): falls back tohttp://127.0.0.1:4800. - Override: set
VITE_BACKEND_URL(and rebuild).
The economic calendar syncs macro events into a local SQLite cache with automatic live refresh.
Optional env vars:
THELAB_FMP_API_KEYTHELAB_ECON_SAMPLETHELAB_ECON_LIVE_SYNC_ENABLEDTHELAB_ECON_LIVE_SYNC_INTERVAL_MSTHELAB_ECON_LIVE_SYNC_PAST_DAYSTHELAB_ECON_LIVE_SYNC_FUTURE_DAYSTHELAB_ECON_LIVE_SYNC_PROVIDER_MODE
See docs/public/economic-calendar.md for details.
Fetch full BTCUSDT M1 history from Binance USDT-M into SQLite and create meta files:
npm --prefix server run import:binance:m1This stores M1 in server/db/market.db and makes M5/M15/H1/H4/D1 available via derived windows.
npm install --prefix desktop
npm run build --prefix root-files
npm run dev --prefix desktopSee desktop/README.md and docs/private/core/desktop-shell.md.
The UI supports local-first fonts (not committed by default).
- Suisse Int'l (default UI font when present):
- Copy files into:
public/assets/fonts/suisse-intl/ - Expected filenames (any of:
.woff2/.woff/.otf/.ttf):SuisseIntl-Regular.*(400)SuisseIntl-Medium.*(500)SuisseIntl-SemiBold.*(600)
- Copy files into:
- SF Pro (optional alternative):
- Copy files into:
public/assets/fonts/sf-pro/ - Source (not bundled): https://github.com/sahibjotsaggu/San-Francisco-Pro-Fonts (check licensing before distributing)
- Expected filenames:
SF-Pro-Text-Regular.*(400)SF-Pro-Text-Medium.*(500)SF-Pro-Text-Semibold.*(600)
- Copy files into:
If fonts are missing, the app falls back to the system UI font stack without console errors.
The backend resolves Python in the following order:
THELAB_PYTHON_PATH(if set)- Workspace-local venv (
.venvor.thelab/venvat repo root) pythonon PATH
Default indicator timeout: 10s (override via THELAB_INDICATOR_TIMEOUT_MS, in ms).
Recommended setup (repo-root venv):
python -m venv .venv
.\.venv\Scripts\activate # Windows (PowerShell)
pip install -r server/indicator_runner/requirements.txtFull docs:
- Public (exposed in the app):
docs/public/indicators.mddocs/public/plot-api-v1.mddocs/public/manifest.mddocs/public/economic-calendar.md- Private (engineering):
docs/private/indicators/indicator-api.mddocs/private/indicators/plot-api-v1.mddocs/private/indicators/manifest-api.md
Inside the app:
- Documentation view (Docs Explorer)
In the repo:
docs/architecture/(LLM-friendly architecture index + deep dives)docs/public/(public docs, exposed in the app)docs/private/(engineering docs)architecture.md(top-level architecture index)ROADMAP.md(product roadmap)