# akash-9070/aura---full-stack-solution architecture

> Architecture diagram of the GitHub repository akash-9070/aura---full-stack-solution, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akash-9070/aura---full-stack-solution
- Repository: https://github.com/akash-9070/aura---full-stack-solution

## Overview

##### Main Components

a) Frontend Layer (Next.js Application):
- Landing Page Component
- Chat Interface
- Replay System
- Upload Interface
- UI Components Library

b) Backend Layer:
- Flask Server (app.py)
- Socket.IO Integration (sio_wrapper.py)
- Routes Handler

c) Services Layer:
- Financial Analysis Group
- Modular Agent System
- Adaptive RAG System
- Report Generation Service
- Mathematics Service

d) External Integrations:
- Firebase Integration
- PathwayVectorServer
- LLM Services

##### Component Relationships

- Client → Server (HTTP/WebSocket connections)
- Server → Services (Internal API calls)
- Services → External Services (API integrations)

##### Specific Implementation Details

a) Frontend Section:
**[Next.js Client]**
- Public Interface
- Landing Page
- Chat Interface
- Upload System
- Components
- UI Library
- Chat Window
- Firebase Integration

b) Backend Section:
**[Flask Server]**
- Socket.IO Wrapper
- Route Handler
- Services Manager

c) Services Section:
**[Core Services]**
- Financial Analysis
- FinGPT
- Market Sentiment
- Adaptive RAG
- Report Generator
- Math Services

##### Additional Elements

- System boundaries and security zones
- Scaling components and load balancers
- Async vs sync communications

##### Technical Stack Indicators

- Next.js/React
- Flask
- Python
- Firebase
- PathwayVectorServer
- WebSocket
- RAG Framework

Remember to include version control integration points and deployment paths, as indicated by the presence of Dockerfile and configuration files in the repository.

This system design should emphasize AURA's unique features: the financial domain specialization, the multi-agent architecture, and the adaptive RAG framework, while showing how all components work together to deliver the final solution.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef services fill:#e74c3c,stroke:#c0392b,color:white
    classDef external fill:#f1c40f,stroke:#f39c12,color:black
    classDef storage fill:#9b59b6,stroke:#8e44ad,color:white

    %% Frontend Layer
    subgraph ClientLayer["Client Layer"]
        Landing["Landing Page"]
        Chat["Chat Interface"]
        Replay["Replay System"]
        Upload["Upload Interface"]
        UILib["UI Components Library"]
        Firebase["Firebase Integration"]
    end

    %% Backend Layer
    subgraph ServerLayer["Server Layer"]
        Flask["Flask Server"]
        SocketIO["Socket.IO Integration"]
        Routes["Routes Handler"]
    end

    %% Services Layer
    subgraph CoreServices["Core Services"]
        FinGroup["Financial Analysis Group"]
        ModAgent["Modular Agent System"]
        RAG["Adaptive RAG System"]
        ReportGen["Report Generation Service"]
        MathService["Mathematics Service"]
        Architecture["System Architecture"]
        OutputParser["Output Parser"]
        ResponseTransform["Response Transformer"]
    end

    %% External Services
    subgraph ExternalServices["External Services"]
        PathwayVector["PathwayVectorServer"]
        LLMServices["LLM Services"]
    end

    %% Relationships
    Landing --> Flask
    Chat --> SocketIO
    Upload --> Flask
    Replay --> Flask
    Firebase --> ClientLayer

    Flask --> Routes
    Routes --> CoreServices
    SocketIO --> CoreServices

    ModAgent --> RAG
    FinGroup --> RAG
    RAG --> ReportGen
    RAG --> MathService
    CoreServices --> PathwayVector
    CoreServices --> LLMServices

    %% Click Events
    click Landing "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/client/client/src/components/landingPage/LandingPage.tsx"
    click Chat "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/client/client/src/components/chatWindow/AIChat.tsx"
    click Replay "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/client/client/src/app/replay/page.tsx"
    click Upload "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/client/client/src/app/upload/page.tsx"
    click UILib "https://github.com/Akash-9070/AURA---Full-Stack-Solution/tree/main/client/client/src/components/ui/"
    click Flask "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/app.py"
    click SocketIO "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/sio_wrapper.py"
    click Routes "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/routes.py"
    click FinGroup "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/finance/finance_group.py"
    click ModAgent "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/modular_agent.py"
    click RAG "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/new_adaptive_rag.py"
    click ReportGen "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/report_gen/report_gen.py"
    click MathService "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/maths/code_executor.py"
    click Firebase "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/client/client/src/firebase/firebase.ts"
    click Architecture "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/Architecture.py"
    click OutputParser "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/output_parser.py"
    click ResponseTransform "https://github.com/Akash-9070/AURA---Full-Stack-Solution/blob/main/server/services/response_transformation.py"

    %% Styling
    class Landing,Chat,Replay,Upload,UILib,Firebase frontend
    class Flask,SocketIO,Routes backend
    class FinGroup,ModAgent,RAG,ReportGen,MathService,Architecture,OutputParser,ResponseTransform services
    class PathwayVector,LLMServices external
```
