# akhilathuluri/ai-tools architecture

> Architecture diagram of the GitHub repository akhilathuluri/ai-tools, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akhilathuluri/ai-tools
- Repository: https://github.com/akhilathuluri/ai-tools

## Overview

##### Main Components

a) Frontend Layer:
- React Application (Built with Vite)
- Component Structure:
- Layout Components (Layout, Navbar, Sidebar)
- Tool Components (Multiple AI tools)
- Shared Components (LoadingSpinner, OutputBox, ToolLayout)
- Context Providers (ApiKeyContext)

b) Integration Layer:
- Google Gemini AI API Integration
- Local Storage Service

c) Tool Services:
- Content Generation Tools
- Analysis Tools
- Utility Tools

**[Client Layer]**
- ↓ ↑
**[Integration Layer]**
- ↓ ↑
**[External Services]**

##### Detailed Component Breakdown

Client Layer (Top):
- Create sub-containers for:
- Core Components (Layout, Navigation)
- Shared Components
- Context Management

Integration Layer (Middle):
- Include:
- Gemini AI Service Connector
- Local Storage Manager
- API Key Management

External Services (Bottom):
- Google Gemini AI API
- Browser Local Storage

##### Additional Elements

- TypeScript types/interfaces
- Configuration files
- Build tools (Vite, PostCSS, Tailwind)

##### Technical Details to Highlight

- React + TypeScript stack
- Vite build system
- Tailwind CSS styling
- Google Gemini AI integration
- Local storage persistence

Remember to include annotations for:
- API endpoints
- State management flow
- Tool initialization process
- Error handling paths
- Data persistence mechanisms

This will create a comprehensive yet clear representation of the NexusAI Studio system architecture that effectively communicates the system's design to other engineers.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        App["App Component"]:::core
        Main["Main Entry"]:::core
        
        subgraph CoreComponents
            Layout["Layout"]:::core
            Navbar["Navigation Bar"]:::core
            Sidebar["Sidebar"]:::core
        end
        
        subgraph SharedComponents
            LoadingSpinner["Loading Spinner"]:::shared
            OutputBox["Output Box"]:::shared
            ToolLayout["Tool Layout"]:::shared
        end
        
        subgraph Tools
            direction TB
            
            subgraph ContentTools
                BlogGen["Blog Generator"]:::tool
                EmailComp["Email Composer"]:::tool
                TextEnh["Text Enhancer"]:::tool
            end
            
            subgraph AnalysisTools
                GithubAnal["Github Analyzer"]:::tool
                ImageAnal["Image Analyzer"]:::tool
                TextSum["Text Summarizer"]:::tool
            end
            
            subgraph UtilityTools
                HashGen["Hashtag Generator"]:::tool
                PromptEng["Prompt Engineer"]:::tool
                SqlBuild["SQL Builder"]:::tool
                ChatBot["ChatBot"]:::tool
            end
        end
        
        ApiKeyContext["API Key Context"]:::context
    end
    
    subgraph IntegrationLayer
        GeminiService["Gemini AI Service"]:::integration
        StorageService["Local Storage Service"]:::integration
    end
    
    subgraph ExternalServices
        GeminiAPI["Google Gemini AI API"]:::external
        LocalStorage["Browser Local Storage"]:::external
    end
    
    %% Connections
    Main --> App
    App --> Layout
    Layout --> Navbar
    Layout --> Sidebar
    
    ApiKeyContext --> GeminiService
    
    Tools --> ToolLayout
    Tools --> LoadingSpinner
    Tools --> OutputBox
    
    GeminiService --> GeminiAPI
    StorageService --> LocalStorage
    
    Tools --> GeminiService
    Tools --> StorageService
    
    %% Click Events
    click App "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/App.tsx"
    click Main "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/main.tsx"
    click Layout "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/components/Layout.tsx"
    click Navbar "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/components/Navbar.tsx"
    click Sidebar "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/components/Sidebar.tsx"
    click LoadingSpinner "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/components/shared/LoadingSpinner.tsx"
    click OutputBox "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/components/shared/OutputBox.tsx"
    click ToolLayout "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/components/shared/ToolLayout.tsx"
    click ApiKeyContext "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/context/ApiKeyContext.tsx"
    click GeminiService "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/utils/gemini.ts"
    click StorageService "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/utils/storage.ts"
    click BlogGen "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/BlogGenerator.tsx"
    click EmailComp "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/EmailComposer.tsx"
    click TextEnh "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/TextEnhancer.tsx"
    click GithubAnal "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/GithubAnalyzer.tsx"
    click ImageAnal "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/ImageAnalyzer.tsx"
    click TextSum "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/TextSummarizer.tsx"
    click HashGen "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/HashtagGenerator.tsx"
    click PromptEng "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/PromptEngineer.tsx"
    click SqlBuild "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/SqlBuilder.tsx"
    click ChatBot "https://github.com/akhilathuluri/Ai-Tools/blob/main/src/tools/ChatBot.tsx"
    
    %% Styles
    classDef core fill:#2563eb,color:white
    classDef shared fill:#4b5563,color:white
    classDef tool fill:#059669,color:white
    classDef context fill:#7c3aed,color:white
    classDef integration fill:#c026d3,color:white
    classDef external fill:#ea580c,color:white
    
    %% Legend
    subgraph Legend
        CoreComp["Core Component"]:::core
        SharedComp["Shared Component"]:::shared
        ToolComp["Tool Component"]:::tool
        ContextComp["Context"]:::context
        IntegrationComp["Integration Service"]:::integration
        ExternalComp["External Service"]:::external
    end
```
