# rwaddin/shabib architecture

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

- Interactive diagram: https://gitdiagram.com/rwaddin/shabib
- Repository: https://github.com/rwaddin/shabib

## Overview

##### Project Type and Purpose
- This is a Nuxt.js–based universal (SSR/SSG) Vue.js application. It delivers a static or server-rendered website, hosted via Firebase. There is no separate “backend” code in this repo; content is pre-rendered or served by Nuxt’s Node server and ultimately published to Firebase Hosting.

##### Key File-Structure Analysis
- Top-level configuration:
- nuxt.config.js – central Nuxt configuration (routing mode, modules, plugins, build settings)
- firebase.json & .firebaserc – Firebase Hosting configuration
- package.json & package-lock.json – NPM scripts, dependencies
- Directories:
- pages/ – Vue views; automatically become routes
- components/ – reusable Vue components (Dad.vue, Mom.vue, etc.)
- assets/ – uncompiled static assets (images, styles)
- static/ – static files mapped 1:1 to site root
- store/ – Vuex store modules for global state
- (optional) layouts/, plugins/ – not present but referenced in README

##### Architectural Patterns
- Component-based UI: pages orchestrate layouts and import components
- Vuex for centralized state management
- SSR/SSG pipeline: Nuxt generates HTML on the server or at build time
- Deployment pipeline: NPM scripts → build/generate → Firebase deploy

##### Main Components & Interactions
a. Developer Environment
- Node.js + NPM
- Source files (pages/, components/, store/, assets/, static/)
- nuxt.config.js
b. Build & Runtime Server
- Nuxt Dev Server (npm run dev)
- Nuxt Build & Generate (npm run build → npm run generate)
c. Output Artifacts
- Generated “dist” folder (pre-rendered HTML/CSS/JS)
d. Hosting & CDN
- Firebase Hosting serves static & SSR endpoints
- Optional Cloud Functions if SSR mode is remote (not present here)
e. Client Browser
- Fetches HTML/CSS/JS from Firebase via CDN
- Executes Vue hydration; interacts with Vuex and backend APIs (if any)

- How pages import components and access Vuex store
- Where assets and static files fit (images, fonts, robots.txt)

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Developer Workstation"
        DEV["Node.js + NPM"]:::build
        NPM["package.json & package-lock.json"]:::source
        NUXT_CFG["nuxt.config.js"]:::source
        FBCONFIG["firebase.json & .firebaserc"]:::source
        PAGES["pages/"]:::source
        COMPONENTS["components/"]:::source
        ASSETS["assets/"]:::source
        STATIC["static/"]:::source
        STORE["store/"]:::source
        METADATA[".editorconfig, .gitignore, README.md"]:::source
    end

    subgraph "Build & Runtime Phase"
        DEV -->|install & scripts| NPM
        NPM -->|uses| NUXT_CFG
        NPM -->|uses| FBCONFIG
        PAGES -->|imports| SSR
        COMPONENTS -->|imports| SSR
        STORE -->|imports| SSR
        ASSETS -->|includes| SSR
        STATIC -->|includes| SSR

        DEV -->|npm run dev| SSR["Nuxt Dev Server"]:::build
        DEV -->|npm run build| BUILD["Nuxt Build"]:::build
        BUILD -->|npm run generate| GEN["Nuxt Generate"]:::build
        GEN -->|outputs| DIST["dist/"]:::build
    end

    subgraph "Deployment Phase"
        DIST -->|firebase deploy| HOST["Firebase Hosting (CDN)"]:::hosting
    end

    HOST -->|serves HTML/CSS/JS| CLIENT["Client Browser"]:::client
    SSR -->|SSR responses| CLIENT

    classDef source fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef build fill:#d4edda,stroke:#333,stroke-width:1px
    classDef hosting fill:#ffe5cc,stroke:#333,stroke-width:1px
    classDef client fill:#e5ccff,stroke:#333,stroke-width:1px

    click NUXT_CFG "https://github.com/rwaddin/shabib/blob/main/nuxt.config.js"
    click FBCONFIG "https://github.com/rwaddin/shabib/blob/main/firebase.json"
    click FBCONFIG "https://github.com/rwaddin/shabib/blob/main/.firebaserc"
    click NPM "https://github.com/rwaddin/shabib/blob/main/package.json"
    click PAGES "https://github.com/rwaddin/shabib/tree/main/pages/"
    click COMPONENTS "https://github.com/rwaddin/shabib/tree/main/components/"
    click ASSETS "https://github.com/rwaddin/shabib/tree/main/assets/"
    click STATIC "https://github.com/rwaddin/shabib/tree/main/static/"
    click STORE "https://github.com/rwaddin/shabib/tree/main/store/"
    click METADATA "https://github.com/rwaddin/shabib/blob/main/README.md"
```
