# dillionverma/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a full-stack (mostly front-end heavy) portfolio website.
- Its purposes:
- Personal information and resume (data from src/data/resume.tsx)
- Serve a blog section (see src/app/blog and MDX content in content/ folder)
- Offer interactive UI components (from src/components, including custom implementations and shadcn/ui)
- Be easily configurable via a single configuration file.

##### Key Components from the File Structure
- Frontend Application (Next.js):
- src/app: Contains the main Next.js pages (layout, page.tsx) along with specialized pages for the blog section.
- next.config.mjs, tsconfig.json, tailwind.config.ts, postcss.config.mjs: Configuration files for Next.js, Typescript, Tailwind, and PostCSS.
- UI Components:
- src/components: Contains reusable UI components such as navbar.tsx, project-card.tsx, resume-card.tsx, and theme-provider.tsx.
- src/components/magicui and src/components/ui: Specialized components indicating the use of Magic UI design and shadcn/ui patterns.
- Content and Data:
- content: Holds MDX files for blog posts.
- src/data: Contains blog.ts and resume.tsx, which drive content and configuration.
- Utility & Library Code:
- src/lib: Contains utilities which support application logic.
- Public Assets:
- public: For static assets (images, favicon, etc.).

##### Relationships and Interactions
- The Next.js application primarily drives the routing, rendering pages found in src/app.
- The blog submodules under src/app/blog are connected to static MDX files in the content folder.
- Shared UI components (from src/components) are used to compose pages – they rely on UI libraries such as shadcn/ui and Magic UI.
- Data from src/data (especially resume.tsx and blog.ts) feed into both the application pages and components.
- Build and configuration files ensure the correct transpilation, linting, and deployment (Vercel) settings.

##### Architectural Patterns and Design Principles
- Component-Based Architecture: Reusable, composable components for UI (React components).
- File-based Routing: Utilized by Next.js which maps files under src/app to routes.
- Separation of Concerns: Clearly splitting content (MDX in content), data (src/data), presentation (src/app and src/components), and utility logic (src/lib).
- Responsive and Optimized Design: Indicated by the use of TailwindCSS and Next.js optimization for Vercel.

##### Relevant Technologies
- Next.js (React framework for SSR, static generation, routing)
- Typescript (for type safety)
- TailwindCSS (for styling)
- shadcn/ui & Magic UI (for UI design)
- Framer Motion (for animations in the UI)
- Vercel (deployment platform)

##### Elements
- Application Shell (Next.js Framework)
- UI Components (include a subdivision for Magic UI and shadcn/ui components)
- Blog Module (src/app/blog + MDX content in content/)
- Data Module (src/data with resume, blog configuration)
- Utility & Helper Library (src/lib)
- Deployment/Environment (Vercel)
- From Data Module to Application Pages
- From MDX Content to Blog Module
- From UI Components flowing into pages/layouts

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Configuration & Build Files Subgraph
    subgraph "Configuration & Build Files"
        F1["next.config.mjs"]
        F2["tsconfig.json"]
        F3["tailwind.config.ts"]
        F4["postcss.config.mjs"]
        F_AGG(("Build Config"))
    end

    %% Data & Utility Layer Subgraph
    subgraph "Data & Utility Layer"
        D1["Resume Data"]
        D2["Blog Data"]
        E["Utility & Helper Library"]
    end

    %% Blog Module Subgraph
    subgraph "Blog Module"
        B1["Blog Pages"]
        B2["MDX Content"]
    end

    %% UI Components Subgraph
    subgraph "UI Components"
        U1["General UI Components"]
        U2["Magic UI Components"]
        U3["shadcn/ui Components"]
    end

    %% Frontend Application Shell
    A["Application Shell (Next.js Framework)"]

    %% Deployment Environment
    G["Vercel Deployment"]

    %% Connections for Configuration & Build Files
    F1 --> F_AGG
    F2 --> F_AGG
    F3 --> F_AGG
    F4 --> F_AGG
    F_AGG --> A
    F_AGG --> G

    %% Data & Utility connections
    D1 --> A
    D2 --> B1
    E --> A

    %% Blog Module connections
    B2 --> B1
    B1 --> A

    %% UI Components connections
    U1 --> A
    U2 --> A
    U3 --> A

    %% Application Shell to Deployment
    A --> G

    %% Styling Classes
    class A,U1,U2,U3,B1,B2 fill:#bbdefb,stroke:#333,stroke-width:2px;
    class D1,D2 fill:#c8e6c9,stroke:#333,stroke-width:2px;
    class E fill:#fff9c4,stroke:#333,stroke-width:2px;
    class F1,F2,F3,F4,F_AGG fill:#ffe0b2,stroke:#333,stroke-width:2px;
    class G fill:#f8bbd0,stroke:#333,stroke-width:2px;

    %% Click Events
    click A "https://github.com/dillionverma/portfolio/tree/main/src/app"
    click B1 "https://github.com/dillionverma/portfolio/blob/main/src/app/blog/[slug]/page.tsx"
    click B2 "https://github.com/dillionverma/portfolio/tree/main/content"
    click U1 "https://github.com/dillionverma/portfolio/tree/main/src/components"
    click U2 "https://github.com/dillionverma/portfolio/tree/main/src/components/magicui"
    click U3 "https://github.com/dillionverma/portfolio/tree/main/src/components/ui"
    click D1 "https://github.com/dillionverma/portfolio/blob/main/src/data/resume.tsx"
    click D2 "https://github.com/dillionverma/portfolio/blob/main/src/data/blog.ts"
    click E "https://github.com/dillionverma/portfolio/blob/main/src/lib/utils.ts"
    click F1 "https://github.com/dillionverma/portfolio/blob/main/next.config.mjs"
    click F2 "https://github.com/dillionverma/portfolio/blob/main/tsconfig.json"
    click F3 "https://github.com/dillionverma/portfolio/blob/main/tailwind.config.ts"
    click F4 "https://github.com/dillionverma/portfolio/blob/main/postcss.config.mjs"
```
