# deeedaniel/personalwebsite architecture

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

- Interactive diagram: https://gitdiagram.com/deeedaniel/personalwebsite
- Repository: https://github.com/deeedaniel/personalwebsite

## Overview

##### Main Components of the System
- Frontend Application: Represented by your React code inside the src directory. This includes:
- The entry point (src/main.tsx) where the app is bootstrapped.
- The main application container (src/App.tsx).
- UI components (found in src/components and subdirectories) such as About, Navbar, Projects, and others (including the UI-specific components in src/components/ui).
- Page components (in src/pages) that define the routing structure (e.g., src/pages/Index.tsx).
- Public Assets: These are in the public directory and the index.html file at the root. They serve as static resources for the application.
- Build and Configuration: Vite (vite.config.ts) is used as the bundler, while tools like ESLint (eslint.config.js) and Tailwind (tailwind.config.js, postcss.config.js) define the development and styling environments.
- Utility and Library Code: The src/lib directory contains helper functions (utils.ts) that support your application’s logic.

##### Relationships and Interactions
- Page Routing: Illustrate that the “pages” directory contains route-specific components (e.g., Index.tsx) which may be rendered inside App.tsx or via your routing mechanism.
- Styling and Theming: Show a dependency from the style files (src/index.css, tailwind.config.js, postcss.config.js) to the rendered components.
- Build & Lint Chain: Include the role of Vite as the build tool (connecting vite.config.ts and package.json scripts), with ESLint along with its configuration (eslint.config.js) ensuring code quality.

##### Architectural Patterns and Design Principles
- Component-based Design: The project follows the common React pattern of breaking down the UI into self-contained, reusable components.
- Separation of Concerns: Notice the directives of separating pages from components, lib utilities from UI specifics, and static assets from source code.
- Modern Frontend Practices: Use of a bundler (Vite), fast refresh plugins (@vitejs/plugin-react or react-swc), and TypeScript for strong typing.

##### Relevant Technologies and Tools
- React for UI rendering.
- TypeScript for type safety.
- Vite as the project bundler and dev server.
- ESLint for code linting (with specific React and TypeScript configurations).
- Tailwind CSS for styling (configured via tailwind.config.js and postcss.config.js).
- Plugins for React fast refresh (as explained in the README).

## Diagram (Mermaid)

```mermaid
graph TD
    %% Public Assets subgraph
    subgraph "Public Assets"
        IndexHtml["index.html"]:::pub
        PublicDir["public (assets)"]:::pub
    end

    %% Source Code subgraph
    subgraph "Source Code"
        MainEntry["Entry Point (src/main.tsx)"]:::code
        MainApp["Main App (src/App.tsx)"]:::code
        subgraph "Components"
            UIComp["UI Components (src/components)"]:::code
            AboutC["About.tsx"]:::code
            NavbarC["Navbar.tsx"]:::code
            ProjectsC["Projects.tsx"]:::code
            DanielC["Daniel.tsx"]:::code
            ExtraC["Extra.tsx"]:::code
            UIComp -->|"includes"| AboutC
            UIComp -->|"includes"| NavbarC
            UIComp -->|"includes"| ProjectsC
            UIComp -->|"includes"| DanielC
            UIComp -->|"includes"| ExtraC
            UISpecific["UI Specific (src/components/ui)"]:::code
            UIComp -->|"includes"| UISpecific
            subgraph "UI Subcomponents"
                ButtonC["Button Component (button.tsx)"]:::code
                CarouselC["Carousel Component (carousel.tsx)"]:::code
                UISpecific -->|"contains"| ButtonC
                UISpecific -->|"contains"| CarouselC
            end
        end
        subgraph "Pages"
            PageIndex["Page (src/pages/Index.tsx)"]:::code
        end
        Utils["Utilities (src/lib/utils.ts)"]:::code
    end

    %% Build & Configuration subgraph
    subgraph "Build & Configuration"
        ViteConf["Vite Config (vite.config.ts)"]:::config
        ESLintConf["ESLint Config (eslint.config.js)"]:::config
        TailwindConf["Tailwind Config (tailwind.config.js)"]:::config
        PostCSSConf["PostCSS Config (postcss.config.js)"]:::config
    end

    %% Inter-component Relationships
    IndexHtml -->|"bootstraps"| MainEntry
    MainEntry -->|"renders"| MainApp
    MainApp -->|"composes"| UIComp
    MainApp -->|"routes"| PageIndex
    MainApp -->|"uses"| Utils
    ViteConf -->|"builds"| MainEntry
    ESLintConf -->|"lints"| MainApp
    TailwindConf -->|"styles"| UIComp
    PostCSSConf -->|"styles"| UIComp

click MainEntry "https://github.com/deeedaniel/personalwebsite/blob/main/src/main.tsx"
click MainApp "https://github.com/deeedaniel/personalwebsite/blob/main/src/App.tsx"
click UIComp "https://github.com/deeedaniel/personalwebsite/tree/main/src/components"
click UISpecific "https://github.com/deeedaniel/personalwebsite/tree/main/src/components/ui"
click PageIndex "https://github.com/deeedaniel/personalwebsite/blob/main/src/pages/Index.tsx"
click IndexHtml "https://github.com/deeedaniel/personalwebsite/blob/main/index.html"
click PublicDir "https://github.com/deeedaniel/personalwebsite/tree/main/public"
click Utils "https://github.com/deeedaniel/personalwebsite/blob/main/src/lib/utils.ts"
click ViteConf "https://github.com/deeedaniel/personalwebsite/blob/main/vite.config.ts"
click ESLintConf "https://github.com/deeedaniel/personalwebsite/blob/main/eslint.config.js"
click TailwindConf "https://github.com/deeedaniel/personalwebsite/blob/main/tailwind.config.js"
click PostCSSConf "https://github.com/deeedaniel/personalwebsite/blob/main/postcss.config.js"
click AboutC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/About.tsx"
click NavbarC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/Navbar.tsx"
click ProjectsC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/Projects.tsx"
click DanielC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/Daniel.tsx"
click ExtraC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/Extra.tsx"
click ButtonC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/ui/button.tsx"
click CarouselC "https://github.com/deeedaniel/personalwebsite/blob/main/src/components/ui/carousel.tsx"

classDef pub fill:#ccf,stroke:#036,stroke-width:2px;
classDef code fill:#cfc,stroke:#070,stroke-width:2px;
classDef config fill:#ffc,stroke:#cc0,stroke-width:2px;
```
