# deshmukh-aniruddha/yy-feeds architecture

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

- Interactive diagram: https://gitdiagram.com/deshmukh-aniruddha/yy-feeds
- Repository: https://github.com/deshmukh-aniruddha/yy-feeds

## Overview

##### Detailed Component Breakdown

A. Authentication Layer
- AuthContext at the top level
- To Firebase Authentication (from firebase.js)

B. Core Application Structure
Create three main columns:

1. Navigation & Search
- Navbar Component
- SearchBar Component
- SearchPopover Component

2. Content Management
- Channel Management
- ChannelGrid Component
- ChannelCard Component
- Feed Management
- FeedList Component
- FeedCard Component
- FeedNavigation Component
- Video Interface
- VideoCard Component
- VideoPlayer Component

3. Modal Systems
- AddFeedModal
- EditFeedModal
- ImportFeedModal

C. Service Layer (Bottom Section)
- YouTube API Service
- Share Service
- Firebase Service

##### Integration Points

External service integration points:
- Firebase Authentication
- YouTube API
- Sharing functionality

##### Component Relationships

Hierarchical relationship between components:
- Pages containing components
- Components using services
- Context providers scope

Specific Styling Guidelines:

##### Layer organization
- Authentication (top)
- UI Components (middle)
- Services (bottom)
- External Integration (sides)

Additional Considerations:

##### State Management Flow
- How AuthContext provides authentication state
- Component-level state management

##### Routing Structure
- Main routes:
- HomePage
- FeedPage
- LoginPage
- LearnMorePage

##### Feature Modules
- Related components:
- Feed management
- Channel management
- Video playback
- Search functionality

##### Drag and Drop Functionality
- Relationship between Draggable and Droppable components

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef service fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#f1c40f,stroke:#f39c12,color:white
    classDef context fill:#9b59b6,stroke:#8e44ad,color:white
    classDef page fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef modal fill:#e74c3c,stroke:#c0392b,color:white

    %% Authentication Layer
    subgraph Auth
        AC[AuthContext]
        FB[Firebase Auth]
    end
    click AC "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/contexts/AuthContext.jsx"
    click FB "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/lib/firebase.js"

    %% Navigation & Search
    subgraph Navigation
        NB[Navbar]
        SB[SearchBar]
        SP[SearchPopover]
    end
    click NB "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/Navbar.jsx"
    click SB "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/SearchBar.jsx"
    click SP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/SearchPopover.jsx"

    %% Content Management
    subgraph Content
        subgraph Channels
            CG[ChannelGrid]
            CC[ChannelCard]
        end
        
        subgraph Feeds
            FL[FeedList]
            FC[FeedCard]
            FN[FeedNavigation]
        end
        
        subgraph Videos
            VC[VideoCard]
            VP[VideoPlayer]
        end
    end
    click CG "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/ChannelGrid.jsx"
    click CC "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/ChannelCard.jsx"
    click FL "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/FeedList.jsx"
    click FC "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/FeedCard.jsx"
    click FN "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/FeedNavigation.jsx"
    click VC "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/VideoCard.jsx"
    click VP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/VideoPlayer.jsx"

    %% Modal Systems
    subgraph Modals
        AFM[AddFeedModal]
        EFM[EditFeedModal]
        IFM[ImportFeedModal]
    end
    click AFM "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/AddFeedModal.jsx"
    click EFM "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/EditFeedModal.jsx"
    click IFM "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/ImportFeedModal.jsx"

    %% Pages
    subgraph Pages
        HP[HomePage]
        FP[FeedPage]
        LP[LoginPage]
        LMP[LearnMorePage]
    end
    click HP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/pages/HomePage.jsx"
    click FP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/pages/FeedPage.jsx"
    click LP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/pages/LoginPage.jsx"
    click LMP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/pages/LearnMorePage.jsx"

    %% Service Layer
    subgraph Services
        YT[YouTube API]
        SS[Share Service]
    end
    click YT "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/services/youtubeApi.js"
    click SS "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/services/shareService.js"

    %% Drag and Drop
    subgraph DragDrop
        DG[Draggable]
        DP[Droppable]
    end
    click DG "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/Draggable.jsx"
    click DP "https://github.com/deshmukh-aniruddha/YY-Feeds/blob/main/src/src/components/Droppable.jsx"

    %% Relationships
    AC --> NB
    AC --> Pages
    NB --> SB
    SB --> SP
    Pages --> Content
    Content --> Modals
    Content --> Services
    DragDrop --> Content

    %% Style Applications
    class AC,FB context
    class NB,SB,SP frontend
    class CG,CC,FL,FC,FN,VC,VP frontend
    class AFM,EFM,IFM modal
    class HP,FP,LP,LMP page
    class YT,SS service
    class DG,DP frontend
```
