# abhinavrai2004/myportfolio architecture

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

- Interactive diagram: https://gitdiagram.com/abhinavrai2004/myportfolio
- Repository: https://github.com/abhinavrai2004/myportfolio

## Overview

##### Main Components
- Next.js Application: Represent the core of your project (the “app” directory) that includes page routing, layouts, and component rendering.
- Presentation/Component Layer: Illustrate the various individual UI components (organized under app/components and its subdirectories like homepage, navbar, footer, and helper components).
- API Layer: Indicate the minimal server-side functionality, seen in app/api (for example, app/api/google/route.js), which may be handling serverless requests or integration with external services.
- Static Assets and Public Files: Include the “public” folder housing images, lottie animations, pngs, and svg files.
- Utility Functions and Data Layer: Represent the “utils” folder containing helper functions (e.g., check-email, time-converter) and data files (contactsData, educations, projects-data, etc.) used to populate the UI content.
- Configuration and Styling: Include build and style configuration files such as next.config.js, tailwind.config.js, postcss.config.js, SCSS files, and others (e.g., .eslintrc.json) that play a vital role in how the project is built and maintained.

##### Mapping Relationships and Interactions
- That the API route (app/api/google) exists as a separate component that the front-end can call when certain actions need backend processing.
- Public folder to the presentation layer as the source of static media (images, lottie animations, svg files) that are used within the components.
- External integrations like EmailJS (for sending emails) and optionally reCAPTCHA for contact forms, showing that these external services interact with the client-side actions.

##### Architectural Patterns & Design Principles
- Separation of concerns: the project divides UI concerns (components and layouts), data (found in ‘utils’), API endpoints, and configuration (Next.js and styling configurations).
- Use of Next.js “App Router” where pages and layout files are co-located, which is a modern architectural approach.
- That styles are managed via SCSS (in app/css) alongside Tailwind CSS for utility classes, highlighting a hybrid approach for styling.
- That the project organizes the portfolio sections modularly, indicating a component-based architecture consistent with React and Next.js practices.

– The flow from UI components to API endpoints when actions (like submitting a contact form) occur.
– The retrieval and use of static data from the utils folder to render dynamic sections.
– The integration with external services (EmailJS, reCAPTCHA, etc.) as part of the data flow.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Configuration & Styling"
        NEXTCFG["next.config.js"]:::config
        TAILWIND["tailwind.config.js"]:::config
        POSTCSS["postcss.config.js"]:::config
        ESLINT[".eslintrc.json"]:::config
        APPCSS["app/css (globals.scss, card.scss)"]:::config
    end

    subgraph "Next.js Application Core"
        APP["Next.js Application Core"]:::core
        click APP "https://github.com/abhinavrai2004/myportfolio/tree/main/app"
    end

    subgraph "Presentation Layer"
        COMPONENTS["Presentation/Component Layer"]:::presentation
        click COMPONENTS "https://github.com/abhinavrai2004/myportfolio/tree/main/app/components"
        HERO["Hero Section"]:::presentation
        ABOUT["About Section"]:::presentation
        SKILLS["Skills Section"]:::presentation
        PROJECTS["Projects Section"]:::presentation
        EDUCATION["Education Section"]:::presentation
        CONTACT["Contact Section"]:::presentation
        NAVBAR["Navbar Component"]:::presentation
        FOOTER["Footer Component"]:::presentation
    end

    subgraph "API Layer"
        API["Google API Route"]:::api
        click API "https://github.com/abhinavrai2004/myportfolio/blob/main/app/api/google/route.js"
    end

    subgraph "Static Assets"
        PUBLIC["Public Assets"]:::static
        click PUBLIC "https://github.com/abhinavrai2004/myportfolio/tree/main/public"
    end

    subgraph "Utility/Data Layer"
        UTILS["Utility Functions & Data"]:::utils
        click UTILS "https://github.com/abhinavrai2004/myportfolio/tree/main/utils"
    end

    EXTS["External Services (EmailJS,reCAPTCHA)"]:::external

    %% Connections
    NEXTCFG --> APP
    APP --> COMPONENTS
    UTILS --> COMPONENTS
    PUBLIC --> COMPONENTS
    COMPONENTS --> HERO
    COMPONENTS --> ABOUT
    COMPONENTS --> SKILLS
    COMPONENTS --> PROJECTS
    COMPONENTS --> EDUCATION
    COMPONENTS --> CONTACT
    COMPONENTS --> NAVBAR
    COMPONENTS --> FOOTER
    CONTACT -->|"submit"| API
    CONTACT -->|"notify"| EXTS
    COMPONENTS -->|"apiCall"| API

    %% Click events for configuration files
    click NEXTCFG "https://github.com/abhinavrai2004/myportfolio/blob/main/next.config.js"
    click TAILWIND "https://github.com/abhinavrai2004/myportfolio/blob/main/tailwind.config.js"
    click POSTCSS "https://github.com/abhinavrai2004/myportfolio/blob/main/postcss.config.js"
    click ESLINT "https://github.com/abhinavrai2004/myportfolio/blob/main/.eslintrc.json"
    click APPCSS "https://github.com/abhinavrai2004/myportfolio/tree/main/app/css"

    %% Class definitions
    classDef config fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef core fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
    classDef presentation fill:#D6EAF8,stroke:#2980B9,stroke-width:2px;
    classDef api fill:#FCF3CF,stroke:#F1C40F,stroke-width:2px;
    classDef static fill:#EBF5FB,stroke:#3498DB,stroke-width:2px;
    classDef utils fill:#FDEBD0,stroke:#E67E22,stroke-width:2px;
    classDef external fill:#F5EEF8,stroke:#8E44AD,stroke-width:2px;
```
