# dibendu-saha/my-portfolio-tw architecture

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

- Interactive diagram: https://gitdiagram.com/dibendu-saha/my-portfolio-tw
- Repository: https://github.com/dibendu-saha/my-portfolio-tw

## Overview

##### Main Components
- Frontend UI: The core of the project is the client-side interface built in React. This includes:
- The “src” directory that contains all the React components, such as “home”, “about”, “contact”, “menu”, “xp”, etc.
- The “src/common” folder that provides shared components and constants.
- Assets & Styling: Images and styles are kept under “src/assets” (with images separated in subdirectories) and multiple styling resources spread across “index.scss”, “App.scss”, and Tailwind’s configuration in “tailwind.config.js” and PostCSS configuration.
- Services & Utilities: The “src/services” directory holds API endpoint definitions, while utilities like image preloading are located in “src/utils”. This indicates separation for data fetching and reusable functions.
- Build & Configuration: Project-level configuration files (e.g., package.json, vite.config.ts, tsconfig files, .eslintrc.cjs, .prettierrc, azure-pipelines.yml, and GitHub workflow YAML files) signal CI/CD integration and coding standards.

##### Component Relationships and Interactions
- The UI components (e.g., Home, About, Contact, Menu) interact with shared common components and may call functionality from “services” for any dynamic data.
- The “common” components provide reusable UI elements that appear across different parts of the UI.
- Assets (images and styles) support the UI components, ensuring a consistent look and feel.
- The service layer illustrates how the frontend might interact with external APIs or data endpoints, even if the current project’s functionalities might be mostly static.
- The build pipeline is represented by files for GitHub workflows and Azure Pipelines, highlighting automated deployment and testing stages.

##### Important Architectural Patterns & Design Principles
- Component-Based Architecture: The React code is organized into specific feature folders (home, about, contact, etc.) and leverages common components for shared functionality.
- Separation of Concerns: Different directories (assets, components, services, utils) clarify the responsibilities of each part of the application.
- Configuration Management: The multiple configuration files for linters, formatters, and build tools demonstrate a focus on maintainability and code quality.
- CI/CD Integration: The presence of GitHub workflows and Azure pipelines indicates automated builds, tests, and deployments.

##### Relevant Technologies and Tools
- React and TypeScript for building the UI.
- Vite as the build tool/bundler.
- Tailwind CSS (with instructions to install specific plugins and VS Code extensions) and PostCSS for styling.
- ESLint, Prettier (with the Tailwind plugin), and associated configuration files for code quality.
- Additional deployment and CI/CD configurations which support seamless integration with AWS infrastructure (as mentioned in the README).

## Diagram (Mermaid)

```mermaid
graph TD
  subgraph "UI Layer (React Components)"
    U0["Main Entry"]:::ui
    U1["Application"]:::ui
    U2["Home Page"]:::ui
    U3["About Page (Personal)"]:::ui
    U4["About Page (Professional)"]:::ui
    U5["Contact Page"]:::ui
    U6["Menu/Navigation"]:::ui
    U7["Experience (XP)"]:::ui
    U8["Common Components"]:::ui
  end

  subgraph "Assets & Styling"
    AS1["Images & Assets"]:::asset
    AS2["SCSS Styles"]:::asset
    AS3["Tailwind & PostCSS"]:::asset
  end

  subgraph "Services & Utilities"
    SU1["Service Layer (API endpoints)"]:::service
    SU2["Utility Functions"]:::service
  end

  subgraph "Build & Configuration"
    BC1["Vite Configuration"]:::config
    BC2["Package & Dependency Management"]:::config
    BC3["TypeScript Configurations"]:::config
    BC4["Linting & Formatting"]:::config
    BC5["Vite Environment Definitions"]:::config
  end

  subgraph "CI/CD and Deployment"
    CD1["GitHub Workflows"]:::deploy
    CD2["Azure Pipelines"]:::deploy
    CD3["Deployment Config"]:::deploy
    CD4["AWS Hosting"]:::deploy
  end

  %% UI Layer relationships
  U0 --> U1
  U1 --> U2
  U1 --> U3
  U1 --> U4
  U1 --> U5
  U1 --> U6
  U1 --> U7
  U2 --> U8
  U3 --> U8
  U4 --> U8
  U5 --> U8
  U6 --> U8
  U7 --> U8

  %% Interactions between layers
  U1 -->|"calls"| SU1
  U1 -->|"uses"| AS1
  U1 -->|"styledby"| AS2

  %% Build & Configuration relationships
  BC2 --> BC1
  BC3 --> BC1
  BC4 --> BC1
  BC5 --> BC1
  BC1 --> U1

  %% CI/CD triggers from build configuration
  BC1 -->|"triggers"| CD1
  BC1 -->|"triggers"| CD2
  BC1 -->|"triggers"| CD3
  CD1 -->|"deploys"| CD4
  CD2 -->|"deploys"| CD4
  CD3 -->|"deploys"| CD4

  %% Class definitions for color coding
  classDef ui fill:#ffefd5,stroke:#d2691e,stroke-width:2px;
  classDef asset fill:#e0f7fa,stroke:#006064,stroke-width:2px;
  classDef service fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px;
  classDef config fill:#ede7f6,stroke:#5e35b1,stroke-width:2px;
  classDef deploy fill:#fff3e0,stroke:#ef6c00,stroke-width:2px;

  %% Click Events for UI Layer
  click U0 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/main.tsx"
  click U1 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/App.tsx"
  click U2 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/components/home/Home.tsx"
  click U3 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/components/about/AboutPersonal.tsx"
  click U4 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/components/about/AboutProfessional.tsx"
  click U5 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/components/contact/Contact.tsx"
  click U6 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/components/menu/Menu.tsx"
  click U7 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/components/xp/ExperienceHighlight.tsx"
  click U8 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/common/AppComponents.tsx"

  %% Click Events for Assets & Styling
  click AS1 "https://github.com/dibendu-saha/my-portfolio-tw/tree/main/src/assets"
  click AS2 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/index.scss"
  click AS3 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/tailwind.config.js"

  %% Click Events for Services & Utilities
  click SU1 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/services/endpoints.ts"
  click SU2 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/utils/imagePreloader.ts"

  %% Click Events for Build & Configuration
  click BC1 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/vite.config.ts"
  click BC2 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/package.json"
  click BC3 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/tsconfig.json"
  click BC4 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/.eslintrc.cjs"
  click BC5 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/src/vite-env.d.ts"

  %% Click Events for CI/CD and Deployment
  click CD1 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/.github/workflows/main.yml"
  click CD2 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/azure-pipelines.yml"
  click CD3 "https://github.com/dibendu-saha/my-portfolio-tw/blob/main/staticwebapp.config.json"
```
