How abdulrahman-m-code/finsight_ai works
FinSight AI is an unfinished financial-planning application: users register, enter household finances, debts, goals, and investment-risk information, then view portfolio, debt, and goal recommendations. The frontend also exposes portfolio analytics, settings, and successive-value modeling; a backend worker handles background advice and portfolio rebalancing. The graph follows documented routes and source-index references. Several frontend-to-backend endpoint details and unsampled route implementations are not shown, so those connections are omitted rather than inferred.
Main entry points: worker.py Background task worker · financial_data.py Financial data routes · App.tsx Application routes · main.py FastAPI application
Components 26
Frontend experience
- Application routes
frontend/src/App.tsx - Financial questionnaire
frontend/src/Pages/MultiStepContext.tsx - Goals advice view
frontend/src/Pages/GoalsAdvice.tsx - Portfolio analytics
frontend/src/Pages/PortfolioAnalytics.tsx - Debt advice view
frontend/src/Pages/SuccessiveValueFormulaModeling.tsx - User settings
frontend/src/Pages/SettingsPage.tsx - Signup and login
frontend/src/Pages/Signup.tsx
Identity and API
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/routes/auth.py
Financial planning
- Financial data routes
backend/app/routes/financial_data.py - Goal advice routes
backend/app/routes/get_goals_ui_data.py - Debt advice routes
backend/app/routes/get_debts_advice_data.py - Portfolio advice routes
backend/app/routes/get_portfolio_advice_ui_data.py - Portfolio construction
backend/app/core/finance/portfolio_construction.py - Goals advisor
backend/app/core/finance/goals_advisor.py - Successive value model
backend/app/core/finance/successive_value_modeling.py
Persistence
- Relational database
backend/app/database.py - Financial and advice records
backend/app/models/user_financial_data.py - Portfolio records
backend/app/models/portfolio_models/portfolios.py - Debt advice records
backend/app/models/debt_models/debts_advices.py - User records
backend/app/models/registration/user.py
Background services
- Background task worker
backend/app/worker.py - Rebalancing WebSocket
backend/app/routes/rebalancing_ws.py
Other components
- User
- Market price data
- Redis pub/sub
Connections 36
- User → Application routes: uses
frontend/src/App.tsx - Application routes → Signup and login: routes to
frontend/src/App.tsx - Application routes → Financial questionnaire: routes to
frontend/src/App.tsx - Application routes → Goals advice view: routes to
frontend/src/App.tsx - Application routes → Portfolio analytics: routes to
frontend/src/App.tsx - Application routes → Debt advice view: routes to
frontend/src/App.tsx - Application routes → User settings: routes to
frontend/src/App.tsx - User → Financial questionnaire: enters finances
frontend/src/Pages/MultiStepContext.tsx - FastAPI application → Authentication routes: registers
backend/app/main.py - FastAPI application → Financial data routes: registers
backend/app/main.py - FastAPI application → Goal advice routes: registers
backend/app/main.py - FastAPI application → Debt advice routes: registers
backend/app/main.py - FastAPI application → Portfolio advice routes: registers
backend/app/main.py - Authentication routes → User records: queries and updates
backend/app/routes/auth.py - Authentication routes → Relational database: opens session
backend/app/routes/auth.py - Financial data routes → Portfolio construction: invokes
backend/app/routes/financial_data.py - Financial data routes → Goals advisor: invokes
backend/app/routes/financial_data.py - Financial data routes → Successive value model: invokes
backend/app/routes/financial_data.py - Financial data routes → Financial and advice records: reads and writes
backend/app/routes/financial_data.py - Financial data routes → Portfolio records: reads and writes
backend/app/routes/financial_data.py - Financial data routes → Debt advice records: reads and writes
backend/app/routes/financial_data.py - Financial data routes → Background task worker: dispatches tasks
backend/app/routes/financial_data.py - Background task worker → Portfolio construction: invokes
backend/app/worker.py - Background task worker → Goals advisor: invokes
backend/app/worker.py - Background task worker → Successive value model: invokes
backend/app/worker.py - Background task worker → Financial and advice records: persists
backend/app/worker.py - Background task worker → Portfolio records: reads and writes
backend/app/worker.py - Background task worker → Debt advice records: persists
backend/app/worker.py - Background task worker → Relational database: opens sessions
backend/app/worker.py - Background task worker → Market price data: requests prices
backend/app/worker.py - Background task worker → Redis pub/sub: publishes updates
backend/app/worker.py - Rebalancing WebSocket → Background task worker: uses manager
- Financial and advice records → Relational database: maps to
backend/app/models/user_financial_data.py - Portfolio records → Relational database: maps to
backend/app/models/portfolio_models/portfolios.py - Debt advice records → Relational database: maps to
backend/app/models/debt_models/debts_advices.py - User records → Relational database: maps to
backend/app/models/registration/user.py