# joehanavarghese/joehana-portfolio-main architecture

> Architecture diagram of the GitHub repository joehanavarghese/joehana-portfolio-main, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joehanavarghese/joehana-portfolio-main
- Repository: https://github.com/joehanavarghese/joehana-portfolio-main

## Overview

##### Main Components
- Browser & Client Environment: Represent the end-user’s browser that loads the website.
- Entry Point: The index.html file serves as the root HTML file.
- Main Application: The src/main.tsx that bootstraps the React app.
- Primary Application Component: The App.tsx that manages routing and layout.
- Pages: The src/pages directory includes components such as Index, About, Contact, Projects, Resume, and NotFound. These represent distinct views that users navigate between.
- UI Components Library: The extensive set of shadcn-ui components (within src/components/ui) which serve as the reusable visual parts of the site.
- Custom Components: Any additional components, for example, Terminal.tsx in src/components.
- Hooks & Utilities: Modules under src/hooks (like use-mobile.tsx, use-toast.ts) and src/lib (like utils.ts) that abstract logic and provide support functions.
- Configuration & Build Tools: Top-level configuration files (vite.config.ts, tsconfig files, tailwind.config.ts) that indicate the use of Vite for bundling and Tailwind CSS for styling.

##### Relationships & Interactions
- The browser loads index.html, which then points to the bundled JavaScript generated by Vite (configured via vite.config.ts).
- The main.tsx file renders the App component.
- The App component manages the overall layout and routing that leads to various pages (as defined in src/pages).
- Each page may incorporate several UI components drawn from the shadcn-ui library (from src/components/ui) as well as any custom components (like Terminal).
- Hooks and utilities are invoked within these pages or components to handle responsive design (e.g., use-mobile) or display notifications (e.g., use-toast).
- The assets folder supplies static media, and the data folder provides project detail data (e.g., for the Projects page).

##### Architectural Patterns & Technologies
- Component-Based Architecture: Using React, the code is broken down into reusable components.
- Separation of Concerns: Clear division between layout (pages), UI elements (components), business logic (hooks and utilities), and styling (Tailwind CSS).
- Modern Tooling: Vite is used as the build tool for quick reloading and an optimized development experience.
- Type Safety: TypeScript is used throughout the project to enforce type safety and improve maintainability.
- Design System: shadcn-ui ensures a consistent, reusable UI approach enhancing both maintainability and scalability.

- From “main.tsx”, show “App.tsx” as the central node.
- Branch out from “App.tsx” into:
- “Pages” (a container node that further splits into About, Contact, Projects, Resume, NotFound, etc.)
- “UI Components” (linking to the shadcn-ui folder and custom components like Terminal)
- “Hooks & Utilities” (grouping use-mobile, use-toast, utils, etc.)
- Also, include a side note or linked node for “Configuration/Build Tools” that includes Vite, TypeScript, and Tailwind CSS which are foundational to the project.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Entities
    Browser["Browser"]:::client
    Browser -->|"loads"| index["index.html"]:::entry
    index -->|"bootstraps"| main["main.tsx"]:::entry
    main -->|"renders"| App["App.tsx"]:::core

    %% Subgraph: Pages
    subgraph "Pages" [Pages]
        direction TB
        Index["Index"]:::page
        About["About"]:::page
        Contact["Contact"]:::page
        Projects["Projects"]:::page
        Resume["Resume"]:::page
        NotFound["NotFound"]:::page
    end

    %% Subgraph: UI Components
    subgraph "UI Components" [UI Components]
        direction TB
        UILib["UI Library (shadcn-ui)"]:::ui
        Terminal["Terminal"]:::ui
    end

    %% Subgraph: Hooks & Utilities
    subgraph "Hooks & Utilities" [Hooks & Utilities]
        direction TB
        Hooks["Hooks"]:::hook
        Utilities["Utilities"]:::hook
    end

    %% Assets Node
    Assets["Assets"]:::asset

    %% Configuration & Build Tools Subgraph
    subgraph "Configuration & Build Tools" [Configuration & Build Tools]
        direction TB
        Vite["Vite"]:::config
        Tailwind["Tailwind CSS"]:::config
        TSConfig["tsconfig.json"]:::config
        TSApp["tsconfig.app.json"]:::config
        TSNode["tsconfig.node.json"]:::config
    end

    %% Connections from App.tsx
    App -->|"routes to"| Index
    App --> About
    App --> Contact
    App --> Projects
    App --> Resume
    App --> NotFound
    App -->|"uses"| UILib
    App --> Terminal
    App -->|"invokes"| Hooks
    App --> Utilities
    App -->|"loads assets from"| Assets
    App -->|"build config"| Vite
    App --> Tailwind
    App --> TSConfig
    App --> TSApp
    App --> TSNode

    %% Click Events
    click index "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/index.html"
    click main "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/main.tsx"
    click App "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/App.tsx"
    
    click Index "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/pages/Index.tsx"
    click About "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/pages/About.tsx"
    click Contact "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/pages/Contact.tsx"
    click Projects "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/pages/Projects.tsx"
    click Resume "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/pages/Resume.tsx"
    click NotFound "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/pages/NotFound.tsx"

    click UILib "https://github.com/joehanavarghese/joehana-portfolio-main/tree/master/Joehana-Portfolio-main/src/components/ui"
    click Terminal "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/components/Terminal.tsx"

    click Hooks "https://github.com/joehanavarghese/joehana-portfolio-main/tree/master/Joehana-Portfolio-main/src/hooks"
    click Utilities "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/src/lib/utils.ts"

    click Assets "https://github.com/joehanavarghese/joehana-portfolio-main/tree/master/Joehana-Portfolio-main/src/assets"

    click Vite "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/vite.config.ts"
    click Tailwind "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/tailwind.config.ts"
    click TSConfig "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/tsconfig.json"
    click TSApp "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/tsconfig.app.json"
    click TSNode "https://github.com/joehanavarghese/joehana-portfolio-main/blob/master/Joehana-Portfolio-main/tsconfig.node.json"

    %% Styles
    classDef client fill:#D0E6A5,stroke:#333,stroke-width:2px;
    classDef entry fill:#FBC687,stroke:#333,stroke-width:2px;
    classDef core fill:#C1C8E4,stroke:#333,stroke-width:2px;
    classDef page fill:#FFD3B6,stroke:#333,stroke-width:2px;
    classDef ui fill:#FFAAA7,stroke:#333,stroke-width:2px;
    classDef hook fill:#A1C6EA,stroke:#333,stroke-width:2px;
    classDef asset fill:#D5E8D4,stroke:#333,stroke-width:2px;
    classDef config fill:#F4CCCC,stroke:#333,stroke-width:2px;
```
