# xplorer-io/xplorers-websitev2 architecture

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

- Interactive diagram: https://gitdiagram.com/xplorer-io/xplorers-websitev2
- Repository: https://github.com/xplorer-io/xplorers-websitev2

## Overview

Project Type: Full-stack web application built with Next.js 13+ (evidenced by the app directory structure)

##### Main Components

Frontend Layer:
- Pages (src/app/* routes)
- Components (organized by feature)
- Contexts (for state management)
- Assets (static resources)

Client-Side Services:
- Firebase Service (indicated by firebase.ts)
- API Integration (suggested by apiUrls.ts)

State Management:
- A "State Management" section showing:
- UserContext (from contexts/UserContext.tsx)
- Component-level state

Data Flow Layer:
- Interactions between:
- Frontend components
- Firebase services
- External APIs

##### Component Organization

- Accolades System
- Blog System
- Projects System
- Playlist System

##### Architectural Patterns to Highlight

- Feature-First Architecture (shown by component organization)
- Page-based Routing (Next.js App Router)
- Component Composition Pattern
- Service Layer Pattern

##### Specific Details

Top Level:
**[Next.js Application]**
- Pages Layer (src/app/*)
- Components Layer (src/components/*)
- Services Layer (src/services/*)
- Context Layer (src/contexts/*)
- Types Layer (src/types/*)

Feature Modules:
- Accolades
- Blog
- Projects
- Playlist

Each feature module should show:
- Page components
- UI components
- Data flow
- Service interactions

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Legend"
        L1[Frontend Pages]:::pages
        L2[Components]:::components
        L3[Services]:::services
        L4[Context/State]:::context
        L5[External Services]:::external
    end

    subgraph "Frontend Layer"
        Pages["Pages Layer"]:::pages
        Components["Components Layer"]:::components
        Assets["Assets"]:::components
        Providers["Application Providers"]:::components
    end

    subgraph "Feature Modules"
        subgraph "Accolades"
            AccoladesPage["Accolades Page"]:::pages
            AccoladeCard["Accolade Card"]:::components
            AccoladesBox["Accolades Box"]:::components
        end

        subgraph "Projects"
            ProjectsPage["Projects Page"]:::pages
            ProjectCard["Project Card"]:::components
            ProjectsContainer["Projects Container"]:::components
        end

        subgraph "Playlist"
            PlaylistPage["Playlist Page"]:::pages
            PlaylistCard["Playlist Card"]:::components
            PlaylistContainer["Playlist Container"]:::components
            PlaylistLayout["Playlist Layout"]:::components
        end

        subgraph "Blog"
            BlogPage["Blog Page"]:::pages
            BlogPost["Blog Post Page"]:::pages
        end
    end

    subgraph "Navigation"
        Navbar["Navbar"]:::components
        NavLinks["Nav Links"]:::components
        NavButtons["Nav Buttons"]:::components
    end

    subgraph "Services Layer"
        Firebase["Firebase Service"]:::external
        APIIntegration["API Integration"]:::services
    end

    subgraph "State Management"
        UserContext["User Context"]:::context
    end

    subgraph "Types Layer"
        Types["Type Definitions"]:::components
    end

    Pages --> AccoladesPage & ProjectsPage & PlaylistPage & BlogPage
    Components --> AccoladeCard & ProjectCard & PlaylistCard
    Components --> AccoladesBox & ProjectsContainer & PlaylistContainer
    Components --> Navbar & NavLinks & NavButtons
    UserContext -.-> Providers
    Firebase -.-> APIIntegration
    Types -.-> Components

    %% Click Events
    click Pages "https://github.com/xplorer-io/xplorers-websitev2/tree/main/src/app/*"
    click Components "https://github.com/xplorer-io/xplorers-websitev2/tree/main/src/components/*"
    click Assets "https://github.com/xplorer-io/xplorers-websitev2/tree/main/src/assets/*"
    click Providers "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/app/providers.tsx"
    click AccoladesPage "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/app/accolades/page.tsx"
    click AccoladeCard "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/AccoladeCard/index.tsx"
    click AccoladesBox "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/AccoladesBox.tsx"
    click ProjectsPage "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/app/projects/page.tsx"
    click ProjectCard "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/projects/ProjectCard.tsx"
    click ProjectsContainer "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/projects/ProjectsContainer.tsx"
    click PlaylistPage "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/app/playlist/page.tsx"
    click PlaylistCard "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/playlists/PlaylistCard.tsx"
    click PlaylistContainer "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/playlists/PlaylistsContainer.tsx"
    click PlaylistLayout "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/playlists/PlaylistsLayout.tsx"
    click BlogPage "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/app/blog/page.tsx"
    click BlogPost "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/app/blog/[id]/page.tsx"
    click Firebase "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/services/firebase.ts"
    click APIIntegration "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/types/apiUrls.ts"
    click UserContext "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/contexts/UserContext.tsx"
    click Types "https://github.com/xplorer-io/xplorers-websitev2/tree/main/src/types"
    click Navbar "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/navbar/index.tsx"
    click NavLinks "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/navbar/NavLinks.tsx"
    click NavButtons "https://github.com/xplorer-io/xplorers-websitev2/blob/main/src/components/navbar/NavButtons.tsx"

    classDef pages fill:#3498db,stroke:#2980b9,color:white
    classDef components fill:#2ecc71,stroke:#27ae60,color:white
    classDef services fill:#f1c40f,stroke:#f39c12,color:black
    classDef context fill:#9b59b6,stroke:#8e44ad,color:white
    classDef external fill:#e74c3c,stroke:#c0392b,color:white
```
