# ktsierra/novaedgetech_web architecture

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

- Interactive diagram: https://gitdiagram.com/ktsierra/novaedgetech_web
- Repository: https://github.com/ktsierra/novaedgetech_web

## Overview

##### Project Type and Purpose
- This project is a visually engaging portfolio website that combines classic UI components (like About, Contact, Projects, and Team) with an immersive, interactive 3D galaxy experience.
- The README highlights that it is built with React, Three.js, and React Three Fiber. The galaxy rendering is central to the user experience.

##### Analyzing the File Structure
- Top-Level Files/Folders:
- Root-level files like index.html, package.json, and configuration files indicate that this is a modern, bundled web application.
- The “api” folder (with at least one file, contact.js) suggests there is a minimal backend or API endpoint to process contact form submissions or similar functionality.
- The “src” folder contains the bulk of the application code:
◦ Components: Divided into multiple directories (About, Contact, Projects, Team, SidePanel, Header, etc.) to handle different sections of the portfolio. Note that each section even supports desktop and mobile variants, which points to a responsive design strategy.
◦ Galaxy-Related Elements: The “galaxy” folder contains files like CameraAnimation.tsx, Galaxy.tsx, GalaxyButton.tsx, Haze.tsx, RenderPipeline.tsx, Scene.tsx, and Stars.tsx. This indicates a dedicated sub-system for managing the 3D scene.
◦ Context: The “context” folder provides global state management for cameras, galaxy configurations, loading statuses, and stacking (likely for 3D element layering), which is crucial to coordinating state between the 3D interface and the UI components.
◦ Hooks: Custom hooks (e.g., useCamera, useGalaxyRef, useLoading, useStacked) are employed for managing component behavior and interfacing with context.
◦ Constants, Utils, and Shaders: These support configuration, mathematical operations, and graphical effects, thus playing a significant role in rendering the dynamic aspects of the galaxy.
- Additional Configuration: TypeScript configurations, ESLint, and testing files give insights into code quality, type safety, and testing strategies.

##### Main Components
- Frontend/UI Components:
- Header, About, Contact (with ContactForm), PresentationCard, Projects, Team, SidePanel – each representing distinct sections of the portfolio.
- 3D and Visualization Layer:
- Galaxy Components in the “galaxy” folder (Galaxy.tsx, CameraAnimation.tsx, Haze.tsx, RenderPipeline.tsx, etc.) to manage the 3D environment.
- Shaders (CompositionShader.ts) contribute to the visual effects.
- Global State Management:
- Context Providers (CameraContext, GalaxyContext, LoadingContext, StackedContext) that wrap the application and provide data handling for UI and 3D scene interactions.
- API Integration:
- The “api” folder, though minimal, indicates backend functions like contact form handling.

##### Relationships and Interactions
- The central App component (App.tsx) orchestrates the overall rendering by combining the UI and 3D scenes along with context providers.
- Data flows:
- Global contexts are used by UI components and the galaxy visualization components to share state (e.g., camera movements, loading state).
- API interactions (e.g., using the contact.js endpoint) are triggered from the Contact component.
- External Libraries:
- React, Three.js, and React Three Fiber are the critical external dependencies handling the UI and rendering the 3D scene.

##### Architectural Patterns/Design Principles
- Component-based design: Each UI section or visual element is encapsulated in its own component (often with separate mobile/desktop styling).
- Separation of concerns: Distinct folders for UI components, 3D rendering (“galaxy”), and state management (contexts and hooks) promote modularity.
- Responsive design: The presence of mobile and desktop specific files for each section indicates adaptive styling.
- Global State Management: Contexts are used to synchronize state across various elements (especially between static UI and interactive 3D elements).

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["App Component"]:::app

    subgraph "UI Components"
        H["Header"]
        AB["About (Desktop/Mobile)"]
        C["Contact"]
        CF["ContactForm"]
        PC["PresentationCard"]
        P["Projects"]
        T["Team"]
        SP["SidePanel"]
    end

    subgraph "3D Visualization"
        G["Galaxy"]
        CA["CameraAnimation"]
        HZ["Haze"]
        RP["RenderPipeline"]
        SC["Scene"]
        ST["Stars"]
        GB["GalaxyButton"]
        CS["CompositionShader"]
    end

    subgraph "Global State Management"
        CC["CameraContext"]
        GC["GalaxyContext"]
        LC["LoadingContext"]
        SCX["StackedContext"]
    end

    subgraph "API Integration"
        API["Contact API Endpoint"]
    end

    subgraph "Support & Utilities"
        UC["useCamera"]
        UGR["useGalaxyRef"]
        UL["useLoading"]
        US["useStacked"]
        CONST["Constants"]
        UTIL["Utility Functions"]
    end

    subgraph "External Libraries"
        R["React"]
        TJS["Three.js"]
        RTF["React Three Fiber"]
    end

    %% Connections
    A -->|"renders"| H
    A -->|"renders"| AB
    A -->|"renders"| C
    A -->|"renders"| PC
    A -->|"renders"| P
    A -->|"renders"| T
    A -->|"renders"| SP
    A -->|"renders"| G
    A -->|"manages"| CA
    A -->|"applies"| HZ
    A -->|"applies"| RP
    A -->|"manages"| SC
    A -->|"generates"| ST
    A -->|"triggers"| GB
    A -->|"applies"| CS

    %% Global State supports UI and 3D Visualization
    CC --- H
    CC --- AB
    GC --- G
    GC --- CA
    LC --- RP
    SCX --- ST

    %% UI Contact triggers API call
    C -->|"submitsForm"| API

    %% Support & Utilities feed into UI and 3D components
    UC --- H
    UC --- G
    UGR --- G
    UL --- C
    US --- ST
    CONST --- A
    UTIL --- A

    %% External Libraries support the App Component
    R --- A
    TJS --- A
    RTF --- A

    %% Click Events for Frontend/UI Components
    click H "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/Header.tsx"
    click AB "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/About/About.tsx"
    click C "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/Contact/Contact.tsx"
    click CF "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/Contact/ContactForm.tsx"
    click PC "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/PresentationCard.tsx"
    click P "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/Projects/Projects.tsx"
    click T "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/Team/Team.tsx"
    click SP "https://github.com/ktsierra/novaedgetech_web/blob/main/src/components/SidePanel.tsx"

    %% Click Events for 3D and Visualization Layer
    click G "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/Galaxy.tsx"
    click CA "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/CameraAnimation.tsx"
    click HZ "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/Haze.tsx"
    click RP "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/RenderPipeline.tsx"
    click SC "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/Scene.tsx"
    click ST "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/Stars.tsx"
    click GB "https://github.com/ktsierra/novaedgetech_web/blob/main/src/galaxy/GalaxyButton.tsx"
    click CS "https://github.com/ktsierra/novaedgetech_web/blob/main/src/shaders/CompositionShader.ts"

    %% Click Events for Global State Management
    click CC "https://github.com/ktsierra/novaedgetech_web/blob/main/src/context/CameraContext.tsx"
    click GC "https://github.com/ktsierra/novaedgetech_web/blob/main/src/context/GalaxyContext.tsx"
    click LC "https://github.com/ktsierra/novaedgetech_web/blob/main/src/context/LoadingContext.tsx"
    click SCX "https://github.com/ktsierra/novaedgetech_web/blob/main/src/context/StackedContext.tsx"

    %% Click Event for API Integration
    click API "https://github.com/ktsierra/novaedgetech_web/blob/main/api/contact.js"

    %% Click Events for Support & Utilities
    click UC "https://github.com/ktsierra/novaedgetech_web/blob/main/src/hooks/useCamera.tsx"
    click UGR "https://github.com/ktsierra/novaedgetech_web/blob/main/src/hooks/useGalaxyRef.tsx"
    click UL "https://github.com/ktsierra/novaedgetech_web/blob/main/src/hooks/useLoading.tsx"
    click US "https://github.com/ktsierra/novaedgetech_web/blob/main/src/hooks/useStacked.tsx"
    click CONST "https://github.com/ktsierra/novaedgetech_web/tree/main/src/constants"
    click UTIL "https://github.com/ktsierra/novaedgetech_web/tree/main/src/utils"

    %% Class Definitions for Visual Styling
    class A app
    class H,AB,C,CF,PC,P,T,SP ui
    class G,CA,HZ,RP,SC,ST,GB,CS three
    class CC,GC,LC,SCX context
    class API api
    class UC,UGR,UL,US,CONST,UTIL util
    class R,TJS,RTF external
```
