# ionutcnu/rcc architecture

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

- Interactive diagram: https://gitdiagram.com/ionutcnu/rcc
- Repository: https://github.com/ionutcnu/rcc

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Frontend Layer (Client-Side):
- Next.js Application (App Router)
- Components Structure
- Public Assets
- Styling System (Tailwind CSS)

b) Backend Layer:
- Next.js API Routes
- Firebase Integration (noted from firebaseConfig.js)

c) Authentication System:
- Login/Register functionality
- User Profile Management

- Public Assets
- Media (Images/Videos)
- Pages/Routes
- Home (/)
- Cats (/cats)
- Cat Profile (/cat-profile/[alias])
- Login (/login)
- Register (/register)
- Components
- Layouts (Header/Footer)
- Elements (CatsRelated, Particles, etc.)

- Utils
- Authentication
- Language Switching
- Interactive Features (3D, Mouse Position)

- Firebase Services
- Static Data (catsData.ts)

##### Key Relationships to Highlight

- How the authentication flow works between the login/register pages and Firebase
- Demonstrate the routing structure using Next.js 13+ App Router
- Component hierarchy and reusability
- Relationship between static data and dynamic content

##### Technical Stack Callouts

- Next.js 13+ (Framework)
- Firebase (Backend Services)
- Tailwind CSS (Styling)
- TypeScript (Programming Language)

##### Data Flow Patterns

Illustrate:
- User authentication flow
- Cat data retrieval and display
- Dynamic routing for cat profiles
- Asset loading patterns

Remember to include:
- Clear component boundaries
- Service integration points
- State management flow
- Asset delivery pipeline
- Authentication flow
- Routing structure

This will provide a comprehensive view of the application's architecture while maintaining clarity and usefulness for development team members.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        NextApp["Next.js App Router"]
        
        subgraph Pages
            Home["Home (/)"]
            Cats["/cats"]
            CatProfile["/cat-profile/[alias]"]
            Login["/login"]
            Register["/register"]
        end
        
        subgraph Components
            Layout["Layout Components"]
            Header["Header"]
            Footer["Footer"]
            Profile["Profile Dropdown"]
            Interactive["Interactive Elements"]
            Particles["Particles"]
            Spotlight["Spotlight"]
            CatComponents["Cat Components"]
        end
        
        subgraph Assets
            Images["Cat Images"]
            Videos["Cat Videos"]
        end
    end
    
    subgraph Application
        Utils["Utility Functions"]
        ThreeD["3D Tags"]
        Mouse["Mouse Position"]
        Lang["Language Switcher"]
        Auth["Authentication"]
    end
    
    subgraph Data
        Firebase["Firebase Services"]
        Config["Firebase Config"]
        CatsData["Cats Data"]
    end
    
    %% Relationships
    NextApp --> Pages
    NextApp --> Components
    Layout --> Header
    Layout --> Footer
    Header --> Profile
    Interactive --> Particles
    Interactive --> Spotlight
    
    Login --> Auth
    Register --> Auth
    Auth --> Firebase
    Config --> Firebase
    
    Cats --> CatsData
    CatProfile --> CatsData
    CatComponents --> CatsData
    
    %% Click Events
    click NextApp "https://github.com/ionutcnu/rcc/tree/master/src/app"
    click Login "https://github.com/ionutcnu/rcc/blob/master/src/app/login/page.tsx"
    click Register "https://github.com/ionutcnu/rcc/blob/master/src/app/register/page.tsx"
    click Profile "https://github.com/ionutcnu/rcc/blob/master/src/components/elements/Header/ProfileDropdown.tsx"
    click Header "https://github.com/ionutcnu/rcc/blob/master/src/components/layouts/Header.tsx"
    click Footer "https://github.com/ionutcnu/rcc/blob/master/src/components/layouts/Footer.tsx"
    click CatProfile "https://github.com/ionutcnu/rcc/blob/master/src/app/cat-profile/[alias]/page.tsx"
    click Cats "https://github.com/ionutcnu/rcc/blob/master/src/app/cats/page.tsx"
    click CatsData "https://github.com/ionutcnu/rcc/blob/master/src/app/data/catsData.ts"
    click CatComponents "https://github.com/ionutcnu/rcc/tree/master/src/components/elements/CatsRelated"
    click ThreeD "https://github.com/ionutcnu/rcc/blob/master/src/Utils/3dtag.jsx"
    click Mouse "https://github.com/ionutcnu/rcc/blob/master/src/Utils/mouse-position.ts"
    click Particles "https://github.com/ionutcnu/rcc/blob/master/src/components/elements/Particles.tsx"
    click Spotlight "https://github.com/ionutcnu/rcc/blob/master/src/components/elements/Spotlight.tsx"
    click Config "https://github.com/ionutcnu/rcc/blob/master/src/Utils/firebaseConfig.js"
    click Lang "https://github.com/ionutcnu/rcc/blob/master/src/Utils/LanguageSwitcher.js"
    click Images "https://github.com/ionutcnu/rcc/tree/master/public/Cats/Images"
    click Videos "https://github.com/ionutcnu/rcc/tree/master/public/Cats/Videos"
    
    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef page fill:#ddf1fd,stroke:#0077b6
    classDef component fill:#d3f8d3,stroke:#2d5a27
    classDef util fill:#ffe5cc,stroke:#d35400
    classDef data fill:#e6e6fa,stroke:#483d8b
    classDef asset fill:#ffd7e9,stroke:#ff69b4
    
    class NextApp,Pages default
    class Home,Login,Register,Cats,CatProfile page
    class Layout,Header,Footer,Profile,Interactive,Particles,Spotlight,CatComponents component
    class Utils,ThreeD,Mouse,Lang,Auth util
    class Firebase,Config,CatsData data
    class Images,Videos asset
    
    %% Legend
    subgraph Legend
        L1["Page"]:::page
        L2["Component"]:::component
        L3["Utility"]:::util
        L4["Data Service"]:::data
        L5["Asset"]:::asset
    end
```
