How jordan73737/stock-dashboard works
Stock Dashboard is a full-stack stock-investment simulator. Users register or sign in, browse and search stocks, manage favourites, simulate trades against a mock balance, and review portfolio value history. React routes and Redux state coordinate the UI; an Express API handles authentication and portfolio operations, with PostgreSQL persistence and Finnhub quotes. Password recovery is a separate email-and-token capability. Some component and server code was only sampled partially, so uncertain integrations are omitted or marked unverified.
Main entry points: App.jsx Routes and shell · server.js Express API · stocksSlice.js Stocks state · auth.js Recovery routes
Components 22
Web client
- React bootstrap
src/main.jsx - Routes and shell
src/App.jsx - Sign in
src/components/Login.jsx - Registration
src/components/Register.jsx - Password recovery
src/components/RecoverPassword.jsx - Password reset
src/components/ResetPassword.jsx - Navigation
src/components/Navbar.jsx - Auth state
src/slices/authSlice.js - Redux store
src/store.js
Stocks and portfolio
- Popular stocks
src/components/Home.jsx - Stock dashboard
src/components/Dashboard.jsx - Stocks state
src/slices/stocksSlice.js - Portfolio profile
src/components/Profile.jsx - Trade panel
src/components/TradeSidebar.jsx - Value history chart
src/components/ValueHistoryChart.jsx
API and persistence
- Express API
backend/server.js - Recovery routes
backend/routes/auth.js - User DB helper
backend/db/users.js
External services
- PostgreSQL
- Finnhub market data
- SendGrid email
Other components
- Investor
Connections 36
- Investor → React bootstrap: uses
README.md - React bootstrap → Redux store: provides state
src/main.jsx - React bootstrap → Routes and shell: renders
src/main.jsx - Routes and shell → Navigation: renders
src/App.jsx - Routes and shell → Sign in: routes to
src/App.jsx - Routes and shell → Registration: routes to
src/App.jsx - Routes and shell → Popular stocks: routes to
src/App.jsx - Routes and shell → Stock dashboard: routes to
src/App.jsx - Routes and shell → Portfolio profile: routes to
src/App.jsx - Routes and shell → Password recovery: routes to
src/App.jsx - Routes and shell → Password reset: routes to
src/App.jsx - Redux store → Auth state: uses reducer
src/store.js - Redux store → Stocks state: uses reducer
src/store.js - Sign in → Auth state: dispatches auth
src/components/Login.jsx - Registration → Auth state: dispatches auth
src/components/Register.jsx - Navigation → Auth state: reads auth
src/components/Navbar.jsx - Auth state → Express API: calls auth API
src/slices/authSlice.js - Password recovery → Recovery routes: requests reset
- Password reset → Recovery routes: submits password
- Popular stocks → Express API: fetches stocks
src/components/Home.jsx - Popular stocks → Stocks state: dispatches favorites
src/components/Home.jsx - Popular stocks → Trade panel: opens panel
src/components/Home.jsx - Stock dashboard → Stocks state: dispatches favorites
src/components/Dashboard.jsx - Stock dashboard → Finnhub market data: searches symbols
src/components/Dashboard.jsx - Stocks state → Express API: reads favorites
src/slices/stocksSlice.js - Stocks state → Finnhub market data: fetches quotes
src/slices/stocksSlice.js - Portfolio profile → Express API: reads portfolio
src/components/Profile.jsx - Portfolio profile → Trade panel: opens panel
src/components/Profile.jsx - Portfolio profile → Value history chart: renders chart
src/components/Profile.jsx - Trade panel → Express API: submits trades
src/components/TradeSidebar.jsx - Express API → Recovery routes: mounts routes
backend/server.js - Recovery routes → User DB helper: looks up users
backend/routes/auth.js - Express API → PostgreSQL: queries portfolio data
backend/server.js - User DB helper → PostgreSQL: reads and updates
backend/db/users.js - Express API → Finnhub market data: fetches quotes
backend/server.js - Recovery routes → SendGrid email: sends reset email
backend/routes/auth.js