Current Version: v2.0 Web App (Phases 1-5 Complete)
Progress: 71.9% | 5.75/8 phases complete
Status: β
MVP READY FOR DEPLOYMENT
- β Phase 0: Foundation & Analysis (100%)
- β Phase 1: Infrastructure Setup (100%)
- β Phase 2: Testing Infrastructure (100%)
- β Phase 3: Authentication & User Management (100%)
- β Phase 4: ML Backend Migration (100%)
- β Phase 5: Frontend Development MVP (100%)
- π Phase 6: Deployment & Monitoring (75%)
- β³ Phase 7: Data Migration (0%)
- β³ Phase 8: Launch (0%)
- β System Architecture Documentation - Complete flowchart with file references
- β Interactive HTML Visualization - Visual architecture explorer
- β Enhanced API Documentation - 30+ endpoints documented
- β Communication Flow Diagrams - Frontend β Backend flows
- β File Structure Mapping - Complete file organization guide
- LSTM Neural Networks - Multi-timeframe stock predictions
- Outlier Detection - 3 strategies (scalp, swing, long-term)
- Sentiment Analysis - Real-time news sentiment scoring
- Technical Analysis - 20+ indicators and metrics
- Stock Forecasting - 30-day predictions with confidence bands
- Outlier Visualization - Scatter plots for market anomalies
- News Aggregation - Real-time market news and analysis
- Performance Metrics - ROI, Sharpe ratio, volatility analysis
- Google OAuth - Secure authentication
- User Dashboards - Personalized stock tracking
- Watchlists - Save favorite tickers
- Alerts - Price and prediction notifications
- Auto-refresh - Real-time data updates (5-min intervals)
- Dark Mode - CLI-inspired mysterious theme
- Custom Charts - SVG-based prediction & scatter plots
- Mobile Responsive - Works on all devices
- Toast Notifications - Real-time user feedback
ββββββββββββββββββββββββββββββββββββββββββββββ
β Next.js Frontend β
β - 8+ pages (login, dashboard, analyze) β
β - 30+ components β
β - Custom SVG charts β
β - Port: 3000 β
ββββββββββββββββββββββββββββββββββββββββββββββ
β
β REST API (30+ endpoints)
β WebSocket (HFT trading)
β
ββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend β
β - ML predictions (LSTM) β
β - Outlier detection β
β - News & sentiment β
β - User management β
β - HFT trading engine β
β - Portfolio management β
β - Port: 8000 β
ββββββββββββββββββββββββββββββββββββββββββββββ
β
β
ββββββββββββββββββββββββββββββββββββββββββββββ
β SQLite Database β
β - User data β
β - Predictions β
β - Market data cache β
β - Performance metrics β
ββββββββββββββββββββββββββββββββββββββββββββββ
π For detailed architecture documentation with file references and communication flows, see:
- SYSTEM_ARCHITECTURE_FLOWCHART.md - Complete architecture guide
- SYSTEM_ARCHITECTURE_FLOWCHART.html - Interactive HTML visualization
- Python 3.12+
- Node.js 20+
- pnpm 9+
- Google OAuth credentials
git clone https://github.com/yourusername/billions.git
cd billions# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r api/requirements.txt
pip install -r api/requirements-dev.txt
# Start backend
python -m uvicorn api.main:app --reload
# Backend runs at http://localhost:8000cd web
# Install dependencies
pnpm install
# Setup environment
cp .env.example .env.local
# Edit .env.local with your Google OAuth credentials
# Start frontend
pnpm dev
# Frontend runs at http://localhost:3000See GOOGLE_OAUTH_SETUP.md for detailed instructions.
# Backend tests (pytest)
pytest # Run all backend tests
pytest --cov # With coverage report
# Frontend tests (Vitest)
cd web
pnpm test # Run component tests
pnpm test:watch # Watch mode
# E2E tests (Playwright)
cd web
pnpm test:e2e # Run E2E tests
pnpm test:e2e:ui # Interactive UI modeTest Statistics:
- 89 total tests β
- Backend: 57 pytest tests (85% coverage)
- Frontend: 20 component tests
- E2E: 12 Playwright tests
| Document | Description |
|---|---|
| PLAN.md | Complete project roadmap (602 lines) |
| SYSTEM_ARCHITECTURE_FLOWCHART.md | NEW - Complete system architecture with file references |
| SYSTEM_ARCHITECTURE_FLOWCHART.html | NEW - Interactive HTML flowchart visualization |
| CHANGELOG.md | Version history and changes |
| FAQ.md | Frequently asked questions |
| CONTRIBUTING.md | Contribution guidelines |
| API_TESTING_RESULTS.md | API endpoint testing results |
- Framework: Next.js 15.5.4 (App Router)
- Language: TypeScript 5.9
- Styling: Tailwind CSS v4
- Components: shadcn/ui
- Auth: NextAuth.js
- Testing: Vitest + Playwright
- Framework: FastAPI 0.118
- Language: Python 3.12
- ORM: SQLAlchemy 2.0
- ML: PyTorch 2.4, TensorFlow 2.19
- Testing: pytest 8.4
- Coverage: 85%
- Database: SQLite (MVP), PostgreSQL (future)
- CI/CD: GitHub Actions
- Frontend Deploy: Vercel (configured)
- Backend Deploy: Railway/Render (configured)
- Monitoring: Sentry (ready to integrate)
GET /api/v1/predictions/{ticker}- Get ML predictionsGET /api/v1/predictions/info/{ticker}- Get ticker infoGET /api/v1/predictions/search- Search tickers
GET /api/v1/market/outliers/{strategy}- Get outlier stocksGET /api/v1/market/performance/{strategy}- Get performance metricsGET /api/v1/{ticker}/historical- Historical price data
GET /api/v1/outliers/{strategy}- Get outlier dataGET /api/v1/outliers/strategies- List available strategiesPOST /api/v1/outliers/{strategy}/refresh- Refresh outlier cache
GET /api/v1/news/{ticker}- Get ticker news with sentimentGET /api/v1/nasdaq-news/latest- Latest NASDAQ newsGET /api/v1/nasdaq-news/urgent- Urgent news alerts
GET /api/v1/trading/status- Trading account statusPOST /api/v1/trading/execute- Execute tradeGET /api/v1/trading/positions- Current positionsPOST /api/v1/trading/quote/{symbol}- Real-time quoteGET /api/v1/trading/orders- Order history
GET /api/v1/hft/status- HFT engine statusPOST /api/v1/hft/start- Start HFT enginePOST /api/v1/hft/stop- Stop HFT enginePOST /api/v1/hft/orders- Submit HFT orderGET /api/v1/hft/performance- Performance metrics
POST /api/v1/portfolio/calculate-metrics- Calculate portfolio metricsGET /api/v1/portfolio/risk-analysis/{ticker}- Risk analysisPOST /api/v1/portfolio/calculate-allocation- Optimal allocation
GET /api/v1/valuation/{ticker}- Stock valuationGET /api/v1/valuation/{ticker}/fair-value- Black-Scholes fair value
POST /api/v1/users/- Create userGET /api/v1/users/{user_id}- Get user profilePUT /api/v1/users/{user_id}/preferences- Update preferencesGET /api/v1/users/{user_id}/watchlist- Get watchlistPOST /api/v1/users/{user_id}/watchlist- Add to watchlist
POST /api/v1/behavioral/rationale- Add trade rationaleGET /api/v1/behavioral/insights- Behavioral insightsGET /api/v1/behavioral/performance-analysis- Performance analysis
GET /api/v1/capitulation/screen- Screen for capitulationGET /api/v1/capitulation/analyze/{symbol}- Analyze stock
π See SYSTEM_ARCHITECTURE_FLOWCHART.md for detailed endpoint documentation with file references.
Billions/
βββ web/ # Next.js Frontend
β βββ app/ # Pages (App Router)
β β βββ login/ # Authentication
β β βββ dashboard/ # User dashboard
β β βββ analyze/ # Stock analysis
β β βββ outliers/ # Outlier detection
β βββ components/ # UI components
β β βββ charts/ # Custom SVG charts
β β βββ ui/ # shadcn/ui components
β β βββ ...
β βββ hooks/ # Custom React hooks
β βββ lib/ # API client & utilities
β βββ __tests__/ # Component tests (20)
β βββ e2e/ # E2E tests (12)
β
βββ api/ # FastAPI Backend
β βββ routers/ # API routes
β β βββ predictions.py
β β βββ outliers.py
β β βββ news.py
β β βββ users.py
β βββ services/ # Business logic
β βββ tests/ # Backend tests (57)
β βββ main.py # FastAPI app
β
βββ db/ # Database
β βββ models.py # SQLAlchemy models
β βββ models_auth.py # User models
β
βββ funda/ # ML Models (legacy)
β βββ SPS.py # News & sentiment
β βββ train_lstm_model.py
β βββ outlier_engine.py
β
βββ .github/
β βββ workflows/ # CI/CD
β βββ test.yml # Test pipeline
β βββ lint.yml # Linting
β βββ deploy.yml # Deployment
β
βββ vercel.json # Vercel config
βββ railway.json # Railway config
βββ render.yaml # Render config
βββ docker-compose.yml # Dev environment
- Files Created: 200+ files
- Lines of Code: 10,000+ lines
- Documentation: 8,000+ lines
- API Endpoints: 30+ endpoints
- Frontend Pages: 8+ pages
- Components: 30+ components
- Backend Routers: 13 routers
- Backend Services: 12 services
- Tests: 89 tests passing
- Test Coverage: 85% (backend)
- Architecture Docs: Complete flowchart with file references
The application is ready to deploy! Configuration files are in place for:
- Frontend (Vercel) -
vercel.jsonconfigured - Backend (Railway or Render) -
railway.json/render.yamlconfigured - CI/CD (GitHub Actions) - Automated testing & deployment
To deploy, follow the step-by-step guide in DEPLOYMENT_GUIDE.md.
- Google OAuth - Secure authentication via NextAuth.js
- JWT Sessions - Stateless authentication
- CORS Protection - Configured for production
- Environment Variables - Secrets management
- Rate Limiting - API throttling (future)
- SQL Injection Protection - SQLAlchemy parameterized queries
See CONTRIBUTING.md for development guidelines.
See LICENSE for details.
For questions or issues:
- Check the FAQ.md
- Review DEVELOPMENT.md
- Open a GitHub issue
Built with modern best practices:
- Test-Driven Development (TDD)
- Continuous Integration/Deployment (CI/CD)
- Comprehensive documentation
- Clean architecture
