# trylastsky/bugbusters_vizitcard architecture

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

- Interactive diagram: https://gitdiagram.com/trylastsky/bugbusters_vizitcard
- Repository: https://github.com/trylastsky/bugbusters_vizitcard

## Overview

##### Project Type and Purpose
- This is a single-page application (SPA) written in React + TypeScript.
- It serves as a personal “vizit card”/portfolio site (“Bug Busters”), delivering static content and UI components to the user’s browser.
- There is no custom backend or database—just static assets, JSON files, and frontend code.

##### File Structure
- Top-level config and build files:
– package.json / package-lock.json (npm dependencies)
– vite.config.ts (dev server & build pipeline)
– tsconfig*.json (TypeScript configuration)
– eslint.config.js (linting)
- Public entry point: index.html
- Source code under src/:
– src/main.tsx → mounts React into index.html
– src/app/App.tsx (+ App.css) → root component
– src/components/… → reusable UI components (NavBar, Footer, PopUpInfoCase, ScrollToTopButton)
– src/pages/MainPage/… → page-level components (AboutUI, Contacts, ProjectsUI, ShowCase, VizitCard) and nested subcomponents

##### README
- Confirms prerequisites (Node.js, Git)
- Standard npm install + npm run dev workflow—no server-side logic.

A. Main Components
1. Developer Environment
– Node.js & npm
– Vite Dev Server / Build Pipeline
2. Static Hosting / CDN (for production)
3. Browser (Client)
– index.html
– JS bundle (React + TypeScript → JavaScript)
– CSS assets
– JSON data imports
4. React App Modules
– App Shell (App.tsx)
– Layout components (NavBar, Footer, ScrollToTopButton)
– Page container (MainPage)
– Feature components (AboutUI, Contacts, ProjectsUI, ShowCase, VizitCard)

B. Relationships & Data Flow
- Developer runs `npm run dev` → Vite dev server serves index.html + static assets → Browser fetches and executes.
- Within the browser, React bootstraps at `
`.
- App.tsx orchestrates Layout (NavBar + MainPage + Footer).
- MainPage imports JSON data (via ES modules) to feed child components (e.g., ProjectsUI reads data.json).
- User interactions (clicks, scroll) propagate through event handlers in component tree (e.g., PopUpInfoCase, ScrollToTopButton).

C. Architectural Patterns & Principles
- Component-based architecture (React)
- Separation of concerns:
– Container/page components vs. presentational UI components
– Static data (JSON) imported at build time
- Build pipeline: Vite handles hot-reload, code splitting, asset bundling

D. Key Technologies & Frameworks
- React 18 + React DOM
- TypeScript
- Vite (dev server and bundler)
- CSS Modules or plain CSS files per component
- npm for dependency management

##### Final Recommendations
- Be detailed in capturing the component hierarchy—don’t lump all UI under “frontend.”
- Call out the build step (Vite) separately from the runtime.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        direction TB
        pkg["package.json"]:::build
        lock["package-lock.json"]:::build
        tsbase["tsconfig.json"]:::build
        tsapp["tsconfig.app.json"]:::build
        tsnode["tsconfig.node.json"]:::build
        eslint["eslint.config.js"]:::build
    end

    %% Build & Dev Server
    subgraph "Build & Dev Server (Vite)"
        direction TB
        vite["vite.config.ts"]:::build
    end

    %% Browser Runtime
    subgraph "Browser (Client)" 
        direction TB
        html["index.html"]:::browser
        subgraph "React Bootstrap & Global Styles"
            direction TB
            mainTS["src/main.tsx"]:::react
            cssGlobal["src/index.css"]:::react
        end
    end

    %% React App Shell
    subgraph "App Shell"
        direction TB
        app["src/app/App.tsx"]:::react
        appcss["src/app/App.css"]:::react
    end

    %% Layout Components
    subgraph "Layout Components"
        direction TB
        nav["NavBar"]:::react
        footer["Footer"]:::react
        scrollBtn["ScrollToTopButton"]:::react
        popup["PopUpInfoCase"]:::react
    end

    %% Page Container
    subgraph "Page Container (MainPage)"
        direction TB
        mainPage["src/pages/MainPage/MainPage.tsx"]:::react
        mainPageCss["src/pages/MainPage/MainPage.css"]:::react
    end

    %% Feature Components under MainPage
    subgraph "Feature Components"
        direction TB
        subgraph AboutUI["AboutUI"]
            direction TB
            about["src/pages/MainPage/components/AboutUI/AboutUI.tsx"]:::react
            aboutCss["AboutUI.css"]:::react
            subgraph "AboutUI Children"
                direction TB
                leftbar["Leftbar"]:::react
                leftbarCss["Leftbar.css"]:::react
                mainComp["Main"]:::react
                mainCss["Main.css"]:::react
                rightbar["Rightbar"]:::react
                rightbarCss["Rightbar.css"]:::react
            end
        end
        contacts["src/pages/MainPage/components/Contacts/Contacts.tsx"]:::react
        contactsCss["Contacts.css"]:::react
        subgraph ProjectsUI["ProjectsUI"]
            direction TB
            projects["src/pages/MainPage/components/ProjectsUI/ProjectsUI.tsx"]:::react
            projectsCss["ProjectsUI.css"]:::react
            modal["Modal"]:::react
            modalCss["Modal.css"]:::react
        end
        subgraph ShowCase["ShowCase"]
            direction TB
            showcase["src/pages/MainPage/components/ShowCase/ShowCase.tsx"]:::react
            showcaseCss["ShowCase.css"]:::react
            dataShow["data.json"]:::data
        end
        subgraph VizitCard["VizitCard"]
            direction TB
            vizit["src/pages/MainPage/components/VizitCard/VizitCard.tsx"]:::react
            vizitCss["VizitCard.css"]:::react
            dataViz["VizitCard.json"]:::data
            btn["Button"]:::react
            btnCss["Button.css"]:::react
            observer["WithIntersectionObserver"]:::react
        end
    end

    %% Static Assets & Data
    subgraph "Static Assets & Data"
        direction TB
        icons["src/assets/icons"]:::asset
        assetsProj["src/assets/projects"]:::asset
    end

    %% Connections
    pkg --> vite
    lock --> vite
    tsbase --> vite
    tsapp --> vite
    tsnode --> vite
    eslint --> vite

    vite --> html
    html --> mainTS
    html --> cssGlobal

    mainTS --> app
    cssGlobal --> app

    app --> nav
    app --> mainPage
    app --> footer

    nav --> scrollBtn
    nav --> popup

    mainPage --> about
    mainPage --> contacts
    mainPage --> projects
    mainPage --> showcase
    mainPage --> vizit

    about --> leftbar
    about --> mainComp
    about --> rightbar

    projects --> modal

    showcase --> dataShow
    vizit --> dataViz
    vizit --> btn
    vizit --> observer

    icons --> about
    assetsProj --> showcase

    %% Click Events
    click pkg "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/package.json"
    click lock "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/package-lock.json"
    click tsbase "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/tsconfig.json"
    click tsapp "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/tsconfig.app.json"
    click tsnode "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/tsconfig.node.json"
    click eslint "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/eslint.config.js"
    click vite "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/vite.config.ts"
    click html "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/index.html"
    click mainTS "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/main.tsx"
    click cssGlobal "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/index.css"
    click app "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/app/App.tsx"
    click appcss "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/app/App.css"
    click nav "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/components/NavBar/NavBar.tsx"
    click footer "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/components/Footer/Footer.tsx"
    click scrollBtn "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/components/ScrollToTopButton/ScrollToTopButton.tsx"
    click popup "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/components/PopUpInfoCase/PopUpInfoCase.tsx"
    click mainPage "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/MainPage.tsx"
    click about "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/AboutUI/AboutUI.tsx"
    click leftbar "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/AboutUI/components/Leftbar/Leftbar.tsx"
    click mainComp "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/AboutUI/components/Main/Main.tsx"
    click rightbar "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/AboutUI/components/Rightbar/Rightbar.tsx"
    click contacts "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/Contacts/Contacts.tsx"
    click projects "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/ProjectsUI/ProjectsUI.tsx"
    click modal "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/ProjectsUI/Modal/Modal.tsx"
    click showcase "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/ShowCase/ShowCase.tsx"
    click dataShow "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/ShowCase/data.json"
    click vizit "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/VizitCard/VizitCard.tsx"
    click dataViz "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/VizitCard/VizitCard.json"
    click btn "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/VizitCard/components/Button/Button.tsx"
    click observer "https://github.com/trylastsky/bugbusters_vizitcard/blob/main/src/pages/MainPage/components/VizitCard/components/WithInteractionObserver/WithIntersectionObserver.tsx"
    click icons "https://github.com/trylastsky/bugbusters_vizitcard/tree/main/src/assets/icons"
    click assetsProj "https://github.com/trylastsky/bugbusters_vizitcard/tree/main/src/assets/projects"

    %% Styles
    classDef build fill:#e0f7e9,stroke:#2d8f5f,stroke-width:1px
    classDef browser fill:#e3f2fd,stroke:#1976d2,stroke-width:1px
    classDef react fill:#f3e5f5,stroke:#8e24aa,stroke-width:1px
    classDef data fill:#fff3e0,stroke:#fb8c00,stroke-width:1px
    classDef asset fill:#eceff1,stroke:#607d8b,stroke-width:1px
```
