# rawkodeacademy/rawkodeacademy architecture

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

- Interactive diagram: https://gitdiagram.com/rawkodeacademy/rawkodeacademy
- Repository: https://github.com/rawkodeacademy/rawkodeacademy

## Overview

##### Main Components

a. Platform Services (Core Domain):
- A microservices architecture with the following services:
- Videos Service
- Episodes Service
- Shows Service
- People/Biographies Service
- Technologies Service
- Events Service (RSVP)
- Casting Credits Service
- Chapters Service
- Video Likes Service

b. Infrastructure Layer:
- Kubernetes Platform (indicated by infrastructure/kubernetes-platform)
- CloudFlare Workers (for edge computing)
- DNS Management System
- Authentication System (Zitadel)
- Database Layer (PostgreSQL via CloudNative PG)

c. Frontend Applications:
- Rawkode Academy Website
- Rawkode Studio
- Various domain-specific sites (rawkode.chat, rawkode.link, etc.)

##### Relationships and Data Flow

- API interactions between services
- Event-driven communication (indicated by the read-model/write-model pattern)
- Authentication flows
- Content delivery paths

##### External Integrations
- YouTube Integration (youtube-scraper)
- Zulip Chat Platform
- GitHub Integration
- Teleport for access management
- Flipt for feature management

##### Architectural Patterns to Highlight

- CQRS Pattern (shown by read-model/write-model separation)
- Event-Driven Architecture
- Microservices Architecture
- Edge Computing (CloudFlare Workers)
- Infrastructure as Code (using CDK)

##### Additional Elements

Sections for:
- Monitoring/Observability
- Security boundaries
- Data persistence layers
- Content delivery networks
- Development tooling

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef frontend fill:#9370DB,stroke:#333,stroke-width:2px
    classDef service fill:#4682B4,stroke:#333,stroke-width:2px
    classDef infrastructure fill:#3CB371,stroke:#333,stroke-width:2px
    classDef external fill:#FFA500,stroke:#333,stroke-width:2px
    classDef database fill:#708090,stroke:#333,stroke-width:2px
    classDef security fill:#DC143C,stroke:#333,stroke-width:2px

    %% Frontend Layer
    Website["Rawkode Academy Website"]:::frontend
    Studio["Rawkode Studio"]:::frontend
    click Website "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/website"
    click Studio "https://github.com/RawkodeAcademy/RawkodeAcademy/blob/main/projects/rawkode.studio"

    %% Core Services Layer
    subgraph Services
        Videos["Videos Service"]:::service
        Episodes["Episodes Service"]:::service
        Shows["Shows Service"]:::service
        People["People/Biographies Service"]:::service
        Tech["Technologies Service"]:::service
        Events["Events Service"]:::service
        Casting["Casting Credits Service"]:::service
        Chapters["Chapters Service"]:::service
        VideoLikes["Video Likes Service"]:::service
        Image["Image Service"]:::service
        RPC["RPC Service"]:::service

        click Videos "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/videos"
        click Episodes "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/episodes"
        click Shows "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/shows"
        click People "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/people-biographies"
        click Tech "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/technologies"
        click Events "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/rsvp-service"
        click Casting "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/casting-credits"
        click Chapters "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/chapters"
        click VideoLikes "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/video-likes"
        click Image "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/image-service"
        click RPC "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/rpc"
    end

    %% External Integrations
    YouTube["YouTube Integration"]:::external
    Zulip["Zulip Chat Platform"]:::external
    click YouTube "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/platform/youtube-scraper"
    click Zulip "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/community/zulip"

    %% Infrastructure Layer
    subgraph Infrastructure
        K8s["Kubernetes Platform"]:::infrastructure
        DNS["DNS Management"]:::infrastructure
        Auth["Authentication System\n(Zitadel)"]:::security
        DB[(PostgreSQL\nCloudNative PG)]:::database
        Workers["CloudFlare Workers"]:::infrastructure

        click K8s "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/infrastructure/kubernetes-platform"
        click DNS "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/infrastructure/dns"
        click Auth "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/infrastructure/zitadel"
        click DB "https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode.academy/infrastructure/cloudnative-pg"
    end

    %% Relationships
    Website --> Auth
    Studio --> Auth
    Auth --> Services
    Services --> DB
    YouTube --> Videos
    YouTube --> Episodes
    Services --> Workers
    Workers --> Website
    Workers --> Studio
    Zulip --> Events

    %% Legend
    subgraph Legend
        F["Frontend"]:::frontend
        S["Service"]:::service
        I["Infrastructure"]:::infrastructure
        E["External Integration"]:::external
        D[(Database)]:::database
        SEC["Security"]:::security
    end
```
