# nisarg-modi/nexoraai architecture

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

- Interactive diagram: https://gitdiagram.com/nisarg-modi/nexoraai
- Repository: https://github.com/nisarg-modi/nexoraai

## Overview

Nexora is a real-time messaging and communication app with AI assistance, semantic search, translation, calls, document tools, and social features. Users authenticate, enter the main workspace, then choose contacts or conversations and use messaging, search, scanning, or other feature views. The sampled files show the app routing and authentication flow, workspace composition, chat feature integrations, and Supabase access. Other substantial capabilities are represented from the file tree, but their runtime wiring is not inferred where source excerpts do not show it.

Main entry points: [`src/pages/Index.tsx`](https://github.com/nisarg-modi/nexoraai/blob/main/src/pages/Index.tsx) (Main workspace), [`src/integrations/supabase/client.ts`](https://github.com/nisarg-modi/nexoraai/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/App.tsx`](https://github.com/nisarg-modi/nexoraai/blob/main/src/App.tsx) (App routing), [`src/components/ChatInterface.tsx`](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ChatInterface.tsx) (Chat interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and identity"]
  node_app_shell["App routing<br/>[App.tsx]"]
  node_auth_page["Sign-in and auth<br/>[Auth.tsx]"]
  node_auth_state["Auth state<br/>[useAuth.tsx]"]
  node_workspace["Main workspace<br/>[Index.tsx]"]
end

subgraph group_messaging["Messaging and search"]
  node_contacts["Contacts and groups<br/>[ContactsList.tsx]"]
  node_chat["Chat interface<br/>[ChatInterface.tsx]"]
  node_semantic_search["Semantic search<br/>[SemanticSearch.tsx]"]
  node_search_indexing["Search indexing"]
end

subgraph group_communication["Calls and presence"]
  node_calls["Call interface<br/>[CallInterface.tsx]"]
  node_webrtc["WebRTC calls<br/>[useWebRTC.tsx]"]
  node_incoming_calls["Incoming call listener"]
  node_presence["Online presence"]
end

subgraph group_ai_tools["AI and utilities"]
  node_ai_chat["Nexora AI chat<br/>[NexoraAIChat.tsx]"]
  node_scanner["Scan and translate"]
  node_document_wallet["Document wallet<br/>[DocumentWallet.tsx]"]
end

subgraph group_social["Social and account"]
  node_profile["Profile editor<br/>[ProfileEditor.tsx]"]
  node_communities["Communities<br/>[useCommunities.tsx]"]
  node_streams["Streams<br/>[useStreams.tsx]"]
  node_admin["Admin dashboard<br/>[AdminDashboard.tsx]"]
end

subgraph group_platform["Backend services"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_edge_functions["Supabase functions"]
  node_mcp["MCP tools"]
end

node_user(("User"))

node_user -->|"opens"| node_app_shell
node_app_shell -->|"checks session"| node_auth_state
node_app_shell -->|"routes to"| node_auth_page
node_auth_page -->|"authenticates"| node_supabase
node_auth_state -->|"reads auth"| node_supabase
node_app_shell -->|"routes to"| node_workspace
node_workspace -->|"uses"| node_auth_state
node_workspace -->|"renders"| node_contacts
node_workspace -->|"renders"| node_chat
node_workspace -->|"renders"| node_semantic_search
node_workspace -->|"renders"| node_scanner
node_workspace -->|"renders"| node_profile
node_workspace -->|"renders"| node_admin
node_contacts -->|"accesses data"| node_supabase
node_chat -->|"accesses data"| node_supabase
node_chat -->|"includes"| node_ai_chat
node_chat -->|"includes"| node_calls
node_semantic_search -->|"searches"| node_supabase
node_search_indexing -->|"subscribes to messages"| node_supabase
node_calls -.->|"uses"| node_webrtc
node_app_shell -->|"mounts"| node_incoming_calls
node_incoming_calls -->|"listens for calls"| node_supabase
node_presence -->|"tracks presence"| node_supabase
node_workspace -->|"initializes"| node_presence
node_search_indexing -->|"invokes embedding"| node_edge_functions
node_workspace -.->|"offers feature"| node_communities
node_workspace -.->|"offers feature"| node_streams
node_document_wallet -->|"accesses data"| node_supabase
node_profile -.->|"accesses data"| node_supabase
node_admin -->|"accesses data"| node_supabase
node_mcp -.->|"queries data"| node_supabase

click node_app_shell "https://github.com/nisarg-modi/nexoraai/blob/main/src/App.tsx"
click node_auth_page "https://github.com/nisarg-modi/nexoraai/blob/main/src/pages/Auth.tsx"
click node_auth_state "https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useAuth.tsx"
click node_workspace "https://github.com/nisarg-modi/nexoraai/blob/main/src/pages/Index.tsx"
click node_contacts "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ContactsList.tsx"
click node_chat "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ChatInterface.tsx"
click node_semantic_search "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/SemanticSearch.tsx"
click node_search_indexing "https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useSemanticSearch.tsx"
click node_calls "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/CallInterface.tsx"
click node_webrtc "https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useWebRTC.tsx"
click node_incoming_calls "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/GlobalIncomingCallListener.tsx"
click node_presence "https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useOnlinePresence.tsx"
click node_ai_chat "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/NexoraAIChat.tsx"
click node_scanner "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ScannerTranslator.tsx"
click node_document_wallet "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/DocumentWallet.tsx"
click node_profile "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ProfileEditor.tsx"
click node_communities "https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useCommunities.tsx"
click node_streams "https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useStreams.tsx"
click node_admin "https://github.com/nisarg-modi/nexoraai/blob/main/src/components/AdminDashboard.tsx"
click node_supabase "https://github.com/nisarg-modi/nexoraai/blob/main/src/integrations/supabase/client.ts"
click node_edge_functions "https://github.com/nisarg-modi/nexoraai/tree/main/supabase/functions"
click node_mcp "https://github.com/nisarg-modi/nexoraai/tree/main/src/lib/mcp"

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_shell,node_auth_page,node_auth_state,node_workspace,node_user toneBlue
class node_contacts,node_chat,node_semantic_search,node_search_indexing toneAmber
class node_calls,node_webrtc,node_incoming_calls,node_presence toneMint
class node_ai_chat,node_scanner,node_document_wallet toneRose
class node_profile,node_communities,node_streams,node_admin toneIndigo
class node_supabase,node_edge_functions,node_mcp toneTeal
```

## Components

### App and identity

- [App routing](https://github.com/nisarg-modi/nexoraai/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in and auth](https://github.com/nisarg-modi/nexoraai/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Auth state](https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Main workspace](https://github.com/nisarg-modi/nexoraai/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`

### Messaging and search

- [Contacts and groups](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ContactsList.tsx): `src/components/ContactsList.tsx`
- [Chat interface](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ChatInterface.tsx): `src/components/ChatInterface.tsx`
- [Semantic search](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/SemanticSearch.tsx): `src/components/SemanticSearch.tsx`
- [Search indexing](https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useSemanticSearch.tsx): `src/hooks/useSemanticSearch.tsx`

### Calls and presence

- [Call interface](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/CallInterface.tsx): `src/components/CallInterface.tsx`
- [WebRTC calls](https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useWebRTC.tsx): `src/hooks/useWebRTC.tsx`
- [Incoming call listener](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/GlobalIncomingCallListener.tsx): `src/components/GlobalIncomingCallListener.tsx`
- [Online presence](https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useOnlinePresence.tsx): `src/hooks/useOnlinePresence.tsx`

### AI and utilities

- [Nexora AI chat](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/NexoraAIChat.tsx): `src/components/NexoraAIChat.tsx`
- [Scan and translate](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ScannerTranslator.tsx): `src/components/ScannerTranslator.tsx`
- [Document wallet](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/DocumentWallet.tsx): `src/components/DocumentWallet.tsx`

### Social and account

- [Profile editor](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/ProfileEditor.tsx): `src/components/ProfileEditor.tsx`
- [Communities](https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useCommunities.tsx): `src/hooks/useCommunities.tsx`
- [Streams](https://github.com/nisarg-modi/nexoraai/blob/main/src/hooks/useStreams.tsx): `src/hooks/useStreams.tsx`
- [Admin dashboard](https://github.com/nisarg-modi/nexoraai/blob/main/src/components/AdminDashboard.tsx): `src/components/AdminDashboard.tsx`

### Backend services

- [Supabase client](https://github.com/nisarg-modi/nexoraai/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Supabase functions](https://github.com/nisarg-modi/nexoraai/tree/main/supabase/functions): `supabase/functions`
- [MCP tools](https://github.com/nisarg-modi/nexoraai/tree/main/src/lib/mcp): `src/lib/mcp`

### Other components

- **User**

## Connections

- User → App routing: opens (evidence: `src/App.tsx`)
- App routing → Auth state: checks session (evidence: `src/App.tsx`)
- App routing → Sign-in and auth: routes to (evidence: `src/App.tsx`)
- Sign-in and auth → Supabase client: authenticates (evidence: `src/pages/Auth.tsx`)
- Auth state → Supabase client: reads auth (evidence: `src/hooks/useAuth.tsx`)
- App routing → Main workspace: routes to (evidence: `src/App.tsx`)
- Main workspace → Auth state: uses (evidence: `src/pages/Index.tsx`)
- Main workspace → Contacts and groups: renders (evidence: `src/pages/Index.tsx`)
- Main workspace → Chat interface: renders (evidence: `src/pages/Index.tsx`)
- Main workspace → Semantic search: renders (evidence: `src/pages/Index.tsx`)
- Main workspace → Scan and translate: renders (evidence: `src/pages/Index.tsx`)
- Main workspace → Profile editor: renders (evidence: `src/pages/Index.tsx`)
- Main workspace → Admin dashboard: renders (evidence: `src/pages/Index.tsx`)
- Contacts and groups → Supabase client: accesses data (evidence: `src/components/ContactsList.tsx`)
- Chat interface → Supabase client: accesses data (evidence: `src/components/ChatInterface.tsx`)
- Chat interface → Nexora AI chat: includes (evidence: `src/components/ChatInterface.tsx`)
- Chat interface → Call interface: includes (evidence: `src/components/ChatInterface.tsx`)
- Semantic search → Supabase client: searches (evidence: `src/components/SemanticSearch.tsx`)
- Search indexing → Supabase client: subscribes to messages (evidence: `src/hooks/useSemanticSearch.tsx`)
- Call interface → WebRTC calls: uses
- App routing → Incoming call listener: mounts (evidence: `src/App.tsx`)
- Incoming call listener → Supabase client: listens for calls (evidence: `src/components/GlobalIncomingCallListener.tsx`)
- Online presence → Supabase client: tracks presence (evidence: `src/hooks/useOnlinePresence.tsx`)
- Main workspace → Online presence: initializes (evidence: `src/pages/Index.tsx`)
- Search indexing → Supabase functions: invokes embedding (evidence: `src/hooks/useSemanticSearch.tsx`)
- Main workspace → Communities: offers feature
- Main workspace → Streams: offers feature
- Document wallet → Supabase client: accesses data (evidence: `src/components/DocumentWallet.tsx`)
- Profile editor → Supabase client: accesses data
- Admin dashboard → Supabase client: accesses data (evidence: `src/components/AdminDashboard.tsx`)
- MCP tools → Supabase client: queries data
