How sid-hub-554/stock-trading-platform works
This is an educational, Zerodha-inspired stock-trading platform split into a public website, a trading-style dashboard, and an Express/Mongoose backend. The visible user journey is public pages and entry points, then dashboard views for watchlists, holdings, positions, orders, and portfolio information; the backend exposes holdings/positions reads and order creation. The dashboard’s buy action is managed through shared context. Backend endpoint-to-model wiring is visible, but the excerpts do not establish dashboard-to-API calls, so that connection is not asserted.
Main entry points: src/index.js Web router · backend/index.js API server · WatchList.js Watchlist · HomePage.js Home page
Components 32
Public website
- Web router
frontend/src/index.js - Home page
frontend/src/landing_page/home/HomePage.js - About page
frontend/src/landing_page/about/AboutPage.js - Products page
frontend/src/landing_page/products/ProductsPage.js - Pricing page
frontend/src/landing_page/pricing/PricingPage.js - Support page
frontend/src/landing_page/support/SupportPage.js - Site navigation
frontend/src/landing_page/Navbar.js - Site footer
frontend/src/landing_page/Footer.js - Support topics
frontend/src/landing_page/support/CreateTicket.js - Brokerage info
frontend/src/landing_page/pricing/Brokerage.js
Trading dashboard
- Dashboard entry
dashboard/src/index.js - Dashboard shell
dashboard/src/components/Home.js - Dashboard views
dashboard/src/components/Dashboard.js - Watchlist
dashboard/src/components/WatchList.js - Holdings view
dashboard/src/components/Holdings.js - Positions view
dashboard/src/components/Positions.js - Orders view
dashboard/src/components/Orders.js - Portfolio summaries
dashboard/src/components/Summary.js - Funds view
dashboard/src/components/Funds.js - Sample market data
dashboard/src/data/data.js - Portfolio charts
dashboard/src/components/DoughnoutChart.js - Buy action context
dashboard/src/components/GeneralContext.js - Buy action window
dashboard/src/components/BuyActionWindow.js
Backend API
- API server
backend/index.js - Holdings model
backend/model/HoldingsModel.js - Positions model
backend/model/PositionsModel.js - Orders model
backend/model/OrdersModel.js - Holdings schema
backend/schemas/HoldingsSchema.js - Positions schema
backend/schemas/PositionsSchema.js - Orders schema
backend/schemas/OrdersSchema.js
Other components
- Visitor
- MongoDB
Connections 31
- Visitor → Web router: opens site
frontend/src/index.js - Web router → Home page: routes to
frontend/src/index.js - Web router → About page: routes to
frontend/src/index.js - Web router → Products page: routes to
frontend/src/index.js - Web router → Pricing page: routes to
frontend/src/index.js - Web router → Support page: routes to
frontend/src/index.js - Web router → Site navigation: renders
frontend/src/index.js - Web router → Site footer: renders
frontend/src/index.js - Home page → Site navigation: renders
frontend/src/landing_page/home/HomePage.js - Home page → Site footer: renders
frontend/src/landing_page/home/HomePage.js - Pricing page → Brokerage info: renders
frontend/src/landing_page/pricing/PricingPage.js - Support page → Support topics: renders
frontend/src/landing_page/support/SupportPage.js - Visitor → Dashboard entry: opens dashboard
dashboard/src/index.js - Dashboard entry → Dashboard shell: routes to
dashboard/src/index.js - Dashboard shell → Dashboard views: renders
dashboard/src/components/Home.js - Watchlist → Sample market data: reads data
dashboard/src/components/WatchList.js - Watchlist → Buy action context: opens action
dashboard/src/components/WatchList.js - Watchlist → Portfolio charts: renders
dashboard/src/components/WatchList.js - Holdings view → Sample market data: reads data
dashboard/src/components/Holdings.js - Holdings view → Portfolio charts: renders
dashboard/src/components/Holdings.js - Buy action context → Buy action window: shows window
dashboard/src/components/GeneralContext.js - API server → Holdings model: queries
backend/index.js - API server → Positions model: queries
backend/index.js - API server → Orders model: saves order
backend/index.js - Holdings model → Holdings schema: uses schema
backend/model/HoldingsModel.js - Positions model → Positions schema: uses schema
backend/model/PositionsModel.js - Orders model → Orders schema: uses schema
backend/model/OrdersModel.js - API server → MongoDB: connects
backend/index.js - Holdings model → MongoDB: queries records
- Positions model → MongoDB: queries records
- Orders model → MongoDB: persists order