-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.html
More file actions
133 lines (119 loc) · 5.8 KB
/
output.html
File metadata and controls
133 lines (119 loc) · 5.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<h1 id="nexora-system-architecture">Nexora System Architecture</h1>
<pre class="mermaid"><code>flowchart TD
%% Users Layer
MobileUser["📱 Mobile User<br/>(Flutter App)"]
WebUser["🌐 Web User<br/>(Next.js)"]
%% Frontend Layer
subgraph Frontend["Frontend Layer"]
Mobile["📱 Mobile App<br/>Flutter 3.29.1<br/>• BLoC State Management<br/>• Auto Route Navigation<br/>• Material Design 3<br/>• WebSocket Client<br/>• Audio Recording"]
Web["🌐 Web Application<br/>Next.js<br/>• React Framework<br/>• University Chat Interface<br/>• Landing Pages<br/>• Responsive Design"]
end
%% Communication Layer
subgraph Communication["Communication Layer"]
WebSocket["📡 WebSocket<br/>Pusher Service<br/>• Real-time messaging<br/>• Voice data streaming<br/>• Connection management"]
RestAPI["🔗 REST APIs<br/>Laravel Endpoints<br/>• Authentication<br/>• Data operations<br/>• File uploads"]
end
%% Backend Services
subgraph Backend["Backend Services Layer"]
Laravel["🛠️ Laravel Backend<br/>EC2 Instance 1<br/>• User Authentication<br/>• Spatie Permissions<br/>• Chat Management<br/>• API Gateway"]
FastAPI["🤖 FastAPI AI Server<br/>EC2 Instance 2<br/>• Voice Processing<br/>• AI Agent Orchestration<br/>• OpenAI Whisper Integration<br/>• ML Pipeline"]
end
%% AI/ML Layer
subgraph AI["AI/ML Processing"]
Whisper["🎤 OpenAI Whisper<br/>Small Model (244M)<br/>• Speech-to-Text<br/>• Language Detection<br/>• Audio Transcription"]
AIAgent["🧠 AI Agents<br/>• Conversation Processing<br/>• Response Generation<br/>• Context Management"]
end
%% Data Layer
subgraph Data["Data & Storage Layer"]
MySQL["🗄️ MySQL Database<br/>Amazon RDS<br/>• User Data<br/>• Chat History<br/>• Authentication<br/>• Analytics"]
FileStorage["📁 File Storage<br/>• Audio Files<br/>• Media Assets<br/>• User Uploads"]
end
%% Infrastructure Layer
subgraph Infrastructure["AWS Infrastructure"]
LoadBalancer["⚖️ Load Balancer<br/>• Traffic Distribution<br/>• High Availability<br/>• Auto-scaling"]
Monitoring["📊 Monitoring<br/>Sentry<br/>• Error Tracking<br/>• Performance Metrics<br/>• Real-time Alerts"]
end
%% User Connections
MobileUser --> Mobile
WebUser --> Web
%% Frontend to Communication
Mobile --> WebSocket
Mobile --> RestAPI
Web --> RestAPI
%% Communication to Backend
WebSocket --> Laravel
RestAPI --> Laravel
%% Backend Connections
Laravel --> MySQL
Laravel --> FastAPI
FastAPI --> Whisper
FastAPI --> AIAgent
FastAPI --> MySQL
%% Infrastructure Connections
LoadBalancer --> Laravel
LoadBalancer --> FastAPI
Monitoring --> Laravel
Monitoring --> FastAPI
%% Data Flow
Laravel --> FileStorage
FastAPI --> FileStorage
%% Styling
classDef userLayer fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef frontendLayer fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef commLayer fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
classDef backendLayer fill:#fff3e0,stroke:#f57c00,stroke-width:2px
classDef aiLayer fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef dataLayer fill:#f1f8e9,stroke:#689f38,stroke-width:2px
classDef infraLayer fill:#f5f5f5,stroke:#616161,stroke-width:2px
class MobileUser,WebUser userLayer
class Mobile,Web frontendLayer
class WebSocket,RestAPI commLayer
class Laravel,FastAPI backendLayer
class Whisper,AIAgent aiLayer
class MySQL,FileStorage dataLayer
class LoadBalancer,Monitoring infraLayer</code></pre>
<h2 id="architecture-description">Architecture Description</h2>
<p>This diagram shows the complete Nexora ecosystem architecture
with:</p>
<h3 id="frontend-layer">Frontend Layer</h3>
<ul>
<li><strong>Mobile App</strong>: Flutter 3.29.1 with BLoC pattern,
real-time voice chat</li>
<li><strong>Web Application</strong>: Next.js for university chat
interface and landing pages</li>
</ul>
<h3 id="communication-layer">Communication Layer</h3>
<ul>
<li><strong>WebSocket</strong>: Pusher service for real-time messaging
and voice streaming</li>
<li><strong>REST APIs</strong>: Laravel endpoints for authentication and
data operations</li>
</ul>
<h3 id="backend-services">Backend Services</h3>
<ul>
<li><strong>Laravel Backend</strong>: EC2 Instance 1 - User auth,
permissions, chat management</li>
<li><strong>FastAPI AI Server</strong>: EC2 Instance 2 - Voice
processing, AI orchestration</li>
</ul>
<h3 id="aiml-processing">AI/ML Processing</h3>
<ul>
<li><strong>OpenAI Whisper</strong>: Small model (244M parameters) for
speech recognition</li>
<li><strong>AI Agents</strong>: Conversation processing and response
generation</li>
</ul>
<h3 id="data-storage">Data & Storage</h3>
<ul>
<li><strong>MySQL Database</strong>: Amazon RDS for user data, chat
history, analytics</li>
<li><strong>File Storage</strong>: Audio files, media assets, user
uploads</li>
</ul>
<h3 id="aws-infrastructure">AWS Infrastructure</h3>
<ul>
<li><strong>Load Balancer</strong>: Traffic distribution and high
availability</li>
<li><strong>Monitoring</strong>: Sentry for error tracking and
performance metrics</li>
</ul>