# itsnitinr/vscode-portfolio architecture

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

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

## Overview

1. **Overall shape**
   - This is a **Next.js App Router** project that implements a personal portfolio as a **VS Code–styled single-page experience** with multiple routed sections.
   - The app is built in **TypeScript**, styled primarily with **CSS Modules**, and uses a small set of shared UI components to simulate an editor-like desktop.

2. **Route/page layer**
   - The `app/` directory defines the top-level navigation targets: `about`, `articles`, `contact`, `github`, `projects`, and `settings`, plus the home route.
   - Each route has its own `page.tsx`, which is the main content boundary for that section.
   - `app/layout.tsx` provides the global shell, likely wrapping all routes with shared chrome and global styles.

3. **Editor-like shell and navigation**
   - The portfolio is organized to resemble a code editor window rather than a traditional website.
   - The shared UI chrome is split into reusable pieces such as `Titlebar`, `Sidebar`, `Tabsbar`, `Tab`, `Bottombar`, and `Layout`.
   - These components define the persistent navigation and framing around page-specific content, making the layout itself a major architectural subsystem.

4. **Section-specific content components**
   - Most page content is factored into focused components under `components/`, such as `ArticleCard`, `ProjectCard`, `RepoCard`, `ContactCode`, and `ThemeInfo`.
   - This suggests the route pages are thin composition layers, while the visible content blocks live in reusable presentation components.
   - The `Explorer` and `CommandPalette` components imply more interactive, IDE-like navigation patterns inside the portfolio.

5. **Portfolio data model**
   - Static content is centralized in `data/projects.ts`, which likely feeds the projects page and related cards.
   - Shared domain types live in `types/index.ts`, giving the project a lightweight typed content model rather than hard-coded JSX everywhere.
   - This separation makes the content layer easy to update without changing the shell/UI structure.

6. **Theme system**
   - The repo has an explicit theme subsystem in `lib/themes.ts`, supported by `styles/themes.css` and `public/themes/`.
   - The README indicates multiple VS Code-inspired themes, with **GitHub Dark**, **Dracula**, **Ayu**, and **Nord** already present or planned.
   - The `settings` route and `ThemeInfo` component likely expose theme selection/customization as part of the product experience.

7. **Styling and visual composition**
   - Styling is split between global styles (`styles/globals.css`) and per-component/page CSS modules like `HomePage.module.css`, `Sidebar.module.css`, and `Terminal.module.css`.
   - This keeps each visual subsystem isolated, which is important because the interface is highly composed and theme-sensitive.
   - The presence of a dedicated `styles/themes.css` file suggests theme variables or theme classes are applied globally across the editor shell.

8. **Interactive terminal subsystem**
   - The README calls out an **interactive custom terminal**, implemented by `Terminal.tsx` and likely supported by `CommandPalette.tsx`.
   - This is a distinct behavioral feature, not just decoration: it adds terminal-like interaction to the portfolio and likely drives some navigation or content display flows.
   - In architecture terms, this is one of the main “experience engines” of the site.

9. **Content sections and data presentation**
   - The `articles` page likely presents external writing, probably using `ArticleCard` and potentially environment-backed fetching.
   - The README references **dev.to articles** and an environment file, indicating at least one external content source feeds the portfolio.
   - The `github` page is likely a profile/repository showcase using `RepoCard`, separating external developer identity from local static portfolio content.

10. **Environment and external integration**
   - `.env.example` and the README’s note about `.env.local` indicate runtime configuration is used for article fetching, rather than hardcoding remote data.
   - That makes the data flow: environment config → remote content fetch → page/component rendering.
   - The repository is deployed on **Vercel**, so the app is designed for serverless/edge-friendly Next.js hosting.

11. **Static assets**
   - `public/logos` and `public/themes` hold images and theme-related assets used by the visual shell.
   - These assets are part of the presentation layer, not the domain logic, and likely support the editor branding and theme previews.

12. **Project boundaries to diagram**
   - A good architecture diagram would show:
     - the **global App shell**,
     - the **route pages**,
     - the **shared editor chrome**,
     - the **content/data sources**,
     - the **theme/settings subsystem**,
     - and the **external article/GitHub data source**.
   - The main architectural idea is that the app is a **themed UI framework for portfolio content**, where routing and content are secondary to the persistent VS Code-like interface.

Main entry points: [`app/layout.tsx`](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/layout.tsx) (Layout), [`app/page.tsx`](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/page.tsx) (Home), [`components/Sidebar.tsx`](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Sidebar.tsx) (Sidebar), [`lib/themes.ts`](https://github.com/itsnitinr/vscode-portfolio/blob/main/lib/themes.ts) (Themes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Router"]
  node_layout["Layout<br/>app shell<br/>[layout.tsx]"]
  node_home["Home<br/>route page<br/>[page.tsx]"]
  node_about["About<br/>route page<br/>[page.tsx]"]
  node_articles["Articles<br/>route page<br/>[page.tsx]"]
  node_projects["Projects<br/>route page<br/>[page.tsx]"]
  node_github["GitHub<br/>route page<br/>[page.tsx]"]
  node_contact["Contact<br/>route page<br/>[page.tsx]"]
  node_settings["Settings<br/>route page<br/>[page.tsx]"]
end

subgraph group_chrome["Editor Chrome"]
  node_titlebar["Titlebar<br/>chrome component<br/>[Titlebar.tsx]"]
  node_sidebar["Sidebar<br/>chrome component<br/>[Sidebar.tsx]"]
  node_tabsbar["Tabsbar<br/>chrome component<br/>[Tabsbar.tsx]"]
  node_bottombar["Bottombar<br/>chrome component<br/>[Bottombar.tsx]"]
  node_explorer["Explorer<br/>nav widget<br/>[Explorer.tsx]"]
  node_terminal["Terminal<br/>interaction widget<br/>[Terminal.tsx]"]
  node_palette["Command Palette<br/>interaction widget<br/>[CommandPalette.tsx]"]
end

subgraph group_content["Content Modules"]
  node_articlecard["ArticleCard<br/>content card<br/>[ArticleCard.tsx]"]
  node_projectcard["ProjectCard<br/>content card<br/>[ProjectCard.tsx]"]
  node_repocard["RepoCard<br/>content card<br/>[RepoCard.tsx]"]
  node_contactcode["ContactCode<br/>content block<br/>[ContactCode.tsx]"]
  node_illustration["Illustration<br/>visual block<br/>[Illustration.tsx]"]
end

subgraph group_theme["Theme System"]
  node_themeinfo["ThemeInfo<br/>theme panel<br/>[ThemeInfo.tsx]"]
  node_themes["Themes<br/>theme library<br/>[themes.ts]"]
end

subgraph group_data["Content Data"]
  node_projectsdata["Projects Data<br/>content data<br/>[projects.ts]"]
  node_types["Types<br/>[index.ts]"]
end

node_layout -->|"frames"| node_titlebar
node_layout -->|"frames"| node_sidebar
node_layout -->|"frames"| node_tabsbar
node_layout -->|"frames"| node_bottombar
node_layout -->|"wraps"| node_home
node_layout -->|"wraps"| node_about
node_layout -->|"wraps"| node_articles
node_layout -->|"wraps"| node_projects
node_layout -->|"wraps"| node_github
node_layout -->|"wraps"| node_contact
node_layout -->|"wraps"| node_settings
node_sidebar -->|"contains"| node_explorer
node_sidebar -->|"launches"| node_palette
node_home -->|"uses"| node_terminal
node_home -->|"uses"| node_illustration
node_projects -->|"renders"| node_projectcard
node_projectcard -->|"reads"| node_projectsdata
node_projectsdata -->|"typed by"| node_types
node_articles -->|"renders"| node_articlecard
node_github -->|"renders"| node_repocard
node_contact -->|"renders"| node_contactcode
node_settings -->|"renders"| node_themeinfo
node_themeinfo -->|"uses"| node_themes
node_themes -->|"typed by"| node_types
node_layout -->|"applies"| node_themes

click node_layout "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/layout.tsx"
click node_home "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/page.tsx"
click node_about "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/about/page.tsx"
click node_articles "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/articles/page.tsx"
click node_projects "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/projects/page.tsx"
click node_github "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/github/page.tsx"
click node_contact "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/contact/page.tsx"
click node_settings "https://github.com/itsnitinr/vscode-portfolio/blob/main/app/settings/page.tsx"
click node_titlebar "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Titlebar.tsx"
click node_sidebar "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Sidebar.tsx"
click node_tabsbar "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Tabsbar.tsx"
click node_bottombar "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Bottombar.tsx"
click node_explorer "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Explorer.tsx"
click node_terminal "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Terminal.tsx"
click node_palette "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/CommandPalette.tsx"
click node_themeinfo "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ThemeInfo.tsx"
click node_themes "https://github.com/itsnitinr/vscode-portfolio/blob/main/lib/themes.ts"
click node_projectsdata "https://github.com/itsnitinr/vscode-portfolio/blob/main/data/projects.ts"
click node_types "https://github.com/itsnitinr/vscode-portfolio/blob/main/types/index.ts"
click node_articlecard "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ArticleCard.tsx"
click node_projectcard "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ProjectCard.tsx"
click node_repocard "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/RepoCard.tsx"
click node_contactcode "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ContactCode.tsx"
click node_illustration "https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Illustration.tsx"

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_layout,node_home,node_about,node_articles,node_projects,node_github,node_contact,node_settings toneBlue
class node_titlebar,node_sidebar,node_tabsbar,node_bottombar,node_explorer,node_terminal,node_palette toneAmber
class node_articlecard,node_projectcard,node_repocard,node_contactcode,node_illustration toneMint
class node_themeinfo,node_themes toneRose
class node_projectsdata,node_types toneIndigo
```

## Components

### App Router

Top-level routes and global shell

- [Layout](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/layout.tsx): app shell · Global app wrapper for all routes · `app/layout.tsx`
- [Home](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/page.tsx): route page · Landing route for the portfolio · `app/page.tsx`
- [About](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/about/page.tsx): route page · About section route · `app/about/page.tsx`
- [Articles](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/articles/page.tsx): route page · Writing/articles section route · `app/articles/page.tsx`
- [Projects](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/projects/page.tsx): route page · Portfolio projects route · `app/projects/page.tsx`
- [GitHub](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/github/page.tsx): route page · Developer profile and repositories route · `app/github/page.tsx`
- [Contact](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/contact/page.tsx): route page · Contact section route · `app/contact/page.tsx`
- [Settings](https://github.com/itsnitinr/vscode-portfolio/blob/main/app/settings/page.tsx): route page · Theme and preferences route · `app/settings/page.tsx`

### Editor Chrome

Persistent VS Code-like frame and navigation

- [Titlebar](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Titlebar.tsx): chrome component · Editor-style top chrome · `components/Titlebar.tsx`
- [Sidebar](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Sidebar.tsx): chrome component · Primary navigation frame · `components/Sidebar.tsx`
- [Tabsbar](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Tabsbar.tsx): chrome component · Open-tab navigation strip · `components/Tabsbar.tsx`
- [Bottombar](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Bottombar.tsx): chrome component · Footer status chrome · `components/Bottombar.tsx`
- [Explorer](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Explorer.tsx): nav widget · File-tree style navigation · `components/Explorer.tsx`
- [Terminal](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Terminal.tsx): interaction widget · Interactive terminal experience · `components/Terminal.tsx`
- [Command Palette](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/CommandPalette.tsx): interaction widget · Keyboard command/navigation overlay · `components/CommandPalette.tsx`

### Content Modules

Route-specific presentation components

- [ArticleCard](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ArticleCard.tsx): content card · Article listing presentation · `components/ArticleCard.tsx`
- [ProjectCard](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ProjectCard.tsx): content card · Project listing presentation · `components/ProjectCard.tsx`
- [RepoCard](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/RepoCard.tsx): content card · GitHub repository presentation · `components/RepoCard.tsx`
- [ContactCode](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ContactCode.tsx): content block · Code-styled contact details · `components/ContactCode.tsx`
- [Illustration](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/Illustration.tsx): visual block · Hero/branding visual component · `components/Illustration.tsx`

### Theme System

Theme selection and styling support

- [ThemeInfo](https://github.com/itsnitinr/vscode-portfolio/blob/main/components/ThemeInfo.tsx): theme panel · Theme settings and preview UI · `components/ThemeInfo.tsx`
- [Themes](https://github.com/itsnitinr/vscode-portfolio/blob/main/lib/themes.ts): theme library · Theme definitions and selection logic · `lib/themes.ts`

### Content Data

Static data and shared types

- [Projects Data](https://github.com/itsnitinr/vscode-portfolio/blob/main/data/projects.ts): content data · Static project content source · `data/projects.ts`
- [Types](https://github.com/itsnitinr/vscode-portfolio/blob/main/types/index.ts): shared types · Shared content and domain type definitions · `types/index.ts`

## Connections

- Layout → Titlebar: frames · Global shell composes the top chrome
- Layout → Sidebar: frames · Global shell composes navigation
- Layout → Tabsbar: frames · Global shell composes tab navigation
- Layout → Bottombar: frames · Global shell composes footer chrome
- Layout → Home: wraps · App shell hosts the home route
- Layout → About: wraps · App shell hosts the about route
- Layout → Articles: wraps · App shell hosts the articles route
- Layout → Projects: wraps · App shell hosts the projects route
- Layout → GitHub: wraps · App shell hosts the GitHub route
- Layout → Contact: wraps · App shell hosts the contact route
- Layout → Settings: wraps · App shell hosts the settings route
- Sidebar → Explorer: contains · Sidebar exposes tree-style navigation
- Sidebar → Command Palette: launches · Sidebar supports command-based navigation
- Home → Terminal: uses · Landing page highlights the interactive terminal
- Home → Illustration: uses · Landing page uses the visual hero component
- Projects → ProjectCard: renders · Projects route renders project cards
- ProjectCard → Projects Data: reads · Project cards are backed by static project data
- Projects Data → Types: typed by · Project data uses shared domain types
- Articles → ArticleCard: renders · Articles route renders article cards
- GitHub → RepoCard: renders · GitHub route renders repository/profile cards
- Contact → ContactCode: renders · Contact route presents code-styled contact info
- Settings → ThemeInfo: renders · Settings route exposes theme UI
- ThemeInfo → Themes: uses · Theme panel reads available theme definitions
- Themes → Types: typed by · Theme definitions share common type shapes
- Layout → Themes: applies · Global shell applies theme system styling
