# rajgupta0510/ravora architecture

> Architecture diagram of the GitHub repository rajgupta0510/ravora, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rajgupta0510/ravora
- Repository: https://github.com/rajgupta0510/ravora

## Overview

Ravora is an AI-assisted wealth and trading terminal: users authenticate, configure objectives and risk, then review market analysis, portfolio insights, and opportunities before paper or connected-exchange execution. The graph combines the documented dashboard journey with sampled backend services and the indexed decision-engine modules. The README documents several product capabilities whose implementation was not sampled; those are represented at directory level. Unsampled details and runtime wiring are not assumed beyond documented relationships.

Main entry points: [`src/components/dashboard`](https://github.com/rajgupta0510/ravora/tree/main/src/components/dashboard) (Dashboard workspaces), [`backend/services/MarketDataService.js`](https://github.com/rajgupta0510/ravora/blob/main/backend/services/MarketDataService.js) (Market data service), [`src/App.tsx`](https://github.com/rajgupta0510/ravora/blob/main/src/App.tsx) (Application shell), [`backend/execution/services/ExecutionService.js`](https://github.com/rajgupta0510/ravora/blob/main/backend/execution/services/ExecutionService.js) (Order execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Application shell<br/>[App.tsx]"]
  node_onboarding["Risk onboarding"]
  node_dashboard["Dashboard workspaces"]
  node_terminal["Trading terminal"]
  node_copilotui["Copilot chat<br/>[CopilotChat.tsx]"]
end

subgraph group_intelligence["Market intelligence"]
  node_marketdata["Market data service"]
  node_marketproviders["Market providers"]
  node_scan["Opportunity discovery"]
  node_decision["Opportunity scoring"]
  node_recommendations["Recommendations"]
  node_news["News services"]
end

subgraph group_wealth["Portfolio and execution"]
  node_portfolio["Portfolio workspace"]
  node_portfoliointelligence["Portfolio intelligence"]
  node_paper["Paper trading"]
  node_orders["Order execution"]
  node_risk["Risk controls<br/>[RiskManager.js]"]
  node_exchanges["Exchange integrations"]
end

subgraph group_copilot["Araiven AI"]
  node_aicontroller["AI controller<br/>[AiController.js]"]
  node_agents["Agent orchestration"]
  node_backtest["Strategy backtesting<br/>[BacktestEngine.js]"]
end

subgraph group_platform["Backend platform"]
  node_auth["Authentication<br/>[authController.js]"]
  node_backend["API application<br/>[index.js]"]
  node_database[("Supabase data client<br/>[database.js]")]
  node_notifications["Notifications"]
end

node_investor(("Investor"))

node_investor -->|"opens"| node_app
node_app -->|"authenticates through"| node_auth
node_app -->|"renders"| node_dashboard
node_dashboard -->|"configures profile"| node_onboarding
node_dashboard -->|"opens terminal"| node_terminal
node_dashboard -->|"views portfolio"| node_portfolio
node_dashboard -->|"reviews opportunities"| node_scan
node_dashboard -->|"opens copilot"| node_copilotui
node_copilotui -.->|"sends analysis request"| node_aicontroller
node_aicontroller -->|"orchestrates"| node_agents
node_agents -.->|"runs strategy analysis"| node_backtest
node_backend -->|"initializes"| node_database
node_backend -.->|"registers API routes"| node_marketdata
node_marketdata -->|"fetches market history"| node_marketproviders
node_scan -->|"uses market data"| node_marketdata
node_recommendations -->|"ranks opportunities"| node_decision
node_portfolio -->|"requests insights"| node_portfoliointelligence
node_dashboard -->|"deploys sandbox trades"| node_paper
node_dashboard -->|"submits orders"| node_orders
node_orders -->|"checks order risk"| node_risk
node_orders -.->|"routes execution"| node_exchanges
node_risk -->|"checks current price"| node_marketdata
node_risk -->|"reads risk and portfolio state"| node_database
node_dashboard -.->|"reviews market context"| node_news
node_dashboard -->|"configures alerts"| node_notifications

click node_app "https://github.com/rajgupta0510/ravora/blob/main/src/App.tsx"
click node_onboarding "https://github.com/rajgupta0510/ravora/blob/main/src/components/dashboard/OnboardingWizard.tsx"
click node_dashboard "https://github.com/rajgupta0510/ravora/tree/main/src/components/dashboard"
click node_terminal "https://github.com/rajgupta0510/ravora/tree/main/app/chart"
click node_auth "https://github.com/rajgupta0510/ravora/blob/main/src/controllers/authController.js"
click node_backend "https://github.com/rajgupta0510/ravora/blob/main/backend/index.js"
click node_database "https://github.com/rajgupta0510/ravora/blob/main/backend/config/database.js"
click node_marketdata "https://github.com/rajgupta0510/ravora/blob/main/backend/services/MarketDataService.js"
click node_marketproviders "https://github.com/rajgupta0510/ravora/tree/main/backend/market"
click node_scan "https://github.com/rajgupta0510/ravora/blob/main/backend/services/OpportunityDiscoveryService.js"
click node_decision "https://github.com/rajgupta0510/ravora/blob/main/src/services/opportunity/opportunityEngine.js"
click node_recommendations "https://github.com/rajgupta0510/ravora/blob/main/src/services/recommendations/recommendationEngine.js"
click node_portfolio "https://github.com/rajgupta0510/ravora/blob/main/backend/controllers/PortfolioController.js"
click node_portfoliointelligence "https://github.com/rajgupta0510/ravora/blob/main/backend/services/PortfolioIntelligenceService.js"
click node_paper "https://github.com/rajgupta0510/ravora/blob/main/backend/services/PaperTradingService.js"
click node_orders "https://github.com/rajgupta0510/ravora/blob/main/backend/execution/services/ExecutionService.js"
click node_risk "https://github.com/rajgupta0510/ravora/blob/main/backend/execution/risk/RiskManager.js"
click node_exchanges "https://github.com/rajgupta0510/ravora/tree/main/backend/exchange"
click node_copilotui "https://github.com/rajgupta0510/ravora/blob/main/src/components/dashboard/CopilotChat.tsx"
click node_aicontroller "https://github.com/rajgupta0510/ravora/blob/main/backend/ai/controllers/AiController.js"
click node_agents "https://github.com/rajgupta0510/ravora/blob/main/backend/ai/services/AgentOrchestrator.js"
click node_backtest "https://github.com/rajgupta0510/ravora/blob/main/backend/ai/reasoning/BacktestEngine.js"
click node_news "https://github.com/rajgupta0510/ravora/tree/main/backend/news"
click node_notifications "https://github.com/rajgupta0510/ravora/blob/main/backend/services/NotificationService.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_onboarding,node_dashboard,node_terminal,node_copilotui toneBlue
class node_marketdata,node_marketproviders,node_scan,node_decision,node_recommendations,node_news toneAmber
class node_portfolio,node_portfoliointelligence,node_paper,node_orders,node_risk,node_exchanges toneMint
class node_aicontroller,node_agents,node_backtest toneRose
class node_auth,node_backend,node_database,node_notifications,node_investor toneIndigo
```

## Components

### User experience

- [Application shell](https://github.com/rajgupta0510/ravora/blob/main/src/App.tsx): `src/App.tsx`
- [Risk onboarding](https://github.com/rajgupta0510/ravora/blob/main/src/components/dashboard/OnboardingWizard.tsx): `src/components/dashboard/OnboardingWizard.tsx`
- [Dashboard workspaces](https://github.com/rajgupta0510/ravora/tree/main/src/components/dashboard): `src/components/dashboard`
- [Trading terminal](https://github.com/rajgupta0510/ravora/tree/main/app/chart): `app/chart`
- [Copilot chat](https://github.com/rajgupta0510/ravora/blob/main/src/components/dashboard/CopilotChat.tsx): `src/components/dashboard/CopilotChat.tsx`

### Market intelligence

- [Market data service](https://github.com/rajgupta0510/ravora/blob/main/backend/services/MarketDataService.js): `backend/services/MarketDataService.js`
- [Market providers](https://github.com/rajgupta0510/ravora/tree/main/backend/market): `backend/market`
- [Opportunity discovery](https://github.com/rajgupta0510/ravora/blob/main/backend/services/OpportunityDiscoveryService.js): `backend/services/OpportunityDiscoveryService.js`
- [Opportunity scoring](https://github.com/rajgupta0510/ravora/blob/main/src/services/opportunity/opportunityEngine.js): `src/services/opportunity/opportunityEngine.js`
- [Recommendations](https://github.com/rajgupta0510/ravora/blob/main/src/services/recommendations/recommendationEngine.js): `src/services/recommendations/recommendationEngine.js`
- [News services](https://github.com/rajgupta0510/ravora/tree/main/backend/news): `backend/news`

### Portfolio and execution

- [Portfolio workspace](https://github.com/rajgupta0510/ravora/blob/main/backend/controllers/PortfolioController.js): `backend/controllers/PortfolioController.js`
- [Portfolio intelligence](https://github.com/rajgupta0510/ravora/blob/main/backend/services/PortfolioIntelligenceService.js): `backend/services/PortfolioIntelligenceService.js`
- [Paper trading](https://github.com/rajgupta0510/ravora/blob/main/backend/services/PaperTradingService.js): `backend/services/PaperTradingService.js`
- [Order execution](https://github.com/rajgupta0510/ravora/blob/main/backend/execution/services/ExecutionService.js): `backend/execution/services/ExecutionService.js`
- [Risk controls](https://github.com/rajgupta0510/ravora/blob/main/backend/execution/risk/RiskManager.js): `backend/execution/risk/RiskManager.js`
- [Exchange integrations](https://github.com/rajgupta0510/ravora/tree/main/backend/exchange): `backend/exchange`

### Araiven AI

- [AI controller](https://github.com/rajgupta0510/ravora/blob/main/backend/ai/controllers/AiController.js): `backend/ai/controllers/AiController.js`
- [Agent orchestration](https://github.com/rajgupta0510/ravora/blob/main/backend/ai/services/AgentOrchestrator.js): `backend/ai/services/AgentOrchestrator.js`
- [Strategy backtesting](https://github.com/rajgupta0510/ravora/blob/main/backend/ai/reasoning/BacktestEngine.js): `backend/ai/reasoning/BacktestEngine.js`

### Backend platform

- [Authentication](https://github.com/rajgupta0510/ravora/blob/main/src/controllers/authController.js): `src/controllers/authController.js`
- [API application](https://github.com/rajgupta0510/ravora/blob/main/backend/index.js): `backend/index.js`
- [Supabase data client](https://github.com/rajgupta0510/ravora/blob/main/backend/config/database.js): `backend/config/database.js`
- [Notifications](https://github.com/rajgupta0510/ravora/blob/main/backend/services/NotificationService.js): `backend/services/NotificationService.js`

### Other components

- **Investor**

## Connections

- Investor → Application shell: opens
- Application shell → Authentication: authenticates through (evidence: `src/App.tsx`)
- Application shell → Dashboard workspaces: renders (evidence: `src/App.tsx`)
- Dashboard workspaces → Risk onboarding: configures profile
- Dashboard workspaces → Trading terminal: opens terminal
- Dashboard workspaces → Portfolio workspace: views portfolio
- Dashboard workspaces → Opportunity discovery: reviews opportunities
- Dashboard workspaces → Copilot chat: opens copilot
- Copilot chat → AI controller: sends analysis request
- AI controller → Agent orchestration: orchestrates (evidence: `backend/ai/controllers/AiController.js`)
- Agent orchestration → Strategy backtesting: runs strategy analysis
- API application → Supabase data client: initializes (evidence: `backend/index.js`)
- API application → Market data service: registers API routes
- Market data service → Market providers: fetches market history (evidence: `backend/services/MarketDataService.js`)
- Opportunity discovery → Market data service: uses market data (evidence: `backend/controllers/OpportunityController.js`)
- Recommendations → Opportunity scoring: ranks opportunities (evidence: `src/services/recommendations/recommendationEngine.js`)
- Portfolio workspace → Portfolio intelligence: requests insights (evidence: `backend/controllers/PortfolioController.js`)
- Dashboard workspaces → Paper trading: deploys sandbox trades
- Dashboard workspaces → Order execution: submits orders
- Order execution → Risk controls: checks order risk (evidence: `backend/execution/services/ExecutionService.js`)
- Order execution → Exchange integrations: routes execution
- Risk controls → Market data service: checks current price (evidence: `backend/execution/risk/RiskManager.js`)
- Risk controls → Supabase data client: reads risk and portfolio state (evidence: `backend/execution/risk/RiskManager.js`)
- Dashboard workspaces → News services: reviews market context
- Dashboard workspaces → Notifications: configures alerts
