# pradhunyagawande01/narinexus architecture

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

- Interactive diagram: https://gitdiagram.com/pradhunyagawande01/narinexus
- Repository: https://github.com/pradhunyagawande01/narinexus

## Overview

##### Project type and purpose
- This is a single‐page frontend application built with React, bundled by Vite, with HMR (Hot Module Replacement).
- No backend or database components are present; the focus is on the UI component hierarchy, build toolchain, and static asset delivery.

##### File structure
- Top‐level files:
- index.html – the host HTML
- vite.config.js – Vite build/dev server config
- package.json & lock – NPM dependencies and scripts
- Directories:
- public/ – static assets (images, favicon, etc.) served directly
- src/ – application source
– main.jsx – entry point that mounts React into index.html
– App.jsx & App.css – root component and styling
– components/ – reusable UI pieces (buttons, cards, layouts, navbar, footer, backgrounds)
– pages/ – route‐mapped views (Home, About, Contact, Programs, etc.)
– lib/utils.jsx – utility functions

##### Incorporate README insights
- Uses Vite + @vitejs/plugin-react for Fast Refresh
- ESLint configured via eslint.config.js
- Designed for easy extension to TypeScript/ts‐eslint

##### Main components
a. Browser (client)
b. Dev & build tool: Vite (dev server + bundler)
c. Application code:
- Entry module (main.jsx)
- Root component (App.jsx)
- Layout components (Navbar, Footer, Layout)
- Page components (Home, About, Events…)
- UI primitives (Button, Card, GeometricBackground…)
- Utility library (utils.jsx)
d. Static asset store (public/img)
e. Package manager / Scripts (npm run dev, build, serve)

##### Relationships & interactions
- Browser ←→ Vite Dev Server (HTTP + WebSocket for HMR)
- Vite processes modules:
- JSX & CSS → transforms via plugin‐react → serves to browser
- public/ assets → copied verbatim
- main.jsx bootstraps React into the DOM container in index.html
- App.jsx uses Layout to wrap page components, passes props to UI components
- Utility functions imported by components as needed

##### Architectural patterns & design principles
- Single‐Page Application (SPA) with client‐side routing (likely React Router)
- Component‐based UI (atomic/compound components)
- Separation of concerns:
- public/ for static, src/ for code
- components/ for reusable pieces, pages/ for routes
- Hot Module Replacement for rapid developer feedback

##### Detail
- Directory’s role (components vs pages vs lib vs public)
- Flow of code through Vite into the browser DOM
- Development vs production build paths

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser Client
    Browser["Browser (Client)"]:::browser

    %% Vite Toolchain
    subgraph "Vite Toolchain"
        direction TB
        ViteDev["Vite Dev Server"]:::tooling
        ViteConfig["vite.config.js"]:::tooling
        ESLintConfig["eslint.config.js"]:::tooling
        NPMScripts["package.json"]:::tooling
        Bundler["Bundler → dist/"]:::tooling
    end

    %% Application Code
    subgraph "Application Code"
        direction TB

        subgraph "Entry & Router"
            direction TB
            HostHTML["index.html"]:::code
            MainJS["main.jsx"]:::code
        end

        subgraph "App & Styles"
            direction TB
            AppComp["App.jsx"]:::code
            AppCSS["App.css"]:::code
            IndexCSS["index.css"]:::code
        end

        subgraph "Layout & Shared Components"
            direction TB
            LayoutComp["Layout.jsx"]:::code
            NavbarComp["Navbar.jsx"]:::code
            FooterComp["Footer.jsx"]:::code
            ButtonComp["Button.jsx"]:::code
            CardComp["Card.jsx"]:::code
            BgBoxComp["BgBox.jsx"]:::code
            GeoBg1["GeometricBackground.jsx"]:::code
            GeoBg2["GeometricBackground2.jsx"]:::code
            GeoBg3["GeometricBackground3.jsx"]:::code
            HeroHeading["HeroHeading.jsx"]:::code
            LogoComp["Logo.jsx"]:::code
            SectionTitle["SectionTitle.jsx"]:::code
            Testimonial["TestimonialCard.jsx"]:::code
        end

        subgraph "Pages Layer"
            direction TB
            HomePage["Home.jsx"]:::code
            AboutPage["About.jsx"]:::code
            ContactPage["Contact.jsx"]:::code
            EventsPage["Events.jsx"]:::code
            FaqPage["Faq.jsx"]:::code
            InvolvedPage["GetInvolved.jsx"]:::code
            InitiativesPage["Initiatives.jsx"]:::code
            ProgramsPage["Programs.jsx"]:::code
            ResourcesPage["Resources.jsx"]:::code
            StoriesPage["Stories.jsx"]:::code
            SuccessStories["SuccessStories.jsx"]:::code
            TeamPage["Team.jsx"]:::code
        end

        subgraph "Utilities & Assets"
            direction TB
            Utils["utils.jsx"]:::code
            PublicAssets["public/img"]:::assets
        end
    end

    %% Connections
    Browser -->|HTTP + WS| ViteDev
    ViteDev -->|serves bundle & assets| Browser
    ViteDev -->|uses config| ViteConfig
    ViteDev -->|linting via| ESLintConfig
    ViteDev -->|npm scripts| NPMScripts
    ViteDev --> Bundler

    Bundler -->|outputs| PublicAssets
    Bundler --> Browser

    HostHTML --> MainJS
    MainJS --> AppComp
    AppComp --> AppCSS
    AppComp --> IndexCSS
    AppComp --> LayoutComp
    AppComp --> HomePage
    AppComp --> AboutPage
    AppComp --> ContactPage
    AppComp --> EventsPage
    AppComp --> FaqPage
    AppComp --> InvolvedPage
    AppComp --> InitiativesPage
    AppComp --> ProgramsPage
    AppComp --> ResourcesPage
    AppComp --> StoriesPage
    AppComp --> SuccessStories
    AppComp --> TeamPage

    LayoutComp --> NavbarComp
    LayoutComp --> FooterComp

    LayoutComp --> ButtonComp
    LayoutComp --> CardComp
    LayoutComp --> BgBoxComp
    LayoutComp --> GeoBg1
    LayoutComp --> GeoBg2
    LayoutComp --> GeoBg3
    LayoutComp --> HeroHeading
    LayoutComp --> LogoComp
    LayoutComp --> SectionTitle
    LayoutComp --> Testimonial

    LayoutComp --> Utils
    ButtonComp --> Utils
    CardComp --> Utils
    BgBoxComp --> Utils
    GeoBg1 --> Utils
    GeoBg2 --> Utils
    GeoBg3 --> Utils
    HeroHeading --> Utils
    LogoComp --> Utils
    SectionTitle --> Utils
    Testimonial --> Utils

    HomePage --> Utils
    AboutPage --> Utils
    ContactPage --> Utils
    EventsPage --> Utils
    FaqPage --> Utils
    InvolvedPage --> Utils
    InitiativesPage --> Utils
    ProgramsPage --> Utils
    ResourcesPage --> Utils
    StoriesPage --> Utils
    SuccessStories --> Utils
    TeamPage --> Utils

    %% Click Events
    click ViteConfig "https://github.com/pradhunyagawande01/narinexus/blob/main/vite.config.js"
    click ESLintConfig "https://github.com/pradhunyagawande01/narinexus/blob/main/eslint.config.js"
    click NPMScripts "https://github.com/pradhunyagawande01/narinexus/blob/main/package.json"
    click HostHTML "https://github.com/pradhunyagawande01/narinexus/blob/main/index.html"
    click PublicAssets "https://github.com/pradhunyagawande01/narinexus/tree/main/public/img/"
    click MainJS "https://github.com/pradhunyagawande01/narinexus/blob/main/src/main.jsx"
    click AppComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/App.jsx"
    click AppCSS "https://github.com/pradhunyagawande01/narinexus/blob/main/src/App.css"
    click IndexCSS "https://github.com/pradhunyagawande01/narinexus/blob/main/src/index.css"
    click Utils "https://github.com/pradhunyagawande01/narinexus/blob/main/src/lib/utils.jsx"
    click LayoutComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/Layout.jsx"
    click NavbarComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/Navbar.jsx"
    click FooterComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/Footer.jsx"
    click ButtonComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/Button.jsx"
    click CardComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/Card.jsx"
    click BgBoxComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/BgBox.jsx"
    click GeoBg1 "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/GeometricBackground.jsx"
    click GeoBg2 "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/GeometricBackground2.jsx"
    click GeoBg3 "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/GeometricBackground3.jsx"
    click HeroHeading "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/HeroHeading.jsx"
    click LogoComp "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/Logo.jsx"
    click SectionTitle "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/SectionTitle.jsx"
    click Testimonial "https://github.com/pradhunyagawande01/narinexus/blob/main/src/components/TestimonialCard.jsx"
    click HomePage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Home.jsx"
    click AboutPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/About.jsx"
    click ContactPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Contact.jsx"
    click EventsPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Events.jsx"
    click FaqPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Faq.jsx"
    click InvolvedPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/GetInvolved.jsx"
    click InitiativesPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Initiatives.jsx"
    click ProgramsPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Programs.jsx"
    click ResourcesPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Resources.jsx"
    click StoriesPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Stories.jsx"
    click SuccessStories "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/SuccessStories.jsx"
    click TeamPage "https://github.com/pradhunyagawande01/narinexus/blob/main/src/pages/Team.jsx"

    %% Styles
    classDef tooling fill:#cccccc,stroke:#333,stroke-width:1px
    classDef code fill:#cce5ff,stroke:#004085,stroke-width:1px
    classDef assets fill:#d4edda,stroke:#155724,stroke-width:1px
    classDef browser fill:#ffe5b4,stroke:#cc8400,stroke-width:1px
```
