How sayak2103/trademl works
TradeML presents a trading interface where users choose a stock, capital, and duration, then view live trading updates and investment status. The React app also includes a marketing homepage and demo. The documented runtime is split between a Node.js WebSocket backend and a Flask model-inference server; the repository also contains reinforcement-learning training code and a stock-trading environment. The available excerpts show frontend routing, component composition, and socket connection, but not the backend or Flask request handlers, so those links are limited to documented or unverified relationships.
Main entry points: HomePage.jsx Home page · App.jsx App routes · utils.py Market data and training · TradeArena.jsx Trade arena
Components 19
React application
- App routes
frontend/src/App.jsx - Demo video
frontend/src/components/Demo.jsx - Trade arena
frontend/src/components/TradeArena.jsx - Trade parameters
frontend/src/components/QueryForm.jsx - Live trade view
frontend/src/components/TradeWindow.jsx
Trading services
- Node trading server
main_server/app.js - Flask inference server
flask_Server/app.py
Reinforcement learning
- Market data and training
rl_modules/utils.py - DQN policy trainer
rl_modules/my_packages/policy_train.py - Stock environment
rl_modules/my_packages/environment.py
Homepage content
- Home page
frontend/src/components/HomePage.jsx - Navigation
frontend/src/components/Navbar.jsx - Features
frontend/src/components/FeaturesSection.jsx - How it works
frontend/src/components/HowItWorksSection.jsx - Testimonials
frontend/src/components/TestimonialsSection.jsx - Call to action
frontend/src/components/CallToActionSection.jsx - Footer
frontend/src/components/Footer.jsx
Other components
- Investor
- Alpaca market data
Connections 19
- Investor → App routes: opens app
README.md - App routes → Home page: routes to
frontend/src/App.jsx - App routes → Trade arena: routes to
frontend/src/App.jsx - App routes → Demo video: routes to
frontend/src/App.jsx - Home page → Navigation: renders
frontend/src/components/HomePage.jsx - Home page → Features: renders
frontend/src/components/HomePage.jsx - Home page → How it works: renders
frontend/src/components/HomePage.jsx - Home page → Testimonials: renders
frontend/src/components/HomePage.jsx - Home page → Call to action: renders
frontend/src/components/HomePage.jsx - Home page → Footer: renders
frontend/src/components/HomePage.jsx - Trade arena → Trade parameters: renders
frontend/src/components/TradeArena.jsx - Trade arena → Live trade view: renders
frontend/src/components/TradeArena.jsx - Live trade view → Node trading server: opens socket
frontend/src/components/TradeWindow.jsx - Node trading server → Flask inference server: requests inference
- Market data and training → Alpaca market data: fetches bars
rl_modules/utils.py - Market data and training → Stock environment: sets data
rl_modules/utils.py - Market data and training → DQN policy trainer: trains policy
rl_modules/utils.py - DQN policy trainer → Stock environment: steps environment
rl_modules/my_packages/policy_train.py - Flask inference server → DQN policy trainer: serves trained model