How u240476/trading-fullstack works
This is a full-stack portfolio selection and analysis application, extended with a Spring Boot microservice. The intended user flow is to explore prices and portfolio/optimization visualizations in the frontend; the Express API exposes analysis endpoints and forwards requests to the Java service. Account registration, login, and deletion form a separate authenticated workflow. The Java tree indicates distinct market-data, portfolio, optimization, and calculation subsystems, but their internal call relationships were not sampled. Frontend-to-API wiring is likewise not evidenced in the excerpts, so those links are marked unverified.
Main entry points: server.js API server · controller Analysis endpoints · authRoute.js Auth routes · service Portfolio services
Components 19
User interface
- Portfolio views
frontend/Portfolio.js - Price views
frontend/Prices.js - Optimization views
frontend/Optimisation.js - Graph views
frontend/MasterGraph.js
Express API
- API server
backend/server.js - Analysis routes
backend/routes - Master graph
backend/routes/MasterGraphRoute.js
Accounts
- Auth routes
backend/authRoutes/authRoute.js - Account operations
backend/authControllers/authController.js - Token validation
backend/middleware/authMiddleware.js - Account records
backend/models/accountModel.js - SQLite accounts
backend/config/db.js
Portfolio service
- Analysis endpoints
java-service/src/main/java/com/example/controller - Portfolio services
java-service/src/main/java/com/example/service - Portfolio optimization
java-service/src/main/java/com/example/optimisation - Risk and return math
java-service/src/main/java/com/example/math - Stock data client
java-service/src/main/java/com/example/client - Stock cache
java-service/src/main/java/com/example/cache
Other components
- Investor
Connections 18
- Investor → Portfolio views: explores
README.md - Portfolio views → API server: requests analysis
- Price views → API server: requests prices
- Optimization views → API server: requests optimization
- Graph views → API server: requests graphs
- API server → Analysis routes: mounts
backend/server.js - API server → Auth routes: mounts
backend/server.js - Analysis routes → Analysis endpoints: forwards requests
backend/routes/PortfolioStandardDeviationRoute.js - Master graph → Analysis endpoints: fetches graph data
backend/routes/MasterGraphRoute.js - Auth routes → Account operations: dispatches
backend/authRoutes/authRoute.js - Auth routes → Token validation: validates deletion
backend/authRoutes/authRoute.js - Account operations → Account records: reads and changes
backend/authControllers/authController.js - Account records → SQLite accounts: queries
backend/models/accountModel.js - Analysis endpoints → Portfolio services: delegates
- Portfolio services → Portfolio optimization: uses
- Portfolio services → Risk and return math: uses
- Analysis endpoints → Stock data client: fetches prices
- Stock data client → Stock cache: uses cache