# mustafa-ashraf-dev/2002-kit architecture

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

- Interactive diagram: https://gitdiagram.com/mustafa-ashraf-dev/2002-kit
- Repository: https://github.com/mustafa-ashraf-dev/2002-kit

## Overview

2002 devs is a Next.js learning notebook for web development. The main visitor workflow is browsing or searching component and concept listings, opening a detail page, then inspecting a live component preview, implementation, and version history or reading structured concept content. The README also describes patterns and articles, but those areas are currently coming-soon or placeholder routes. The graph follows documented and excerpted calls; detail-page rendering beyond the supplied component excerpt and unsampled subsystems are not inferred.

Main entry points: [`lib/fetchdata.ts`](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/lib/fetchdata.ts) (Content retrieval), [`app/page.tsx`](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/page.tsx) (Home page), [`app/components/[slug]/page.tsx`](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/components/%5Bslug%5D/page.tsx) (Component detail), [`app/components/page.tsx`](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/components/page.tsx) (Component listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["Pages and routes"]
  node_home["Home page<br/>[page.tsx]"]
  node_component_list["Component listing<br/>[page.tsx]"]
  node_component_detail["Component detail<br/>[page.tsx]"]
  node_concept_list["Concept listing<br/>[page.tsx]"]
  node_concept_detail["Concept detail<br/>[page.tsx]"]
  node_article_routes["Article pages<br/>[page.tsx]"]
  node_pattern_routes["Pattern pages<br/>[page.tsx]"]
  node_article_list["Article listing<br/>[page.tsx]"]
  node_pattern_list["Pattern listing<br/>[page.tsx]"]
end

subgraph group_content["Content and retrieval"]
  node_fetch["Content retrieval<br/>[fetchdata.ts]"]
  node_component_data["Component entries<br/>[data.ts]"]
  node_concept_data["Concept entries<br/>[data.ts]"]
  node_types["Content types<br/>[types.ts]"]
end

subgraph group_presentation["UI and previews"]
  node_search["URL search<br/>[search.tsx]"]
  node_preview["Live preview<br/>[LivePreview.tsx]"]
  node_code_tabs["Code tabs<br/>[CodeTabs.tsx]"]
  node_diff["Version diff<br/>[DiffCode.tsx]"]
  node_badge["Status badge<br/>[Badge.tsx]"]
  node_coming_soon["Coming-soon teaser<br/>[ComingSoon.tsx]"]
  node_concept_body["Concept body<br/>[ConceptBody.tsx]"]
end

subgraph group_visuals["Visual experience"]
  node_hero["Homepage hero<br/>[Hero.tsx]"]
  node_hero_background["Hero background<br/>[HeroBackground.tsx]"]
  node_crt_warp["CRT effect<br/>[CRTWarp.tsx]"]
  node_header["Site header<br/>[Header.tsx]"]
  node_footer["Site footer<br/>[Footer.tsx]"]
  node_layout["App layout<br/>[layout.tsx]"]
  node_back_top["Back to top<br/>[BackToTop.tsx]"]
  node_scroll_progress["Reading progress"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"browses"| node_component_list
node_visitor -->|"browses"| node_concept_list
node_visitor -->|"browses"| node_article_list
node_visitor -->|"browses"| node_pattern_list
node_home -->|"loads previews"| node_fetch
node_component_list -->|"filters components"| node_fetch
node_concept_list -->|"filters concepts"| node_fetch
node_component_detail -->|"loads by slug"| node_fetch
node_fetch -->|"reads"| node_component_data
node_fetch -->|"reads"| node_concept_data
node_component_data -->|"uses types"| node_types
node_concept_data -->|"uses types"| node_types
node_component_list -->|"renders"| node_search
node_concept_list -->|"renders"| node_search
node_component_detail -->|"renders preview"| node_preview
node_home -->|"renders cards"| node_preview
node_component_list -->|"renders cards"| node_preview
node_component_detail -->|"renders code"| node_code_tabs
node_component_detail -->|"renders history"| node_diff
node_component_detail -->|"renders status"| node_badge
node_component_list -->|"renders status"| node_badge
node_home -->|"renders status"| node_badge
node_home -->|"teases sections"| node_coming_soon
node_article_list -->|"renders placeholder"| node_coming_soon
node_pattern_list -->|"renders placeholder"| node_coming_soon
node_concept_detail -->|"loads concept"| node_fetch
node_concept_detail -.->|"renders content"| node_concept_body
node_home -->|"renders"| node_hero
node_hero -->|"renders"| node_hero_background
node_hero_background -->|"renders effect"| node_crt_warp
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_layout -->|"renders"| node_back_top
node_concept_detail -->|"renders"| node_scroll_progress
node_visitor -->|"opens detail"| node_component_detail
node_visitor -->|"reads concept"| node_concept_detail
node_visitor -->|"opens article"| node_article_routes
node_visitor -->|"opens pattern"| node_pattern_routes

click node_home "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/page.tsx"
click node_component_list "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/components/page.tsx"
click node_component_detail "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/components/%5Bslug%5D/page.tsx"
click node_concept_list "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/concepts/page.tsx"
click node_concept_detail "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/concepts/%5Bslug%5D/page.tsx"
click node_article_routes "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/articles/%5Bslug%5D/page.tsx"
click node_pattern_routes "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/patterns/%5Bslug%5D/page.tsx"
click node_article_list "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/articles/page.tsx"
click node_pattern_list "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/patterns/page.tsx"
click node_fetch "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/lib/fetchdata.ts"
click node_component_data "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/content/components/data.ts"
click node_concept_data "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/content/concepts/data.ts"
click node_types "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/lib/types.ts"
click node_search "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/search.tsx"
click node_preview "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/LivePreview.tsx"
click node_code_tabs "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/CodeTabs.tsx"
click node_diff "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/DiffCode.tsx"
click node_badge "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/Badge.tsx"
click node_coming_soon "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/ComingSoon.tsx"
click node_concept_body "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/ConceptBody.tsx"
click node_hero "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/Hero.tsx"
click node_hero_background "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/HeroBackground.tsx"
click node_crt_warp "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/CRTWarp.tsx"
click node_header "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/Header.tsx"
click node_footer "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/Footer.tsx"
click node_layout "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/layout.tsx"
click node_back_top "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/BackToTop.tsx"
click node_scroll_progress "https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/ScrollProgressBar.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_home,node_component_list,node_component_detail,node_concept_list,node_concept_detail,node_article_routes,node_pattern_routes,node_article_list,node_pattern_list toneBlue
class node_fetch,node_component_data,node_concept_data,node_types toneAmber
class node_search,node_preview,node_code_tabs,node_diff,node_badge,node_coming_soon,node_concept_body toneMint
class node_hero,node_hero_background,node_crt_warp,node_header,node_footer,node_layout,node_back_top,node_scroll_progress toneRose
class node_visitor toneIndigo
```

## Components

### Pages and routes

- [Home page](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/page.tsx): `app/page.tsx`
- [Component listing](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/components/page.tsx): `app/components/page.tsx`
- [Component detail](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/components/%5Bslug%5D/page.tsx): `app/components/[slug]/page.tsx`
- [Concept listing](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/concepts/page.tsx): `app/concepts/page.tsx`
- [Concept detail](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/concepts/%5Bslug%5D/page.tsx): `app/concepts/[slug]/page.tsx`
- [Article pages](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/articles/%5Bslug%5D/page.tsx): `app/articles/[slug]/page.tsx`
- [Pattern pages](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/patterns/%5Bslug%5D/page.tsx): `app/patterns/[slug]/page.tsx`
- [Article listing](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/articles/page.tsx): `app/articles/page.tsx`
- [Pattern listing](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/patterns/page.tsx): `app/patterns/page.tsx`

### Content and retrieval

- [Content retrieval](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/lib/fetchdata.ts): `lib/fetchdata.ts`
- [Component entries](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/content/components/data.ts): `content/components/data.ts`
- [Concept entries](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/content/concepts/data.ts): `content/concepts/data.ts`
- [Content types](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/lib/types.ts): `lib/types.ts`

### UI and previews

- [URL search](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/search.tsx): `design/ui/search.tsx`
- [Live preview](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/LivePreview.tsx): `design/ui/LivePreview.tsx`
- [Code tabs](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/CodeTabs.tsx): `design/ui/CodeTabs.tsx`
- [Version diff](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/DiffCode.tsx): `design/ui/DiffCode.tsx`
- [Status badge](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/Badge.tsx): `design/ui/Badge.tsx`
- [Coming-soon teaser](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/ComingSoon.tsx): `design/ui/ComingSoon.tsx`
- [Concept body](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/ConceptBody.tsx): `design/ui/ConceptBody.tsx`

### Visual experience

- [Homepage hero](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/Hero.tsx): `design/layout/Hero.tsx`
- [Hero background](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/HeroBackground.tsx): `design/ui/HeroBackground.tsx`
- [CRT effect](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/CRTWarp.tsx): `design/layout/CRTWarp.tsx`
- [Site header](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/Header.tsx): `design/layout/Header.tsx`
- [Site footer](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/layout/Footer.tsx): `design/layout/Footer.tsx`
- [App layout](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/app/layout.tsx): `app/layout.tsx`
- [Back to top](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/BackToTop.tsx): `design/ui/BackToTop.tsx`
- [Reading progress](https://github.com/mustafa-ashraf-dev/2002-kit/blob/main/design/ui/ScrollProgressBar.tsx): `design/ui/ScrollProgressBar.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: opens (evidence: `README.md`)
- Visitor → Component listing: browses (evidence: `README.md`)
- Visitor → Concept listing: browses (evidence: `README.md`)
- Visitor → Article listing: browses (evidence: `README.md`)
- Visitor → Pattern listing: browses (evidence: `README.md`)
- Home page → Content retrieval: loads previews (evidence: `app/page.tsx`)
- Component listing → Content retrieval: filters components (evidence: `app/components/page.tsx`)
- Concept listing → Content retrieval: filters concepts (evidence: `app/concepts/page.tsx`)
- Component detail → Content retrieval: loads by slug (evidence: `app/components/[slug]/page.tsx`)
- Content retrieval → Component entries: reads (evidence: `lib/fetchdata.ts`)
- Content retrieval → Concept entries: reads (evidence: `lib/fetchdata.ts`)
- Component entries → Content types: uses types (evidence: `content/components/data.ts`)
- Concept entries → Content types: uses types (evidence: `content/concepts/data.ts`)
- Component listing → URL search: renders (evidence: `app/components/page.tsx`)
- Concept listing → URL search: renders (evidence: `app/concepts/page.tsx`)
- Component detail → Live preview: renders preview (evidence: `app/components/[slug]/page.tsx`)
- Home page → Live preview: renders cards (evidence: `app/page.tsx`)
- Component listing → Live preview: renders cards (evidence: `app/components/page.tsx`)
- Component detail → Code tabs: renders code (evidence: `app/components/[slug]/page.tsx`)
- Component detail → Version diff: renders history (evidence: `app/components/[slug]/page.tsx`)
- Component detail → Status badge: renders status (evidence: `app/components/[slug]/page.tsx`)
- Component listing → Status badge: renders status (evidence: `app/components/page.tsx`)
- Home page → Status badge: renders status (evidence: `app/page.tsx`)
- Home page → Coming-soon teaser: teases sections (evidence: `app/page.tsx`)
- Article listing → Coming-soon teaser: renders placeholder (evidence: `app/articles/page.tsx`)
- Pattern listing → Coming-soon teaser: renders placeholder (evidence: `app/patterns/page.tsx`)
- Concept detail → Content retrieval: loads concept (evidence: `app/concepts/[slug]/page.tsx`)
- Concept detail → Concept body: renders content
- Home page → Homepage hero: renders (evidence: `app/page.tsx`)
- Homepage hero → Hero background: renders (evidence: `design/layout/Hero.tsx`)
- Hero background → CRT effect: renders effect (evidence: `design/ui/HeroBackground.tsx`)
- App layout → Site header: renders (evidence: `app/layout.tsx`)
- App layout → Site footer: renders (evidence: `app/layout.tsx`)
- App layout → Back to top: renders (evidence: `app/layout.tsx`)
- Concept detail → Reading progress: renders (evidence: `app/concepts/[slug]/page.tsx`)
- Visitor → Component detail: opens detail (evidence: `README.md`)
- Visitor → Concept detail: reads concept (evidence: `README.md`)
- Visitor → Article pages: opens article (evidence: `README.md`)
- Visitor → Pattern pages: opens pattern (evidence: `README.md`)
