# yourchocomate/my-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/yourchocomate/my-portfolio
- Repository: https://github.com/yourchocomate/my-portfolio

## Overview

##### Main System Components

a) Client-Side Application (Single Page Application)
- This is a frontend-only application built with React and Vite
- No backend services are currently visible in the architecture

##### Key Structural Elements to Highlight

a) Application Core
- Entry Point (main.tsx, App.tsx)
- Router Layer (src/router)
- Page Components Layer (src/pages)

b) Component Architecture
- UI Component Library (src/components/ui)
- Feature Components (about, contact, projects, snake)
- Shared Components (BreadCrumb, FullscreenLoader, etc.)

c) State & Logic Layer
- Custom Hooks (src/hooks)
- Constants & Configuration (src/constants)
- Types (src/types)

d) Asset Management
- Static Assets (public/)
- Styles (src/styles)
- Assets (src/assets)

##### Specific Elements

**[Application Core]**
- Router
- Pages
- Home
- About
- Projects
- Contact

**[Component Library]**
- UI Components
- Typography
- Buttons
- Form
- Layout
- Elements

**[Feature Components]**
- Snake Game
- CodeMirror Integration
- Contact Form
- Project Showcase

##### Important Relationships

- Router → Pages
- Pages → Feature Components
- Feature Components → UI Components
- Hooks → Components
- Assets → Components

##### Technical Stack Layer

A section showing the technical foundation:
- Vite (Build Tool)
- React 18
- TypeScript
- Tailwind CSS
- Key plugins (framer-motion, codemirror)

##### The static asset management system

This will give other developers a clear understanding of how the portfolio application is structured and how its various parts work together.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        Entry["Entry Point"]
        Router["Router Layer"]
        Pages["Pages Layer"]
        
        Entry --> Router
        Router --> Pages
    end
    
    subgraph Components
        UI["UI Component Library"]
        Feature["Feature Components"]
        Shared["Shared Components"]
        
        Feature --> UI
        Pages --> Feature
        Pages --> Shared
    end
    
    subgraph "State & Logic"
        Hooks["Custom Hooks"]
        Constants["Constants & Config"]
        Types["Types Definition"]
        
        Hooks --> Feature
        Constants --> Feature
        Types --> Feature
    end
    
    subgraph Assets
        StaticAssets["Static Assets"]
        Styles["Styles"]
        AssetFiles["Asset Files"]
        
        StaticAssets --> Pages
        Styles --> Pages
        AssetFiles --> Pages
    end
    
    subgraph "Technical Stack"
        Vite["Vite Build"]
        React["React 18"]
        TS["TypeScript"]
        TailwindCSS["Tailwind CSS"]
        
        Vite --> Entry
        React --> Entry
        TS --> Entry
        TailwindCSS --> Styles
    end
    
    classDef core fill:#2563eb,color:white
    classDef component fill:#22c55e,color:white
    classDef state fill:#f97316,color:white
    classDef asset fill:#6b7280,color:white
    classDef tech fill:#9333ea,color:white
    
    class Entry,Router,Pages core
    class UI,Feature,Shared component
    class Hooks,Constants,Types state
    class StaticAssets,Styles,AssetFiles asset
    class Vite,React,TS,TailwindCSS tech
    
    click Entry "https://github.com/yourchocomate/my-portfolio/blob/main/src/main.tsx"
    click Router "https://github.com/yourchocomate/my-portfolio/blob/main/src/router/index.tsx"
    click Pages "https://github.com/yourchocomate/my-portfolio/tree/main/src/pages"
    click UI "https://github.com/yourchocomate/my-portfolio/tree/main/src/components/ui"
    click Feature "https://github.com/yourchocomate/my-portfolio/tree/main/src/components"
    click Shared "https://github.com/yourchocomate/my-portfolio/tree/main/src/components"
    click Hooks "https://github.com/yourchocomate/my-portfolio/tree/main/src/hooks"
    click Constants "https://github.com/yourchocomate/my-portfolio/tree/main/src/constants"
    click Types "https://github.com/yourchocomate/my-portfolio/tree/main/src/types"
    click StaticAssets "https://github.com/yourchocomate/my-portfolio/tree/main/public"
    click Styles "https://github.com/yourchocomate/my-portfolio/tree/main/src/styles"
    click AssetFiles "https://github.com/yourchocomate/my-portfolio/tree/main/src/assets"
    click Vite "https://github.com/yourchocomate/my-portfolio/blob/main/vite.config.ts"
    click TS "https://github.com/yourchocomate/my-portfolio/blob/main/tsconfig.json"

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Component Layer"]:::component
        L3["State & Logic"]:::state
        L4["Assets"]:::asset
        L5["Tech Stack"]:::tech
    end
```
