# fossasia/eventyay-video architecture

> Architecture diagram of the GitHub repository fossasia/eventyay-video, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fossasia/eventyay-video
- Repository: https://github.com/fossasia/eventyay-video

## Overview

##### Main System Components

The system appears to be a full-stack application with these primary components:

a. Frontend (webapp/)
- Vue.js based web application
- Real-time communication features
- Multiple view components for different functionalities

b. Backend (server/)
- Django-based server
- WebSocket support through channels
- Multiple service modules
- Authentication system

c. Infrastructure Components
- Redis (for real-time features and caching)
- Database (likely PostgreSQL)
- Media storage
- WebRTC services (Janus)
- BigBlueButton integration
- TURN servers

##### Key Architectural Patterns to Highlight

a. Real-time Communication Flow
- WebSocket connections
- Video streaming paths
- Chat system architecture

b. Service Architecture
- Core services (/server/venueless/core/services/)
- Live modules (/server/venueless/live/modules/)
- External integrations (BBB, Zoom, etc.)

**[Client Layer]**
- Web Application (Vue.js)
- WebRTC Clients
- Media Handling

**[Communication Layer]**
- WebSocket Connections
- REST API
- Video Streaming

**[Application Layer]**
- Authentication Service
- Room Management
- Chat Service
- Video Conference Service
- Exhibition Service
- Polling Service
- Question Service
- Announcement Service

**[Integration Layer]**
- BigBlueButton Integration
- Janus WebRTC
- TURN Services
- External Storage
- Social Integration

**[Data Layer]**
- PostgreSQL Database
- Redis Cache
- File Storage

##### Implementation Details

Technical aspects:

- Django Channels for WebSocket handling
- Celery for background tasks
- Redis for real-time features and caching
- Multiple database models and their relationships
- API endpoints and WebSocket events
- Frontend component structure

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        WA["Web Application (Vue.js)"]:::frontend
        CI["Chat Interface"]:::frontend
        VC["Video Conference"]:::frontend
        RM["Room Management"]:::frontend
        PI["Polls Interface"]:::frontend
        QI["Questions Interface"]:::frontend
    end

    subgraph Communication
        WS["WebSocket Handler"]:::realtime
        REST["REST API"]:::api
        VS["Video Streaming"]:::realtime
    end

    subgraph "Application Services"
        AS["Authentication Service"]:::service
        RMS["Room Management Service"]:::service
        CS["Chat Service"]:::service
        VCS["Video Conference Service"]:::service
        PS["Polling Service"]:::service
        QS["Question Service"]:::service
        ANS["Announcement Service"]:::service
    end

    subgraph "External Integrations"
        BBB["BigBlueButton"]:::external
        JAN["Janus WebRTC"]:::external
        TURN["TURN Services"]:::external
    end

    subgraph "Data Layer"
        DB[(PostgreSQL)]:::database
        REDIS[(Redis Cache)]:::database
        FS["File Storage"]:::storage
    end

    %% Client Layer Connections
    WA --> WS
    WA --> REST
    CI --> CS
    VC --> VCS
    RM --> RMS
    PI --> PS
    QI --> QS

    %% Communication Layer Connections
    WS --> AS
    WS --> CS
    WS --> VCS
    REST --> AS
    VS --> JAN

    %% Application Service Connections
    AS --> DB
    AS --> REDIS
    RMS --> DB
    CS --> DB
    CS --> REDIS
    VCS --> JAN
    PS --> DB
    QS --> DB
    ANS --> DB

    %% External Integration Connections
    VCS --> BBB
    VCS --> TURN
    JAN --> TURN

    %% Click Events
    click WA "https://github.com/fossasia/eventyay-video/tree/development/webapp/src/"
    click CI "https://github.com/fossasia/eventyay-video/blob/development/webapp/src/components/Chat.vue"
    click VC "https://github.com/fossasia/eventyay-video/blob/development/webapp/src/components/janus/JanusConference.vue"
    click RM "https://github.com/fossasia/eventyay-video/tree/development/webapp/src/views/rooms/"
    click PI "https://github.com/fossasia/eventyay-video/blob/development/webapp/src/components/Polls.vue"
    click QI "https://github.com/fossasia/eventyay-video/blob/development/webapp/src/components/Questions.vue"
    click WS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/live/consumers.py"
    click AS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/user.py"
    click RMS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/room.py"
    click CS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/chat.py"
    click PS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/poll.py"
    click QS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/question.py"
    click ANS "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/announcement.py"
    click BBB "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/bbb.py"
    click JAN "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/live/modules/januscall.py"
    click TURN "https://github.com/fossasia/eventyay-video/blob/development/server/venueless/core/services/turn.py"

    %% Styling
    classDef frontend fill:#42b883,stroke:#333,stroke-width:2px
    classDef realtime fill:#ff7f0e,stroke:#333,stroke-width:2px
    classDef api fill:#1f77b4,stroke:#333,stroke-width:2px
    classDef service fill:#2ca02c,stroke:#333,stroke-width:2px
    classDef external fill:#d62728,stroke:#333,stroke-width:2px
    classDef database fill:#7f7f7f,stroke:#333,stroke-width:2px
    classDef storage fill:#9467bd,stroke:#333,stroke-width:2px
```
