StrangeXin/newfx

AI-assisted foreign-exchange research workspace built with React, FastAPI, PostgreSQL, and Redis

★ 0Forks 0TypeScriptGitHub ↗Compare

Project website ↗

aifastapiforexmarket-datareacttradingtypescript

README

NewFXT

NewFXT is an AI-assisted foreign-exchange research workspace. It combines a React/Vite frontend, a FastAPI backend, PostgreSQL, Redis, market-data integrations, watchlists, alerts, research workflows, and paper/backtest tools for FX-focused analysis.

Features

  • Multi-market FX workspace with quote, news, calendar, and briefing views
  • Watchlists, alerts, feedback, auth, profile, and personalized home modules
  • AI-backed analysis endpoints with template fallbacks when keys are absent
  • Trading research tools for backtests, paper trading, and alpha experiments
  • Docker Compose setup for Postgres, Redis, backend, and frontend nginx
  • Backend unit tests and browser-driven frontend/e2e checks

Tech Stack

  • Frontend: React, TypeScript, Vite, Ant Design, Zustand, i18next
  • Backend: FastAPI, SQLAlchemy async, Alembic, PostgreSQL, Redis
  • AI/data: Anthropic/OpenAI-compatible clients, Twelve Data, LightGBM, scikit-learn, Polars
  • Testing: pytest, pytest-asyncio, Playwright/Stagehand e2e scripts

Repository Layout

backend/      FastAPI app, migrations, tests, Dockerfile
frontend/     React app, Vite config, e2e scripts, Dockerfile
docs/         Product notes, runbooks, planning docs
e2e/          Shared top-level browser helpers/specs
supabase/     Supabase-related local config
wise/         Design token previews and notes

Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 20+
  • Docker and Docker Compose

Backend

cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
alembic upgrade head
uvicorn app.main:app --reload

For local development, set at least JWT_SECRET in backend/.env. External market data and LLM-backed features require their provider keys; without them, the app keeps degraded/template behavior where supported.

Frontend

cd frontend
npm install
npm run dev

The Vite app runs on http://localhost:5173 by default.

Docker Compose

cp backend/.env.example backend/.env
docker compose up --build

The compose setup starts Postgres, Redis, the backend on port 8000, and an nginx-served frontend on port 80.

Tests

cd backend
pytest
cd frontend
npm run lint
npm run build
npm run e2e:backtest

Some e2e scripts can use remote browser/LLM providers when configured in frontend/e2e/.env; otherwise the helpers are designed to fall back to local browser execution where possible.

Configuration

Use example files as templates:

  • backend/.env.example
  • frontend/e2e/.env.e2e.example

Never commit real .env files, API keys, deploy hooks, SMTP passwords, model artifacts, generated datasets, or local agent/tool caches.

Security And Data Notes

This repository is prepared for public source release, but deployment secrets must be supplied by the operator. Before publishing a fork or mirror, run a fresh secret scan and rotate any key that may have been committed historically.

The alpha research module writes generated .parquet datasets and .joblib models under backend/app/data/; those runtime artifacts are intentionally ignored by git.

Contributing

Issues and pull requests are welcome. Please read CONTRIBUTING.md before opening a change.

License

MIT. See LICENSE.

Contributors

StrangeXin

Issues