Professional trading platform combining Rust performance with Flutter cross-platform capabilities. Built for sub-100ms execution with real trading at its core.
bullshift/
โโโ flutter/ # Frontend application
โ โโโ lib/
โ โ โโโ modules/ # Core modules
โ โ โ โโโ core_trading/ # ๐ฏ REAL TRADING (Core Module)
โ โ โ โโโ trendsetter/ # Market analytics
โ โ โ โโโ bullrunnr/ # News sentiment
โ โ โ โโโ barely_managed/ # AI connector
โ โ โ โโโ paper_hands/ # Paper trading
โ โ โโโ services/ # Backend services
โ โ โโโ widgets/ # UI components
โ โโโ pubspec.yaml
โโโ rust/ # Performance-critical backend
โ โโโ src/
โ โ โโโ trading/ # ๐ฏ Real trading engine
โ โ โโโ security/ # API key management
โ โ โโโ data_stream/ # WebSocket streaming
โ โ โโโ ai_bridge/ # AI integration
โ โโโ Cargo.toml
โโโ docs/ # Documentation
BullShift consists of five integrated modules, each serving a specific trading function:
The heart of BullShift, providing live trading capabilities:
- Live Market Orders: Market, Limit, Stop, Stop-Limit orders
- Real-time Position Management: Live P&L tracking
- API Integration: Alpaca, Interactive Brokers, and more
- Sub-100ms Execution: Rust-powered order routing
- Risk Management: Position sizing, stop-loss automation
- Trading Notes: Symbol-specific note-taking with tags
- Order Execution Engine (
rust/src/trading/execution.rs) - Portfolio Management (
rust/src/trading/portfolio.rs) - API Integration Layer (
rust/src/trading/api.rs) - Real-time Data Streaming (
rust/src/data_stream/mod.rs)
High-velocity asset discovery with momentum detection:
- Momentum Scanner: Real-time momentum scoring with volume spikes
- Heat Map: Visual market heat indicators for trending assets
- Shift Alerts: Automated alerts for volume spikes and momentum shifts
- Social Sentiment Integration: Twitter/Reddit sentiment analysis
- Multi-factor Scoring: Volume, price, and social sentiment combined
- Momentum Analysis Engine (
rust/src/trendsetter/mod.rs) - Volume Spike Detection: Unusual volume pattern recognition
- Price Momentum Calculations: SMA, RSI, MACD indicators
- Social Buzz Tracking: Real-time social media sentiment
Real-time financial news with NLP sentiment analysis:
- Real-time News Feed: Multi-source news aggregation (Reuters, Bloomberg, etc.)
- Instant Sentiment Tagging: Bullish/Bearish/Neutral classification
- Market Sentiment Dashboard: Fear & Greed index, sector sentiment
- News Search: Advanced search by keywords and symbols
- Aspect-based Analysis: Revenue, earnings, growth sentiment breakdown
- News Aggregation Engine (
rust/src/bullrunnr/mod.rs) - NLP Sentiment Analyzer: VADER-based sentiment analysis
- Multi-source Integration: Alpha Vantage, News API, Twitter
- Real-time Processing: Sub-second news sentiment updates
Intelligent automation middleware for AI integration:
- AI Setup Wizard: Guided configuration for AI providers
- Multi-LLM Support: OpenAI, Anthropic, local Ollama instances
- Secure Credential Vault: Encrypted AI API key management
- Strategy Prompting: Automated trading strategy generation
- AI Bridge Architecture: LangChain integration layer
- AI Bridge Manager (
rust/src/ai_bridge/mod.rs) - LLM Connector: Multi-provider AI interface
- Strategy Generator: AI-powered trading strategy creation
- Secure Key Management: Platform-native AI credential storage
Risk-free simulation environment for strategy testing:
- Zero-risk Simulation: Real-time price action testing
- Strategy Backtesting: Historical performance analysis
- Virtual Portfolio: Paper money position management
- Performance Analytics: Win rate, P&L, risk metrics
- Advanced Charting: Professional chart analysis with indicators
- Monte Carlo Simulation: Risk analysis with multiple scenarios
- Portfolio Analytics: Detailed performance and risk metrics
- Strategy Validation: Test before real money deployment
- Paper Trading Engine (
rust/src/paper_hands/mod.rs) - Advanced Charting: Multiple chart types and technical indicators
- Performance Tracker: Detailed analytics and reporting
- Monte Carlo Engine: Statistical risk analysis
- Strategy Validator: Risk-free strategy testing
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Flutter 4.0 | Cross-platform UI |
| Core Logic | Rust | High-performance trading engine |
| Data Stream | WebSockets/gRPC | Real-time market data |
| Security | AES-256 + Platform Keychain | API key protection |
| Database | ObjectBox | Local historical data |
- AES-256 Encryption for all stored credentials
- Platform Native Storage: macOS Keychain, Linux libsecret
- Secure Memory Management in Rust backend
- Zero-Knowledge Architecture: Keys never stored in plaintext
rust/src/security/mod.rs- Rust security managerflutter/lib/services/security_manager.dart- Flutter security layer
- Setup Environment - See Development Setup
- Build Platform -
./build.shor manual build - Configure APIs - Store trading/AI credentials securely
- Start Trading - Real-time order execution & analytics
Key Features:
- ๐ฏ Live Trading - Sub-100ms order execution
- ๐ Market Analytics - Momentum detection & sentiment
- ๐ค AI Integration - Strategy generation & analysis
- ๐ฎ Paper Trading - Risk-free simulation
- ๐ฑ Cross-Platform - Desktop + mobile apps
- Live market orders (Market, Limit, Stop, Stop-Limit)
- Real-time position management & P&L tracking
- Sub-100ms execution via Rust engine
- API integration (Alpaca, Interactive Brokers)
- Risk management & trading notes
- Momentum scanner with volume spike detection
- Real-time news sentiment analysis
- Social sentiment integration (Twitter/Reddit)
- Market heat maps & shift alerts
- Multi-LLM support (OpenAI, Anthropic, Ollama)
- AI-powered trading strategy generation
- Secure credential vault
- Custom prompt management
- Zero-risk simulation environment
- Strategy backtesting & performance analytics
- Virtual portfolio management
- Monte Carlo risk analysis
- AES-256 encryption for all credentials
- Platform native storage (macOS Keychain, Linux libsecret)
- Zero-knowledge architecture
- Secure FFI memory management
- Desktop: Linux, macOS, Windows
- Mobile: iOS, Android
- Cloud sync across devices
- Touch-optimized mobile interface
- Alpaca Markets: Stocks and ETFs
- Interactive Brokers: Global markets (planned)
// Trading API trait
pub trait TradingApi {
async fn submit_order(&self, order: ApiOrderRequest) -> Result<ApiOrderResponse, String>;
async fn get_positions(&self) -> Result<Vec<ApiPosition>, String>;
async fn get_account(&self) -> Result<ApiAccount, String>;
}# Rust tests
cd rust && cargo test
# Flutter tests
cd flutter && flutter test# Rust formatting
cd rust && cargo fmt
# Flutter linting
cd flutter && flutter analyze- 5 Critical compilation errors - Code now builds
- Memory leaks in FFI trading engine
- Security vulnerabilities - AES-256 encryption implemented
- Code duplication - BaseProvider pattern created
- View refactoring - BullRunnr & PaperHands modules extracted
- Paper trading backend - Monte Carlo simulation & correlation analysis
- Dialog implementations - All 6 AI provider dialogs completed
- Test coverage - 108 new tests across 4 providers
- Performance - Rust cloning optimizations
- AI Bridge Backend: 9 TODOs for Anthropic, Ollama, Local LLM, Custom providers
- Data Streaming: Secure credential loading from storage
- Testing: Increase coverage from 25% to 80%+
- TODOs: 9 feature implementations remaining (AI Bridge backend)
- 5 Modules: Trading, Analytics, News, AI, Paper Trading
- Languages: Rust, Dart, Python
- Platforms: Linux, macOS, Windows, iOS, Android
- Status: Ready for development
- User Manual - Complete platform usage guide
- Configuration Guide - Setup trading APIs & AI providers
- Troubleshooting Guide - Common issues & solutions
- Development Setup - Environment setup & build guide
- API Reference - Rust & Flutter API documentation
- Architecture - Project structure & modules
- Contributing Guide - Contribution guidelines & standards
- Code Audit - Code audit findings & remediation
- Security Policy - Vulnerability reporting & security practices
- Changelog - Version history & release notes
- Roadmap - Feature planning & release schedule
- Security Audit - Security assessment & fixes
- Refactoring Summary - Recent improvements & changes
- ADRs - Architecture decision records
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please see our Contributing Guide for detailed guidelines.
Quick Start:
- Fork the repository
- Create feature branch
- Follow security best practices
- Add tests
- Submit pull request
Security: All contributions require security review. See Security Policy for details.
- Performance - Sub-100ms execution via Rust engine
- Security - AES-256 encryption, zero-knowledge architecture
- Intelligence - AI-powered strategies & multi-factor analysis
- Risk Management - Paper trading, position sizing, exposure monitoring
- Cross-Platform - Seamless sync across desktop + mobile
Built with โค๏ธ for the modern quantitative trader