# eggsy/website architecture

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

- Interactive diagram: https://gitdiagram.com/eggsy/website
- Repository: https://github.com/eggsy/website

## Overview

##### High-Level Architecture Overview

a) Frontend Layer:
- Nuxt.js as the main framework (Static Site Generation)
- Windi CSS for styling
- TypeScript for type safety
- Vue components structure

b) External Services Layer:
- Firebase integration
- Lanyard API (Discord profile)
- Last.fm API
- GitHub API

##### Component Structure

**src/**
- layouts/
- pages/
- components/
- Blog/
- Card/
- Loaders/
- Smart/
- SkeletonLoader/

##### Data Flow Representation
Flow of data between:
- Content (Markdown files) → Nuxt Content → Pages
- External APIs → Plugin Layer → Components
- Static Assets → Build Process → Generated Site

##### Specific Implementation Details

Create subsections for:
a) Build Process:
- Nuxt.js static site generation
- TypeScript compilation
- Asset optimization

b) Integration Points:
- Firebase services (optional)
- API integrations
- Content management

##### The integration points with external services

Important Notes:
- Keep Firebase integration separate and clearly marked as optional
- Markdown-driven blog system
- Real-time data flow from Discord and Last.fm
- Build process that generates the static site

- The scalability of the component structure
- The type safety provided by TypeScript
- The clear separation of concerns in the directory structure
- The plugin-based architecture for external integrations

Tools Recommendation:
- Professional-looking components
- Easy-to-understand relationships
- Export capabilities
- Version control friendly formats

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        NuxtJS["Nuxt.js (SSG)"]
        WindiCSS["Windi CSS"]
        TypeScript["TypeScript"]
        VueComponents["Vue Components"]
    end

    subgraph Components
        Layouts["Layouts"]
        Pages["Pages"]
        BlogComp["Blog Components"]
        CardComp["Card Components"]
        IconComp["Icon Components"]
        LoadersComp["Loaders"]
        SmartComp["Smart Components"]
    end

    subgraph ExternalServices
        Firebase["Firebase"]
        LanyardAPI["Lanyard API<br/>(Discord)"]
        LastFmAPI["Last.fm API"]
        GitHubAPI["GitHub API"]
    end

    subgraph ContentManagement
        MarkdownFiles["Markdown Files"]
        NuxtContent["Nuxt Content"]
        StaticAssets["Static Assets"]
    end

    subgraph BuildProcess
        SSG["Static Site<br/>Generation"]
        TSCompile["TypeScript<br/>Compilation"]
        AssetOpt["Asset<br/>Optimization"]
    end

    %% Relationships
    NuxtJS --> Components
    WindiCSS --> Components
    TypeScript --> Components
    VueComponents --> Components

    Components --> BuildProcess
    ContentManagement --> BuildProcess
    ExternalServices --> Components

    MarkdownFiles --> NuxtContent
    NuxtContent --> Pages
    StaticAssets --> BuildProcess

    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef external fill:#90EE90,stroke:#333
    classDef content fill:#DDA0DD,stroke:#333
    classDef build fill:#FFA500,stroke:#333
    classDef component fill:#87CEEB,stroke:#333

    class Firebase,LanyardAPI,LastFmAPI,GitHubAPI external
    class MarkdownFiles,NuxtContent,StaticAssets content
    class SSG,TSCompile,AssetOpt build
    class Layouts,Pages,BlogComp,CardComp,IconComp,LoadersComp,SmartComp component

    %% Click Events
    click NuxtJS "https://github.com/eggsy/website/blob/main/nuxt.config.ts"
    click WindiCSS "https://github.com/eggsy/website/blob/main/windi.config.ts"
    click TypeScript "https://github.com/eggsy/website/blob/main/tsconfig.json"
    click Layouts "https://github.com/eggsy/website/tree/main/src/layouts/"
    click Pages "https://github.com/eggsy/website/tree/main/src/pages/"
    click BlogComp "https://github.com/eggsy/website/tree/main/src/components/Blog/"
    click CardComp "https://github.com/eggsy/website/tree/main/src/components/Card/"
    click LoadersComp "https://github.com/eggsy/website/tree/main/src/components/Loaders/"
    click SmartComp "https://github.com/eggsy/website/tree/main/src/components/Smart/"
    click Firebase "https://github.com/eggsy/website/blob/main/src/plugins/Firebase.ts"
    click LanyardAPI "https://github.com/eggsy/website/blob/main/src/plugins/Lanyard.ts"
    click LastFmAPI "https://github.com/eggsy/website/blob/main/netlify/functions/getLastFmSongs.ts"
    click GitHubAPI "https://github.com/eggsy/website/blob/main/src/types/Response/GitHub.d.ts"
    click MarkdownFiles "https://github.com/eggsy/website/tree/main/src/content/blog/"
    click StaticAssets "https://github.com/eggsy/website/tree/main/src/static/assets/"
```
