# anas0723/main-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single-page, front-end portfolio website built with React and Vite. Its purpose is to present projects, skills, and contact information in a modern, responsive design.

##### File structure
- Top-level files:
- index.html – the SPA entry point
- package.json / package-lock.json – dependencies and scripts
- vite.config.js, postcss.config.js, tailwind.config.js, eslint.config.js – build, lint, and styling configs
- public/ – static assets (manifest.json, favicon, etc.)
- src/ – application source
- main.jsx – bootstraps React into index.html
- App.jsx – root React component
- components/ – individual UI pieces (Header, Body, Project, Skill, Contact, Footer, Cursor, etc.)
- assets/ – pictures and resume PDF
- index.css – global styles (imports Tailwind directives)

##### README for additional insights
- Tech stack: React, Vite, Tailwind CSS, PostCSS, JavaScript (ES6+), Git, Vercel deployment.
- Features: smooth animations, responsive layout, optimized build, easy customization.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        direction TB
        Node["Node.js & npm"]:::devtools
        ESLint["ESLint (linting)"]:::devtools
        Tailwind["PostCSS + Tailwind CSS"]:::devtools
        GitHub["Git/GitHub (version control)"]:::devtools
        Node -->|runs lint| ESLint
        Node -->|runs style pipeline| Tailwind
        Node -->|npm run dev / build| ViteDev
    end

    %% Vite Dev Server & Build Pipeline
    subgraph "Build & Dev Server"
        direction TB
        ViteDev["Vite Dev Server"]:::devtools
        ViteBuild["Vite Build (vite.config.js)"]:::build
        ViteDev -->|serves SPA| DevOutput[/"index.html, JS bundle, CSS, assets"/]:::build
        Node -->|npm run build| ViteBuild
        ViteBuild -->|outputs static files| BuildOutput[/"index.html, main.js, style.css, assets"/]:::build
    end

    %% Hosting & Delivery
    subgraph "Hosting & Delivery"
        direction TB
        Vercel["Vercel CDN & SSL"]:::hosting
        GitHub -->|push & hook| Vercel
        Vercel -->|hosts static files| BuildOutput
    end

    %% Client Execution
    subgraph "Client (Browser)"
        direction TB
        Browser["Browser"]:::client
        Browser -->|GET index.html, JS, CSS, assets| Vercel
        Browser -->|executes bundle| ReactApp
    end

    %% React Application
    subgraph "React SPA" 
        direction TB
        Main["src/main.jsx"]:::client
        App["src/App.jsx"]:::client
        Styles["src/index.css"]:::client
        AssetsDir["src/assets/Pictures/"]:::client
        Resume["src/assets/anas-me-resume.pdf"]:::client
        PublicManifest["public/manifest.json"]:::client

        Main -->|bootstraps React| App
        App --> HeaderComp
        App --> BodyComp
        App --> ProjectComp
        App --> SkillComp
        App --> ContactComp
        App --> FooterComp
        App --> CursorComp
        HeaderComp["src/components/header.jsx"]:::client
        BodyComp["src/components/Body.jsx"]:::client
        ProjectComp["src/components/Project.jsx"]:::client
        SkillComp["src/components/Skill.jsx"]:::client
        ContactComp["src/components/Contact.jsx"]:::client
        FooterComp["src/components/Footer.jsx"]:::client
        CursorComp["src/components/Cursor.jsx"]:::client
        MainCursorComp["src/components/MainCursor.jsx"]:::client
        FallingTextComp["src/components/FallingText.jsx"]:::client
        SocialLinksComp["src/components/SocialLinks.jsx"]:::client

        CursorComp --> MainCursorComp
        BodyComp --> FallingTextComp
        FooterComp --> SocialLinksComp
    end

    Browser --> ReactApp
    ReactApp --> Main

    %% Click Events
    click Node "https://github.com/anas0723/main-portfolio/blob/master/package.json"
    click ESLint "https://github.com/anas0723/main-portfolio/blob/master/eslint.config.js"
    click Tailwind "https://github.com/anas0723/main-portfolio/blob/master/tailwind.config.js"
    click ViteDev "https://github.com/anas0723/main-portfolio/blob/master/vite.config.js"
    click ViteBuild "https://github.com/anas0723/main-portfolio/blob/master/vite.config.js"
    click DevOutput "https://github.com/anas0723/main-portfolio/blob/master/index.html"
    click BuildOutput "https://github.com/anas0723/main-portfolio/blob/master/index.html"
    click GitHub "https://github.com/anas0723/main-portfolio/blob/master/README.md"
    click Main "https://github.com/anas0723/main-portfolio/blob/master/src/main.jsx"
    click App "https://github.com/anas0723/main-portfolio/blob/master/src/App.jsx"
    click Styles "https://github.com/anas0723/main-portfolio/blob/master/src/index.css"
    click AssetsDir "https://github.com/anas0723/main-portfolio/tree/master/src/assets/Pictures/"
    click Resume "https://github.com/anas0723/main-portfolio/blob/master/src/assets/anas-me-resume.pdf"
    click PublicManifest "https://github.com/anas0723/main-portfolio/blob/master/public/manifest.json"
    click HeaderComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/header.jsx"
    click BodyComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/Body.jsx"
    click ProjectComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/Project.jsx"
    click SkillComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/Skill.jsx"
    click ContactComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/Contact.jsx"
    click FooterComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/Footer.jsx"
    click CursorComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/Cursor.jsx"
    click MainCursorComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/MainCursor.jsx"
    click FallingTextComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/FallingText.jsx"
    click SocialLinksComp "https://github.com/anas0723/main-portfolio/blob/master/src/components/SocialLinks.jsx"

    %% Styles
    classDef devtools fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef build fill:#d4edda,stroke:#333,stroke-width:1px
    classDef hosting fill:#ffe5b4,stroke:#333,stroke-width:1px
    classDef client fill:#fff3cd,stroke:#333,stroke-width:1px
```
