# brahim-r/verc1 architecture

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

- Interactive diagram: https://gitdiagram.com/brahim-r/verc1
- Repository: https://github.com/brahim-r/verc1

## Overview

This repository is a React portfolio and learning site, despite the boilerplate-focused README. A visitor enters the routed application, sees pages inside a shared layout, and can browse portfolio content, tutorials, a sitemap, and mini-games. The graph also captures theme persistence and background generation. Some page and game implementations were not excerpted, so their internal relationships are left unconnected rather than inferred.

Main entry points: [`src/components/App.tsx`](https://github.com/brahim-r/verc1/blob/master/src/components/App.tsx) (App routes), [`src/layouts/MainLayout.tsx`](https://github.com/brahim-r/verc1/blob/master/src/layouts/MainLayout.tsx) (Main layout), [`src/pages/ProjectDetail.tsx`](https://github.com/brahim-r/verc1/blob/master/src/pages/ProjectDetail.tsx) (Project detail), [`src/pages/Sitemap.tsx`](https://github.com/brahim-r/verc1/blob/master/src/pages/Sitemap.tsx) (Site map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[index.tsx]"]
  node_router["App routes<br/>[App.tsx]"]
  node_layout["Main layout<br/>[MainLayout.tsx]"]
end

subgraph group_portfolio["Portfolio pages"]
  node_home["Home<br/>[Home.tsx]"]
  node_projects["Projects<br/>[Projects.tsx]"]
  node_projectdetail["Project detail<br/>[ProjectDetail.tsx]"]
  node_sitemap["Site map<br/>[Sitemap.tsx]"]
end

subgraph group_learning["Learning content"]
  node_gamespage["Mini-games page<br/>[MiniGames.tsx]"]
  node_osisorter["OSI sorter<br/>[OSISorter.tsx]"]
  node_portblocks["Port Blocks<br/>[PortBlocks.tsx]"]
  node_terraform["Terraform matcher"]
  node_tutorials["Tutorials<br/>[Tutorials.tsx]"]
  node_tutorialdetail["Tutorial detail<br/>[TutorialDetail.tsx]"]
end

subgraph group_presentation["Theme and presentation"]
  node_themebutton["Theme toggle<br/>[ThemeToggle.tsx]"]
  node_themehook["Theme state<br/>[useTheme.ts]"]
  node_gradients["Gradient generator<br/>[gradients.ts]"]
  node_cybershell["Cyber shell<br/>[CyberShell.tsx]"]
  node_claycard["Clay card<br/>[ClayCard.tsx]"]
  node_claybutton["Clay button<br/>[ClayButton.tsx]"]
end

node_visitor(("Visitor"))
node_browser[("Browser localStorage")]

node_visitor -->|"opens site"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"routes through"| node_layout
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_projects
node_router -->|"routes to"| node_projectdetail
node_router -->|"routes to"| node_gamespage
node_router -->|"routes to"| node_tutorials
node_router -->|"routes to"| node_tutorialdetail
node_router -->|"routes to"| node_sitemap
node_layout -->|"renders"| node_themebutton
node_layout -->|"reads theme"| node_themehook
node_layout -->|"gets background"| node_gradients
node_themebutton -->|"uses state"| node_themehook
node_themehook -->|"reads and writes"| node_browser
node_projectdetail -->|"renders"| node_cybershell
node_projectdetail -->|"renders"| node_claycard
node_projectdetail -->|"renders"| node_claybutton
node_sitemap -->|"renders"| node_cybershell
node_sitemap -->|"renders"| node_claycard

click node_entry "https://github.com/brahim-r/verc1/blob/master/src/index.tsx"
click node_router "https://github.com/brahim-r/verc1/blob/master/src/components/App.tsx"
click node_layout "https://github.com/brahim-r/verc1/blob/master/src/layouts/MainLayout.tsx"
click node_home "https://github.com/brahim-r/verc1/blob/master/src/pages/Home.tsx"
click node_projects "https://github.com/brahim-r/verc1/blob/master/src/pages/Projects.tsx"
click node_projectdetail "https://github.com/brahim-r/verc1/blob/master/src/pages/ProjectDetail.tsx"
click node_sitemap "https://github.com/brahim-r/verc1/blob/master/src/pages/Sitemap.tsx"
click node_gamespage "https://github.com/brahim-r/verc1/blob/master/src/pages/MiniGames.tsx"
click node_osisorter "https://github.com/brahim-r/verc1/blob/master/src/games/OSISorter.tsx"
click node_portblocks "https://github.com/brahim-r/verc1/blob/master/src/games/PortBlocks.tsx"
click node_terraform "https://github.com/brahim-r/verc1/blob/master/src/games/TerraformMatcher.tsx"
click node_tutorials "https://github.com/brahim-r/verc1/blob/master/src/pages/Tutorials.tsx"
click node_tutorialdetail "https://github.com/brahim-r/verc1/blob/master/src/pages/TutorialDetail.tsx"
click node_themebutton "https://github.com/brahim-r/verc1/blob/master/src/components/ThemeToggle.tsx"
click node_themehook "https://github.com/brahim-r/verc1/blob/master/src/hooks/useTheme.ts"
click node_gradients "https://github.com/brahim-r/verc1/blob/master/src/utils/gradients.ts"
click node_cybershell "https://github.com/brahim-r/verc1/blob/master/src/components/CyberShell.tsx"
click node_claycard "https://github.com/brahim-r/verc1/blob/master/src/components/ClayCard.tsx"
click node_claybutton "https://github.com/brahim-r/verc1/blob/master/src/components/ClayButton.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_entry,node_router,node_layout toneBlue
class node_home,node_projects,node_projectdetail,node_sitemap,node_browser toneAmber
class node_gamespage,node_osisorter,node_portblocks,node_terraform,node_tutorials,node_tutorialdetail toneMint
class node_themebutton,node_themehook,node_gradients,node_cybershell,node_claycard,node_claybutton toneRose
class node_visitor toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/brahim-r/verc1/blob/master/src/index.tsx): `src/index.tsx`
- [App routes](https://github.com/brahim-r/verc1/blob/master/src/components/App.tsx): `src/components/App.tsx`
- [Main layout](https://github.com/brahim-r/verc1/blob/master/src/layouts/MainLayout.tsx): `src/layouts/MainLayout.tsx`

### Portfolio pages

- [Home](https://github.com/brahim-r/verc1/blob/master/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Projects](https://github.com/brahim-r/verc1/blob/master/src/pages/Projects.tsx): `src/pages/Projects.tsx`
- [Project detail](https://github.com/brahim-r/verc1/blob/master/src/pages/ProjectDetail.tsx): `src/pages/ProjectDetail.tsx`
- [Site map](https://github.com/brahim-r/verc1/blob/master/src/pages/Sitemap.tsx): `src/pages/Sitemap.tsx`

### Learning content

- [Mini-games page](https://github.com/brahim-r/verc1/blob/master/src/pages/MiniGames.tsx): `src/pages/MiniGames.tsx`
- [OSI sorter](https://github.com/brahim-r/verc1/blob/master/src/games/OSISorter.tsx): `src/games/OSISorter.tsx`
- [Port Blocks](https://github.com/brahim-r/verc1/blob/master/src/games/PortBlocks.tsx): `src/games/PortBlocks.tsx`
- [Terraform matcher](https://github.com/brahim-r/verc1/blob/master/src/games/TerraformMatcher.tsx): `src/games/TerraformMatcher.tsx`
- [Tutorials](https://github.com/brahim-r/verc1/blob/master/src/pages/Tutorials.tsx): `src/pages/Tutorials.tsx`
- [Tutorial detail](https://github.com/brahim-r/verc1/blob/master/src/pages/TutorialDetail.tsx): `src/pages/TutorialDetail.tsx`

### Theme and presentation

- [Theme toggle](https://github.com/brahim-r/verc1/blob/master/src/components/ThemeToggle.tsx): `src/components/ThemeToggle.tsx`
- [Theme state](https://github.com/brahim-r/verc1/blob/master/src/hooks/useTheme.ts): `src/hooks/useTheme.ts`
- [Gradient generator](https://github.com/brahim-r/verc1/blob/master/src/utils/gradients.ts): `src/utils/gradients.ts`
- [Cyber shell](https://github.com/brahim-r/verc1/blob/master/src/components/CyberShell.tsx): `src/components/CyberShell.tsx`
- [Clay card](https://github.com/brahim-r/verc1/blob/master/src/components/ClayCard.tsx): `src/components/ClayCard.tsx`
- [Clay button](https://github.com/brahim-r/verc1/blob/master/src/components/ClayButton.tsx): `src/components/ClayButton.tsx`

### Other components

- **Visitor**
- **Browser localStorage**

## Connections

- Visitor → React entry: opens site (evidence: `src/index.tsx`)
- React entry → App routes: renders (evidence: `src/index.tsx`)
- App routes → Main layout: routes through (evidence: `src/components/App.tsx`)
- App routes → Home: routes to (evidence: `src/components/App.tsx`)
- App routes → Projects: routes to (evidence: `src/components/App.tsx`)
- App routes → Project detail: routes to (evidence: `src/components/App.tsx`)
- App routes → Mini-games page: routes to (evidence: `src/components/App.tsx`)
- App routes → Tutorials: routes to (evidence: `src/components/App.tsx`)
- App routes → Tutorial detail: routes to (evidence: `src/components/App.tsx`)
- App routes → Site map: routes to (evidence: `src/components/App.tsx`)
- Main layout → Theme toggle: renders (evidence: `src/layouts/MainLayout.tsx`)
- Main layout → Theme state: reads theme (evidence: `src/layouts/MainLayout.tsx`)
- Main layout → Gradient generator: gets background (evidence: `src/layouts/MainLayout.tsx`)
- Theme toggle → Theme state: uses state (evidence: `src/components/ThemeToggle.tsx`)
- Theme state → Browser localStorage: reads and writes (evidence: `src/hooks/useTheme.ts`)
- Project detail → Cyber shell: renders (evidence: `src/pages/ProjectDetail.tsx`)
- Project detail → Clay card: renders (evidence: `src/pages/ProjectDetail.tsx`)
- Project detail → Clay button: renders (evidence: `src/pages/ProjectDetail.tsx`)
- Site map → Cyber shell: renders (evidence: `src/pages/Sitemap.tsx`)
- Site map → Clay card: renders (evidence: `src/pages/Sitemap.tsx`)
