# m-a-n-i-k/manik-dingra architecture

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

- Interactive diagram: https://gitdiagram.com/m-a-n-i-k/manik-dingra
- Repository: https://github.com/m-a-n-i-k/manik-dingra

## Overview

##### Project Overview
- This is a front-end portfolio website built with Next.js 15 using the App Router, TypeScript, and Tailwind CSS. Its primary purpose is to showcase a personal portfolio with smooth animations, dynamic content, and interactive UI components.
- Key technologies include Next.js (for server-side rendering and routing), Tailwind CSS (for styling), and Lenis Smooth Scroll (for enhanced scrolling effects).

##### Main Components
a. App Directory (Next.js App Router):
- Contains crucial files such as layout.tsx and page.tsx that define the overall application structure and routing.
- Includes global styles (globals.css), and even configuration pages like robots.ts and sitemap.ts to manage SEO specifics.

b. Components:
- Houses individual UI modules like hero-section, projects-section, about-section, skills-section, experience-section, footer, navbar, etc.
- These components are organized functionally, each responsible for a distinct segment of the portfolio (e.g., landing, projects showcase, skills grid).

c. Public Folder:
- Stores static assets like images or project assets used in the project (e.g., under public/projects) and the site manifest.

d. Lib:
- Contains the integration for the Lenis Smooth Scroll functionality, a key component that adds smooth scroll effects to the portfolio.

e. Configuration Files:
- Files like next.config.ts, tailwind.config.ts, tsconfig.json, and ESLint and PostCSS configuration files determine the project's build and style behavior.

##### Defining Relationships and Interactions
- The App directory acts as the entry point: the layout component establishes the main structure, while page.tsx acts as the initial route.
- The main container component (in Components) is central, aggregating and orchestrating the display of other visual sections (hero, projects, about, skills, experience, etc.).
- Components interact with each other via React props where data and UI state are passed among them. For example, the projects-section leverages project-card components, and the smooth scroll library (from Lib) ties into the main-container for scrolling behaviors.
- Static assets in the Public folder are referenced by components to render images and project details.
- Configuration files support the entire structure: Next.js handles routing and server-side behavior, Tailwind config customizes the design system, and the TS and ESLint configs maintain code quality.

##### Architectural Patterns & Design Principles
- Component-Based Architecture: The design embraces React’s component paradigm, where each UI part is isolated and reusable.
- Separation of Concerns: By dividing the project into distinct directories (app, components, lib, public), the project maintains clear boundaries for concerns like routing/layout, UI components, third-party integrations, and static assets.
- Configuration/Convention over Code: Key config files ensure consistent theming and behavior across the project.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Next.js Application Core
    subgraph "Next.js Application Core"
        A1["layout.tsx"]:::app
        A2["page.tsx"]:::app
        A3["globals.css"]:::app
        A4["robots.ts"]:::app
        A5["sitemap.ts"]:::app
    end

    %% UI Components
    subgraph "UI Components"
        C1["main-container.tsx"]:::comp
        C2["hero-section.tsx"]:::comp
        C3["projects-section.tsx"]:::comp
        C4["about-section.tsx"]:::comp
        C5["skills-section.tsx"]:::comp
        C6["experience-section.tsx"]:::comp
        C7["navbar.tsx"]:::comp
        C8["footer.tsx"]:::comp
        C9["project-card.tsx"]:::comp
        C10["coming-soon.tsx"]:::comp
    end

    %% Static Assets
    subgraph "Static Assets"
        S1["public/"]:::assets
        S2["public/projects/"]:::assets
        S3["site.webmanifest"]:::assets
    end

    %% Smooth Scroll Integration
    subgraph "Smooth Scroll Integration"
        L1["lenis-scroll.tsx"]:::lib
    end

    %% Configuration & Build
    subgraph "Configuration & Build"
        CFG1["next.config.ts"]:::config
        CFG2["tailwind.config.ts"]:::config
        CFG3["tsconfig.json"]:::config
        CFG4["eslint.config.mjs"]:::config
        CFG5["postcss.config.mjs"]:::config
    end

    %% Relationships: Next.js Application Core to UI Components
    A1 -->|"definesStructure"| C1
    A2 -->|"routesTo"| C1

    %% UI Components orchestration
    C1 -->|"orchestrates"| C2
    C1 -->|"orchestrates"| C3
    C1 -->|"orchestrates"| C4
    C1 -->|"orchestrates"| C5
    C1 -->|"orchestrates"| C6
    C1 -->|"orchestrates"| C7
    C1 -->|"orchestrates"| C8

    %% Projects Section dependency
    C3 -->|"uses"| C9

    %% UI Components reference Static Assets
    C2 -->|"loadsAsset"| S1
    C3 -->|"references"| S2

    %% Smooth Scroll Integration used by Main Container
    L1 -->|"scrollConfig"| C1

    %% Configuration support to Next.js Core and UI Components
    CFG1 -->|"configures"| A1
    CFG1 -->|"configures"| C1
    CFG2 -->|"styles"| C1
    CFG2 -->|"styles"| C2
    CFG3 -->|"TypeScriptSetup"| A1
    CFG3 -->|"TypeScriptSetup"| C1
    CFG4 -->|"linting"| A1
    CFG4 -->|"linting"| C1
    CFG5 -->|"postcssProcessing"| A1
    CFG5 -->|"postcssProcessing"| C1

    %% Click Events for Next.js Application Core
    click A1 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/app/layout.tsx"
    click A2 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/app/page.tsx"
    click A3 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/app/globals.css"
    click A4 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/app/robots.ts"
    click A5 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/app/sitemap.ts"

    %% Click Events for UI Components
    click C1 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/main-container.tsx"
    click C2 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/hero-section.tsx"
    click C3 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/projects-section.tsx"
    click C4 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/about-section.tsx"
    click C5 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/skills-section.tsx"
    click C6 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/experience-section.tsx"
    click C7 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/navbar.tsx"
    click C8 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/footer.tsx"
    click C9 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/project-card.tsx"
    click C10 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/components/coming-soon.tsx"

    %% Click Events for Static Assets
    click S1 "https://github.com/m-a-n-i-k/manik-dingra/tree/main/public/"
    click S2 "https://github.com/m-a-n-i-k/manik-dingra/tree/main/public/projects/"
    click S3 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/public/site.webmanifest"

    %% Click Event for Smooth Scroll Integration
    click L1 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/lib/lenis-scroll.tsx"

    %% Click Events for Configuration & Build
    click CFG1 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/next.config.ts"
    click CFG2 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/tailwind.config.ts"
    click CFG3 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/tsconfig.json"
    click CFG4 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/eslint.config.mjs"
    click CFG5 "https://github.com/m-a-n-i-k/manik-dingra/blob/main/postcss.config.mjs"

    %% Styles
    classDef app fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef comp fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef assets fill:#FFFACD,stroke:#000,stroke-width:1px;
    classDef lib fill:#FFB6C1,stroke:#000,stroke-width:1px;
    classDef config fill:#DDA0DD,stroke:#000,stroke-width:1px;
```
