# anasaadi02/arabiclearningapp architecture

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

- Interactive diagram: https://gitdiagram.com/anasaadi02/arabiclearningapp
- Repository: https://github.com/anasaadi02/arabiclearningapp

## Overview

##### Main System Components

a) Frontend Layer (Client-Side)
- Divide into main functional modules:
- Authentication Module (Register&Login folder)
- Core Features Module (various screens)
- Quiz System Module (quizzes folder)
- Word Management Module (words folder)
- Utils/Services Module (utils folder)

b) External Services Layer
- Firebase Integration (indicated by firebase.js)
- Unsplash API Service (indicated by unsplashService.js)
- Translation Services (indicated by translation.json files)

##### Component Relationships

a) User Interface Flow:
- To Authentication Flow (Login/Register)
- Branch out to main features:
- Text-to-Image Conversion
- Text-to-Audio Conversion
- Translation Features
- Quiz System
- Word Management
- Custom Letters

b) Data Flow:
- Firebase interactions for authentication and data storage
- Unsplash API calls for image-related features
- Translation service connections

##### Specific Implementation Details

a) Feature Modules:
**┌─ Core Features ─────────────────┐**
- Text to Image Conversion     │
- Text to Audio Conversion     │
- Translation System           │
- Quiz Management             │
- Word Learning System        │
- ┘

b) Utils/Services:
**┌─ Services ──────────────────────┐**
- Chatbot Service              │
- Robot Service                │
- Server Communications        │
- ┘

##### Technical Stack Indicators

- React Native
- Firebase
- Unsplash API
- Voice Recognition (indicated by react-native-voice patch)

##### Architectural Patterns

Following patterns:
- Component-based architecture (React Native)
- Screen-based navigation
- Service-oriented integration
- Modular feature organization

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "React Native Mobile App"
        direction TB
        
        subgraph "Frontend Layer"
            direction TB
            Onboarding["Onboarding Screen"]:::ui
            
            subgraph "Authentication"
                direction TB
                Auth["Authentication Module"]:::auth
                Login["Login"]:::auth
                Register["Register"]:::auth
            end
            
            subgraph "Core Features"
                direction TB
                TTI["Text to Image"]:::feature
                TTA["Text to Audio"]:::feature
                Trans["Translation"]:::feature
                CL["Custom Letters"]:::feature
            end
            
            subgraph "Learning Systems"
                direction TB
                Quiz["Quiz System"]:::feature
                WordMgmt["Word Management"]:::feature
            end
        end
        
        subgraph "Utils & Services"
            direction TB
            Chatbot["Chatbot Service"]:::util
            Robot["Robot Service"]:::util
            Server["Server Communication"]:::util
        end
        
        subgraph "External Services"
            direction TB
            Firebase["Firebase"]:::external
            Unsplash["Unsplash API"]:::external
            TransService["Translation Services"]:::external
        end
    end
    
    %% Connections
    Onboarding --> Auth
    Auth --> Login
    Auth --> Register
    Login --> CoreFeatures
    Register --> CoreFeatures
    
    %% Core Features Access
    CoreFeatures -.-> TTI
    CoreFeatures -.-> TTA
    CoreFeatures -.-> Trans
    CoreFeatures -.-> CL
    CoreFeatures -.-> Quiz
    CoreFeatures -.-> WordMgmt
    
    %% External Service Connections
    TTI --> Unsplash
    WordMgmt --> Unsplash
    Auth --> Firebase
    Trans --> TransService
    
    %% Utils Connections
    TTI --> Server
    TTA --> Server
    Trans --> Server
    Quiz --> Server
    WordMgmt --> Server
    
    %% Click Events
    click Auth "https://github.com/anasaadi02/ArabicLearningApp/tree/master/screens/Register&Login/"
    click Quiz "https://github.com/anasaadi02/ArabicLearningApp/tree/master/screens/quizzes/"
    click WordMgmt "https://github.com/anasaadi02/ArabicLearningApp/tree/master/screens/words/"
    click Server "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/utils/server.js"
    click Firebase "https://github.com/anasaadi02/ArabicLearningApp/blob/master/firebase.js"
    click TransService "https://github.com/anasaadi02/ArabicLearningApp/blob/master/ar/translation.json"
    click Unsplash "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/words/unsplashService.js"
    click TTI "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/TextToImgScreen.js"
    click TTA "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/Text_AudioScreen.js"
    click Trans "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/TranslateScreen.js"
    click Onboarding "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/Onboarding.js"
    click CL "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/CustomLetter.js"
    click Chatbot "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/utils/chatbot.js"
    click Robot "https://github.com/anasaadi02/ArabicLearningApp/blob/master/screens/utils/robot.js"
    
    %% Styling
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef auth fill:#e74c3c,stroke:#c0392b,color:white
    classDef feature fill:#2ecc71,stroke:#27ae60,color:white
    classDef util fill:#f1c40f,stroke:#f39c12,color:white
    classDef external fill:#9b59b6,stroke:#8e44ad,color:white
    
    %% Legend
    subgraph Legend
        direction TB
        UI["UI Component"]:::ui
        AuthComp["Authentication"]:::auth
        FeatureComp["Feature"]:::feature
        UtilComp["Utility"]:::util
        ExtComp["External Service"]:::external
    end
```
