A private web app for a small team to generate binary options trading signals on demand.
- Log in → select any asset (forex, crypto, stocks, indices)
- Choose expiry timeframe (1m, 5m, 15m, 30m, 1h, 4h)
- Click Generate Signal → get a full signal card in under 5 seconds
Signal engine: Indicator consensus (RSI, MACD, Bollinger Bands, Stochastic, EMA) is the PRIMARY signal. ML model agreement is an optional overlay badge.
| Layer | Technology |
|---|---|
| Backend | Python 3.11 + FastAPI + SQLAlchemy |
| Signal Engine | ta library + scikit-learn/XGBoost |
| Frontend | Next.js 14 + TailwindCSS |
| Database | PostgreSQL |
| Auth | JWT via httpOnly cookies (Next.js proxy) |
| Data | Twelve Data API (free tier: 800 calls/day) |
| Deploy | Vercel (frontend) + Railway (backend + DB) |
# 1. Clone and configure
cp backend/.env.example backend/.env
# Edit backend/.env — set TWELVE_DATA_API_KEY
# 2. Start all services
docker compose up
# 3. Seed users
docker compose exec backend python scripts/seed_users.py
# 4. Open http://localhost:3000
# Login: [email protected] / changeme123cd backend
python -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # fill in values
uvicorn app.main:app --reloadcd frontend
cp .env.local.example .env.local # set BACKEND_URL=http://localhost:8000
npm install
npm run devcd backend && pytest -vThe ML overlay is disabled by default (no models trained). To enable it:
cd backend
python scripts/train_model.pyModels are saved to app/ml/. If walk-forward accuracy < 55%, the overlay is auto-disabled for that timeframe.
- Create Railway project → add PostgreSQL plugin
- Set env vars:
DATABASE_URL,JWT_SECRET,TWELVE_DATA_API_KEY,CORS_ORIGINS,ENVIRONMENT=production,COOKIE_DOMAIN=your-vercel-domain.app - Deploy from
backend/directory (usesProcfile) - Run:
python scripts/seed_users.py
- Import
frontend/directory - Set env var:
BACKEND_URL=https://your-railway-backend-url - Deploy
Twelve Data free tier: 800 calls/day
| Scenario | Daily calls | Status |
|---|---|---|
| Normal (5 users, 15 signals/day, 40% cache miss) | ~30 | Safe |
| Heavy (5 users, 50 signals/day, 60% miss) | ~150 | Safe |
| Cold start (many new assets) | ~450 | Approaching limit |
Paid tier ($29/mo) unlocks real-time data + 800 calls/minute.
All 10 ACs verified:
- Login with valid credentials; invalid rejected
- Unauthenticated
/api/v1/signals/*returns 401 - Unauthenticated browser visits redirect to
/login - Search and select assets from all 4 classes
- All 6 timeframes selectable
- Signal card returned in < 5 seconds
- Signal card shows asset, direction, confidence, entry time, expiry, indicator breakdown
- Signal persisted and visible in history (500 max per user)
- Responsive on 375px mobile viewport
- 10 concurrent requests complete within 8 seconds