# archiik04/meta-school-vr-web-part architecture

> Architecture diagram of the GitHub repository archiik04/meta-school-vr-web-part, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/archiik04/meta-school-vr-web-part
- Repository: https://github.com/archiik04/meta-school-vr-web-part

## Overview

##### Project type and purpose
- Project Type: A hybrid full-stack + VR/metaverse educational platform
- Web front-end (React/TypeScript + Tailwind CSS)
- Python/Flask back-end (AI orchestration)
- Unity VR application (C#)
- Purpose: Deliver AI-powered, immersive learning via generative video lessons, spatial 3D audiobooks, smart boards, gamified mind games, and metaverse experiences.

##### File structure
- Top-level directories
- Back-End/: Flask app orchestrating AI services, media assembly, TTS, image/video generation
- src/: React web app with UI components, pages, contexts, hooks, and Firebase integration
- public/: Static assets for the web
- Unity project folders are implied from README (not in this file tree)
- Key subdirectories & patterns
- Back-End/assembly, imagegen, tts → modular AI media pipelines
- src/components/ui → granular UI primitives (design-system pattern)
- src/contexts & hooks → context API + custom hook pattern
- Firebase config in src/lib/firebase.ts
- Configuration & scripts
- package.json, tsconfig.*, vite.config.ts → web build config
- bun.lockb, package-lock.json, eslint.config.js → dependency/version control
- .gitignore

##### README for additional insights
- Frontend Layer: React Web & Unity VR
- API Gateway: Flask
- External AI services: OpenAI (GPT), ElevenLabs (TTS), ConvAI
- Firebase DB for user data/analytics
- Tech stack details: Unity/Blender for VR, React/TS, Flask/Python, Firebase, external APIs

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Presentation Tier"
        React["React Web Application"]:::presentation
        VR["Unity VR Application"]:::presentation
    end

    subgraph "API Gateway"
        Flask["Flask API Gateway"]:::backend
    end

    subgraph "AI Services"
        GPT["OpenAI GPT-4\n(NLP)"]:::ai
        Diffusion["Diffusion Image Gen\n(Computer Vision)"]:::ai
        TTS["ElevenLabs TTS\n(Voice Synthesis)"]:::ai
        ConvAI["ConvAI Character AI\n(Conversational)"]:::ai
    end

    subgraph "Media Pipelines"
        Assembly["Assembly Pipeline"]:::backend
        ImageGen["ImageGen Pipeline"]:::backend
        ScriptGen["ScriptGen Pipeline"]:::backend
        AudioGen["TTS Pipeline"]:::backend
    end

    subgraph "Data Stores"
        Firebase["Firebase Auth, Realtime DB, Storage"]:::data
        Sheets["Google Sheets Analytics"]:::data
    end

    React -->|"REST API"| Flask
    VR -->|"REST API"| Flask

    Flask -->|"invoke"| GPT
    Flask -->|"invoke"| Diffusion
    Flask -->|"invoke"| TTS
    Flask -->|"invoke"| ConvAI

    GPT -->|"text scripts"| ScriptGen
    Diffusion -->|"images"| ImageGen
    ScriptGen -->|"video assembly"| Assembly
    ImageGen -->|"media assets"| Assembly
    TTS -->|"audio files"| AudioGen

    Assembly -->|"store media"| Firebase
    AudioGen -->|"store audio"| Firebase

    React -->|"fetch media"| Firebase
    VR -->|"fetch media"| Firebase

    Flask -->|"log events"| Firebase
    Firebase -->|"export analytics"| Sheets

    %% Click Events for React Web App
    click React "https://github.com/archiik04/meta-school-vr-web-part/tree/main/src/"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/src/main.tsx"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/src/App.tsx"
    click React "https://github.com/archiik04/meta-school-vr-web-part/tree/main/src/components/ui/"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/src/components/ProtectedRoute.tsx"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/src/contexts/AuthContext.tsx"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/src/hooks/use-mobile.tsx"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/src/lib/firebase.ts"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/package.json"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/vite.config.ts"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/tsconfig.json"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/eslint.config.js"
    click React "https://github.com/archiik04/meta-school-vr-web-part/blob/main/tailwind.config.ts"

    %% Click Events for Flask Backend & Pipelines
    click Flask "https://github.com/archiik04/meta-school-vr-web-part/blob/main/Back-End/main.py"
    click Assembly "https://github.com/archiik04/meta-school-vr-web-part/blob/main/Back-End/assembly/scripts/assembly_video.py"
    click ImageGen "https://github.com/archiik04/meta-school-vr-web-part/blob/main/Back-End/imagegen/generate_image.py"
    click ScriptGen "https://github.com/archiik04/meta-school-vr-web-part/blob/main/Back-End/imagegen/generate_script.py"
    click AudioGen "https://github.com/archiik04/meta-school-vr-web-part/blob/main/Back-End/tts/generate_audio.py"

    classDef presentation fill:#cfe2ff,stroke:#0b5394,color:#0b5394,stroke-width:2px
    classDef backend fill:#d9ead3,stroke:#38761d,color:#38761d,stroke-width:2px
    classDef ai fill:#ffe599,stroke:#b58900,color:#b58900,stroke-width:2px
    classDef data fill:#d9d2e9,stroke:#5f4b8b,color:#5f4b8b,stroke-width:2px
```
