# iamakchavan/akchavan architecture

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

- Interactive diagram: https://gitdiagram.com/iamakchavan/akchavan
- Repository: https://github.com/iamakchavan/akchavan

## Overview

##### Project type and purpose
- This is a single-page, full-client “Personal Portfolio Website Template” built with React, TypeScript, Vite, and Tailwind CSS.
- Its sole job is to present personal information, skills, and projects via a responsive UI; there is no custom backend or database in the repository.

##### File structure
- Top-level directories/files of interest:
- public/ – Static assets (images, favicon, preview.png).
- src/ – Application source.
– components/ – Reusable UI building blocks (VoiceAgent.tsx, Radix-based UI primitives in ui/).
– screens/ – Page-level components (Cogito, ElementLight, Live).
– lib/ – Utilities and helper functions.
– index.tsx – React entry point & client‐side router setup.
- index.html – Root HTML template.
- vite.config.ts – Vite dev/build config.
- tailwind.config.js & tailwind.css – Tailwind CSS setup.
- tsconfig*.json – TypeScript configuration.
- vercel.json – Deployment settings for Vercel.

a. Main components to represent:
- Browser (Client)
- React Application
– Entry Point (index.tsx + index.html)
– Router Layer (React Router DOM)
– Screens (Cogito, ElementLight, Live)
– Shared Components (VoiceAgent, UI primitives, badges, buttons, cards, separators)
– Utilities (lib/utils.ts)
- Build/System Tools
– Vite Dev Server & Bundle Pipeline
– TypeScript Compiler (TS → JS)
– PostCSS/Tailwind Processing
- Hosting & CDN
– Vercel (serves the static build)
- Static Assets

b. Relationships & data flow
1. Developer runs `npm run dev` → Vite Dev Server loads index.html, processes TSX/CSS, serves hot-reload.
2. Browser requests root → Vercel/CDN serves pre-built static HTML/CSS/JS.
3. React App bootstraps in the browser → index.tsx initializes Router.
4. User navigates → Router loads appropriate Screen component → reuses components from /components.
5. Components request utilities (lib/utils.ts) or import static assets.
6. Styles are applied via compiled Tailwind CSS classes & Radix UI primitives.

c. Architectural patterns & design principles
- Component-driven: UI split into small, reusable, focused components.
- Module-based routing: Each screen in its own folder for lazy loading.
- Utility-first styling: Tailwind classes, with helper libs (C V A, clsx).
- Unidirectional data flow: Props down, events/callbacks up.
- Static site: No client-side state management beyond React local state/hooks.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Layer
    Developer["Developer"]:::dev

    %% Build Tools Layer
    subgraph "Build & Dev Tools"
        VITE["Vite Dev Server & Bundle Pipeline"]:::build
        TS["TypeScript Compiler (TS → JS)"]:::build
        TAILWIND["PostCSS & Tailwind CSS Processing"]:::build
    end

    %% Hosting & CDN
    subgraph "Hosting & CDN"
        VERCEL["Vercel/CDN"]:::hosting
    end

    %% Static Assets
    subgraph "Static Assets"
        PUBLIC["public/ (images, favicon, preview.png)"]:::assets
    end

    %% Browser Runtime
    Browser["Browser (Client)"]:::browser

    %% React Application Structure
    subgraph "React Application" 
        ENTRY_HTML["index.html"]:::app
        ENTRY_TS["src/index.tsx"]:::app
        ROUTER["React Router DOM"]:::app

        subgraph "Screens (Lazy-Loaded)"
            Cogito["Cogito"]:::app
            ElementLight["ElementLight"]:::app
            Live["Live"]:::app
        end

        subgraph "Shared Components & Primitives"
            VoiceAgent["VoiceAgent"]:::app
            Badge["Badge"]:::app
            Button["Button"]:::app
            Card["Card"]:::app
            Separator["Separator"]:::app
        end

        Utils["src/lib/utils.ts"]:::app
        Styling["Tailwind CSS Config & Styles"]:::app
    end

    %% Relationships & Data Flow
    Developer -->|"run npm run dev"| VITE
    VITE -->|"compile TS"| TS
    VITE -->|"process CSS"| TAILWIND
    TS -->|"output JS bundle"| VITE
    TAILWIND -->|"output CSS"| VITE
    VITE -->|"serve JS/CSS (HMR)"| Browser
    Developer -->|"run npm run build"| VITE
    VITE -->|"bundle static assets"| PUBLIC
    VITE -->|"deploy build"| VERCEL
    VERCEL -->|"serve static HTML/CSS/JS"| Browser

    Browser -->|"load HTML"| ENTRY_HTML
    ENTRY_HTML -->|"load JS bundle"| ENTRY_TS
    ENTRY_TS -->|"hydrate & initialize"| ROUTER

    ROUTER -->|"navigate to route"| Cogito
    ROUTER -->|"navigate to route"| ElementLight
    ROUTER -->|"navigate to route"| Live

    Cogito -->|"import component"| VoiceAgent
    Cogito -->|"import UI primitives"| Badge
    Cogito -->|"import utilities"| Utils
    Cogito -->|"import styles/assets"| PUBLIC

    ElementLight -->|"import UI primitives"| Button
    ElementLight -->|"import utilities"| Utils
    ElementLight -->|"import styles/assets"| PUBLIC

    Live -->|"import UI primitives"| Card
    Live -->|"import utilities"| Utils
    Live -->|"import styles/assets"| PUBLIC

    VoiceAgent -->|"uses styling"| Styling
    Badge -->|"uses styling"| Styling
    Button -->|"uses styling"| Styling
    Card -->|"uses styling"| Styling
    Separator -->|"uses styling"| Styling

    %% Click Events
    click ENTRY_HTML "https://github.com/iamakchavan/akchavan/blob/main/index.html"
    click ENTRY_TS "https://github.com/iamakchavan/akchavan/blob/main/src/index.tsx"
    click Cogito "https://github.com/iamakchavan/akchavan/blob/main/src/screens/Cogito/Cogito.tsx"
    click ElementLight "https://github.com/iamakchavan/akchavan/blob/main/src/screens/ElementLight/ElementLight.tsx"
    click Live "https://github.com/iamakchavan/akchavan/blob/main/src/screens/Live/Live.tsx"
    click VoiceAgent "https://github.com/iamakchavan/akchavan/blob/main/src/components/VoiceAgent.tsx"
    click Badge "https://github.com/iamakchavan/akchavan/blob/main/src/components/ui/badge.tsx"
    click Button "https://github.com/iamakchavan/akchavan/blob/main/src/components/ui/button.tsx"
    click Card "https://github.com/iamakchavan/akchavan/blob/main/src/components/ui/card.tsx"
    click Separator "https://github.com/iamakchavan/akchavan/blob/main/src/components/ui/separator.tsx"
    click Utils "https://github.com/iamakchavan/akchavan/blob/main/src/lib/utils.ts"
    click Styling "https://github.com/iamakchavan/akchavan/blob/main/tailwind.config.js"
    click Styling "https://github.com/iamakchavan/akchavan/blob/main/tailwind.css"
    click VITE "https://github.com/iamakchavan/akchavan/blob/main/vite.config.ts"
    click TS "https://github.com/iamakchavan/akchavan/blob/main/tsconfig.json"
    click PUBLIC "https://github.com/iamakchavan/akchavan/tree/main/public/"
    click VERCEL "https://github.com/iamakchavan/akchavan/blob/main/vercel.json"

    %% Styling Classes
    classDef dev fill:#f2f2f2,stroke:#333,stroke-width:1px
    classDef build fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef hosting fill:#f0a500,stroke:#333,stroke-width:1px
    classDef assets fill:#8bc34a,stroke:#333,stroke-width:1px
    classDef browser fill:#ffeb3b,stroke:#333,stroke-width:1px
    classDef app fill:#90caf9,stroke:#333,stroke-width:1px
```
