# sandeepvashishtha/portfolio architecture

> Architecture diagram of the GitHub repository sandeepvashishtha/portfolio, 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/sandeepvashishtha/portfolio
- Repository: https://github.com/sandeepvashishtha/portfolio

## Overview

##### Project Type and Purpose
- The project is a personal portfolio website built using Next.js, Tailwind CSS, and TypeScript.
- Its main purpose is to showcase skills, projects, experiences, and to allow visitors to contact the site owner via a built-in form.
- It’s primarily a frontend web application with minimal backend functionality (e.g., a contact API endpoint).

##### Analyzing the File Structure
- Top-Level Files: Notice configuration files such as .env.example, next.config.js, package.json, and styling-related config files like tailwind.config.ts and postcss.config.js. These indicate custom settings for the Next.js project and styling conventions.
- Public Directory: Used to store static assets like images or other resources required by the website.
- Source Directory – src/app:
⁃ Contains the application’s entry point (page.tsx), global layout (layout.tsx), and providers setup (providers.tsx).
⁃ Contains an “api” subdirectory, indicating the inclusion of server-side API routes – for example, the contact API endpoint in src/app/api/contact/route.ts.
⁃ Contains a “components” directory that houses various UI components (e.g., About.tsx, Hero.tsx, Header components, Projects, Skills, etc.). This separation hints at a modular component-based architecture typical in Next.js applications.
⁃ Additional utilities and libraries (e.g., src/app/lib/motion.ts) support UI animations or other helper functions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Browser (Client)"]:::client
    Server["Next.js Server"]:::server
    Assets["Static Assets"]:::static

    subgraph "Next.js Server"
        subgraph "Global Layout & Providers"
            Layout["Layout (layout.tsx)"]:::layout
            Providers["Providers (providers.tsx)"]:::layout
        end
        subgraph "UI Components"
            Header["Header Component"]:::ui
            Hero["Hero Component"]:::ui
            Projects["Projects Component"]:::ui
            Skills["Skills Component"]:::ui
            About["About Component"]:::ui
            Contact["Contact Form Component"]:::ui
        end
        API["Contact API Endpoint"]:::api
    end

    subgraph "Styling & Configuration"
         Tailwind["Tailwind Config (tailwind.config.ts)"]:::config
         Postcss["PostCSS Config (postcss.config.js)"]:::config
         Globals["Global Styles (src/app/globals.css)"]:::config
         Tsconfig["TypeScript Config (tsconfig.json)"]:::config
    end

    subgraph "Utilities & Animations"
         Motion["Motion (src/app/lib/motion.ts)"]:::utils
         Data["Data Utils (src/app/utils/data.ts)"]:::utils
    end

    Browser -->|"HTTP_Request"| Server
    Browser -->|"Loads"| Assets
    Contact -->|"submitForm"| API
    Server -->|"configured_by"| Tailwind
    Server -->|"uses"| Motion

    click Layout "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/layout.tsx"
    click Providers "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/providers.tsx"
    click Header "https://github.com/sandeepvashishtha/portfolio/tree/main/src/app/components/Header/"
    click Hero "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/components/Hero.tsx"
    click Projects "https://github.com/sandeepvashishtha/portfolio/tree/main/src/app/components/Projects/"
    click Skills "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/components/Skills.tsx"
    click About "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/components/About.tsx"
    click Contact "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/components/ContactForm.tsx"
    click API "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/api/contact/route.ts"
    click Assets "https://github.com/sandeepvashishtha/portfolio/tree/main/public"
    click Tailwind "https://github.com/sandeepvashishtha/portfolio/blob/main/tailwind.config.ts"
    click Postcss "https://github.com/sandeepvashishtha/portfolio/blob/main/postcss.config.js"
    click Globals "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/globals.css"
    click Tsconfig "https://github.com/sandeepvashishtha/portfolio/blob/main/tsconfig.json"
    click Motion "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/lib/motion.ts"
    click Data "https://github.com/sandeepvashishtha/portfolio/blob/main/src/app/utils/data.ts"

    classDef client fill:#cfe2f3,stroke:#1d3557,stroke-width:2px;
    classDef server fill:#d8e2dc,stroke:#1d3557,stroke-width:2px;
    classDef ui fill:#fefae0,stroke:#1d3557,stroke-width:2px;
    classDef api fill:#ffddd2,stroke:#1d3557,stroke-width:2px;
    classDef static fill:#e9ecef,stroke:#1d3557,stroke-width:2px;
    classDef config fill:#d0e6a5,stroke:#1d3557,stroke-width:2px;
    classDef utils fill:#f9c74f,stroke:#1d3557,stroke-width:2px;
    classDef layout fill:#a8dadc,stroke:#1d3557,stroke-width:2px;
```
