# samarthshukla20/portfolio architecture

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

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

## Overview

This repository is a small Next.js App Router site, likely a personal portfolio or showcase, with a clear route-per-section structure and a shared visual shell.

1. **Top-level architecture**
   - The app is built with **Next.js** using the `app/` directory.
   - Routing is file-based: each folder under `app/` becomes a route segment.
   - There is no visible backend, database, or API layer in the tree; the architecture is primarily **static/UI-driven**.

2. **Root application shell**
   - `app/layout.js` defines the shared page frame used across all routes.
   - `app/globals.css` provides global styling applied site-wide.
   - This is the main cross-cutting layer for typography, spacing, and overall layout behavior.

3. **Landing page**
   - `app/page.js` is the home route (`/`).
   - This is the entry point for the site and likely ties together the main visual identity and navigation to the other sections.

4. **Section-based routes**
   - The app has four dedicated top-level content areas:
     - `app/projects/page.js` → `/projects`
     - `app/hackathons/page.js` → `/hackathons`
     - `app/network/page.js` → `/network`
     - `app/tech/page.js` → `/tech`
   - These are separate presentation routes rather than nested API or domain layers, which suggests a content/portfolio structure organized by topic.

5. **Shared UI components**
   - `components/` contains reusable building blocks used by multiple pages.
   - `components/loader.js` is likely a loading/transition UI used while heavier assets or interactive content initialize.
   - `components/computer.js` is a specialized visual component, probably the most complex shared UI element in the repo.

6. **3D or media asset pipeline**
   - `public/models/computer.glb` is a static model asset served directly by Next.js.
   - The `computer.js` component likely loads and renders this model, which means the app has a client-side interactive/media boundary around that feature.
   - This is the only non-code asset visible, and it appears to support a centerpiece visual on the site.

7. **Data flow**
   - Browser requests a route like `/projects`.
   - Next.js resolves the corresponding `app/.../page.js`.
   - The page composes shared layout/UI from `layout.js`, `components/`, and static assets from `public/`.
   - If the 3D model is used, the browser fetches `computer.glb` from `/public/models/` at runtime.

8. **Interaction boundary**
   - Most pages are likely simple content pages, while the `computer` component is the main candidate for client-side interactivity and performance-sensitive rendering.
   - That means the architecture has a lightweight static/content layer plus one heavier visual subsystem.

9. **Styling and build tooling**
   - The repo includes `postcss.config.mjs`, `eslint.config.mjs`, and `next.config.mjs`, indicating standard Next.js build/lint tooling.
   - `jsconfig.json` suggests path aliasing or editor/runtime resolution support.
   - The README references `next/font` and Geist, so font loading is handled through Next.js rather than manual CSS imports.

10. **Deployment/runtime shape**
   - This is a web app intended to run in the browser and be deployed as a Next.js application, with Vercel being the default deployment target.
   - No custom server process is visible, so the deployment model is the typical Next.js-managed runtime/static hosting setup.

11. **What to draw in an architecture diagram**
   - Draw one central **Next.js app layer** containing:
     - root layout
     - global styles
     - route pages
     - shared components
   - Draw a separate **static assets** boundary for `public/models/computer.glb`.
   - Show the `computer` component as the bridge between UI code and the 3D asset.
   - Show the four content routes as sibling pages under the app router.

12. **Overall characterization**
   - This is a content-focused, multi-section Next.js site with a shared shell and one standout interactive asset path.
   - The architecture is intentionally simple: route-driven pages, reusable components, and static public assets, with no visible service-tier complexity.

Main entry points: [`app/layout.js`](https://github.com/samarthshukla20/portfolio/blob/master/app/layout.js) (Root layout), [`app/page.js`](https://github.com/samarthshukla20/portfolio/blob/master/app/page.js) (Home), [`components/loader.js`](https://github.com/samarthshukla20/portfolio/blob/master/components/loader.js) (Loader), [`components/computer.js`](https://github.com/samarthshukla20/portfolio/blob/master/components/computer.js) (Computer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_app["Next.js app"]
  node_node_layout["Root layout<br/>app shell<br/>[layout.js]"]
  node_node_styles["Global CSS<br/>site styles<br/>[globals.css]"]
  node_node_home["Home<br/>route page<br/>[page.js]"]
  node_node_projects["Projects<br/>route page<br/>[page.js]"]
  node_node_hackathons["Hackathons<br/>route page<br/>[page.js]"]
  node_node_network["Network<br/>route page<br/>[page.js]"]
  node_node_tech["Tech<br/>route page<br/>[page.js]"]
end

subgraph group_grp_components["Shared UI"]
  node_node_loader(("Loader<br/>ui component<br/>[loader.js]"))
  node_node_computer["Computer<br/>3d component<br/>[computer.js]"]
end

subgraph group_grp_assets["Static assets"]
  node_node_model[("Computer GLB<br/>3d asset<br/>[computer.glb]")]
end

subgraph group_grp_tooling["Tooling"]
  node_node_nextconfig["Next config<br/>build config<br/>[next.config.mjs]"]
  node_node_postcss["PostCSS<br/>build config<br/>[postcss.config.mjs]"]
  node_node_eslint["ESLint<br/>lint config<br/>[eslint.config.mjs]"]
  node_node_jsconfig["JS config<br/>editor config<br/>[jsconfig.json]"]
  node_node_readme["README<br/>docs<br/>[README.md]"]
end

node_node_layout -->|"applies"| node_node_styles
node_node_home -->|"uses"| node_node_layout
node_node_projects -->|"uses"| node_node_layout
node_node_hackathons -->|"uses"| node_node_layout
node_node_network -->|"uses"| node_node_layout
node_node_tech -->|"uses"| node_node_layout
node_node_home -->|"may embed"| node_node_computer
node_node_projects -->|"may use"| node_node_loader
node_node_hackathons -->|"may use"| node_node_loader
node_node_network -->|"may use"| node_node_loader
node_node_tech -->|"may use"| node_node_loader
node_node_computer -->|"loads"| node_node_model
node_node_computer -->|"coordinates"| node_node_loader
node_node_nextconfig -.->|"supports"| node_node_home
node_node_postcss -.->|"processes"| node_node_styles
node_node_eslint -.->|"checks"| node_node_home
node_node_jsconfig -.->|"resolves"| node_node_computer
node_node_readme -.->|"describes"| node_node_home

click node_node_layout "https://github.com/samarthshukla20/portfolio/blob/master/app/layout.js"
click node_node_styles "https://github.com/samarthshukla20/portfolio/blob/master/app/globals.css"
click node_node_home "https://github.com/samarthshukla20/portfolio/blob/master/app/page.js"
click node_node_projects "https://github.com/samarthshukla20/portfolio/blob/master/app/projects/page.js"
click node_node_hackathons "https://github.com/samarthshukla20/portfolio/blob/master/app/hackathons/page.js"
click node_node_network "https://github.com/samarthshukla20/portfolio/blob/master/app/network/page.js"
click node_node_tech "https://github.com/samarthshukla20/portfolio/blob/master/app/tech/page.js"
click node_node_loader "https://github.com/samarthshukla20/portfolio/blob/master/components/loader.js"
click node_node_computer "https://github.com/samarthshukla20/portfolio/blob/master/components/computer.js"
click node_node_model "https://github.com/samarthshukla20/portfolio/blob/master/public/models/computer.glb"
click node_node_nextconfig "https://github.com/samarthshukla20/portfolio/blob/master/next.config.mjs"
click node_node_postcss "https://github.com/samarthshukla20/portfolio/blob/master/postcss.config.mjs"
click node_node_eslint "https://github.com/samarthshukla20/portfolio/blob/master/eslint.config.mjs"
click node_node_jsconfig "https://github.com/samarthshukla20/portfolio/blob/master/jsconfig.json"
click node_node_readme "https://github.com/samarthshukla20/portfolio/blob/master/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_node_layout,node_node_styles,node_node_home,node_node_projects,node_node_hackathons,node_node_network,node_node_tech toneBlue
class node_node_loader,node_node_computer toneAmber
class node_node_model toneMint
class node_node_nextconfig,node_node_postcss,node_node_eslint,node_node_jsconfig,node_node_readme toneRose
```

## Components

### Next.js app

App Router routes and shared shell

- [Root layout](https://github.com/samarthshukla20/portfolio/blob/master/app/layout.js): app shell · Shared page frame for all routes · `app/layout.js`
- [Global CSS](https://github.com/samarthshukla20/portfolio/blob/master/app/globals.css): site styles · Application-wide styling layer · `app/globals.css`
- [Home](https://github.com/samarthshukla20/portfolio/blob/master/app/page.js): route page · Landing route for the site · `app/page.js`
- [Projects](https://github.com/samarthshukla20/portfolio/blob/master/app/projects/page.js): route page · Projects section route · `app/projects/page.js`
- [Hackathons](https://github.com/samarthshukla20/portfolio/blob/master/app/hackathons/page.js): route page · Hackathons section route · `app/hackathons/page.js`
- [Network](https://github.com/samarthshukla20/portfolio/blob/master/app/network/page.js): route page · Network section route · `app/network/page.js`
- [Tech](https://github.com/samarthshukla20/portfolio/blob/master/app/tech/page.js): route page · Tech section route · `app/tech/page.js`

### Shared UI

Reusable visual components

- [Loader](https://github.com/samarthshukla20/portfolio/blob/master/components/loader.js): ui component · Shared loading or transition UI · `components/loader.js`
- [Computer](https://github.com/samarthshukla20/portfolio/blob/master/components/computer.js): 3d component · Specialized visual component that likely renders the model · `components/computer.js`

### Static assets

Public files served at runtime

- [Computer GLB](https://github.com/samarthshukla20/portfolio/blob/master/public/models/computer.glb): 3d asset · Static 3D model consumed at runtime · `public/models/computer.glb`

### Tooling

Build, lint, and config files

- [Next config](https://github.com/samarthshukla20/portfolio/blob/master/next.config.mjs): build config · Next.js framework configuration · `next.config.mjs`
- [PostCSS](https://github.com/samarthshukla20/portfolio/blob/master/postcss.config.mjs): build config · CSS processing configuration · `postcss.config.mjs`
- [ESLint](https://github.com/samarthshukla20/portfolio/blob/master/eslint.config.mjs): lint config · Code quality and linting setup · `eslint.config.mjs`
- [JS config](https://github.com/samarthshukla20/portfolio/blob/master/jsconfig.json): editor config · Path and language resolution settings · `jsconfig.json`
- [README](https://github.com/samarthshukla20/portfolio/blob/master/README.md): docs · Project overview and usage notes · `README.md`

## Connections

- Root layout → Global CSS: applies · Global styles are loaded by the shared shell
- Home → Root layout: uses · Home route renders within the root layout
- Projects → Root layout: uses · Section route renders within the root layout
- Hackathons → Root layout: uses · Section route renders within the root layout
- Network → Root layout: uses · Section route renders within the root layout
- Tech → Root layout: uses · Section route renders within the root layout
- Home → Computer: may embed · Landing page likely includes the centerpiece visual component
- Projects → Loader: may use · Route pages can share loading UI
- Hackathons → Loader: may use · Route pages can share loading UI
- Network → Loader: may use · Route pages can share loading UI
- Tech → Loader: may use · Route pages can share loading UI
- Computer → Computer GLB: loads · 3D component bridges code and static model asset
- Computer → Loader: coordinates · Interactive visual may show loading state while asset initializes
- Next config → Home: supports · Framework config supports app runtime and build
- PostCSS → Global CSS: processes · CSS toolchain supports global styles
- ESLint → Home: checks · Linting applies across app code
- JS config → Computer: resolves · Editor/runtime path resolution supports components
- README → Home: describes · Documentation covers the app structure and usage
