How rajput-devyansh/wealth-copilot works
Wealth Copilot is a digital wealth-management app: customers select a demo profile or create a persona, then explore financial dashboards, goals, insights, profile settings, and an AI copilot. The backend serves those domains from local JSON-backed state, computes financial metrics and recommendations, and offers text and streaming voice AI. The graph preserves the documented multilingual voice, risk-profiling, proactive-insight, and adaptive-theme capabilities. Some page-to-API wiring is not shown in the sampled source, so those relationships are omitted.
Main entry points: App.tsx App and routing · database.ts State persistence · server.ts Express server · financials.ts Financial calculations
Components 24
Customer experience
- App and routing
frontend/src/App.tsx - Demo login
frontend/src/pages/Login.tsx - Persona setup
frontend/src/pages/CreatePersona.tsx - App layout
frontend/src/components/AppLayout.tsx - Dashboard view
frontend/src/pages/Dashboard.tsx - Goals view
frontend/src/pages/Goals.tsx - Insights view
frontend/src/pages/Insights.tsx - Profile settings
frontend/src/pages/Profile.tsx - Copilot interface
frontend/src/pages/Copilot.tsx - Voice avatar
frontend/src/components/Avatar.tsx
Financial planning
- Dashboard routes
backend/src/routes/dashboard.ts - Goals routes
backend/src/routes/goals.ts - Portfolio routes
backend/src/routes/portfolio.ts - Profile routes
backend/src/routes/profile.ts - Financial calculations
backend/src/services/financials.ts
AI assistance
- Copilot routes
backend/src/routes/copilot.ts - Voice streaming
backend/src/websocket/voice.ts - Gemini text service
backend/src/services/gemini.ts
Backend platform
- Authentication routes
backend/src/routes/auth.ts - Express server
backend/src/server.ts - State persistence
backend/src/db/database.ts - Local JSON state
backend/src/db/db_state.json
Other components
- Customer
- Google Gemini
Connections 34
- Customer → App and routing: uses
- App and routing → Demo login: renders
frontend/src/App.tsx - App and routing → Persona setup: renders
frontend/src/App.tsx - App and routing → App layout: renders
frontend/src/App.tsx - App and routing → Dashboard view: renders
frontend/src/App.tsx - App and routing → Goals view: renders
frontend/src/App.tsx - App and routing → Insights view: renders
frontend/src/App.tsx - App and routing → Profile settings: renders
frontend/src/App.tsx - App and routing → Copilot interface: renders
frontend/src/App.tsx - Copilot interface → Voice avatar: uses
frontend/src/pages/Copilot.tsx - App and routing → Authentication routes: requests demo login
frontend/src/App.tsx - Express server → Authentication routes: mounts
backend/src/server.ts - Express server → Profile routes: mounts
backend/src/server.ts - Express server → Goals routes: mounts
backend/src/server.ts - Express server → Dashboard routes: mounts
backend/src/server.ts - Express server → Copilot routes: mounts
backend/src/server.ts - Express server → Portfolio routes: mounts
backend/src/server.ts - Express server → Voice streaming: sets up
backend/src/server.ts - Authentication routes → State persistence: reads and reseeds
backend/src/routes/auth.ts - Profile routes → State persistence: uses state
backend/src/routes/profile.ts - Goals routes → State persistence: uses state
backend/src/routes/goals.ts - Dashboard routes → State persistence: reads state
backend/src/routes/dashboard.ts - Dashboard routes → Financial calculations: computes metrics
backend/src/routes/dashboard.ts - Portfolio routes → State persistence: uses state
backend/src/routes/portfolio.ts - Portfolio routes → Financial calculations: computes metrics
backend/src/routes/portfolio.ts - Copilot routes → State persistence: reads user context
backend/src/routes/copilot.ts - Copilot routes → Financial calculations: computes recommendations
backend/src/routes/copilot.ts - Copilot routes → Gemini text service: generates response
backend/src/routes/copilot.ts - Voice streaming → State persistence: reads user state
backend/src/websocket/voice.ts - Voice streaming → Financial calculations: computes context
backend/src/websocket/voice.ts - Voice streaming → Google Gemini: streams audio session
backend/src/websocket/voice.ts - Gemini text service → Google Gemini: calls model
backend/src/services/gemini.ts - Financial calculations → State persistence: reads financial data
backend/src/services/financials.ts - State persistence → Local JSON state: loads and saves
backend/src/db/database.ts