# dinglevarshney12/blogghar architecture

> Architecture diagram of the GitHub repository dinglevarshney12/blogghar, 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/dinglevarshney12/blogghar
- Repository: https://github.com/dinglevarshney12/blogghar

## Overview

Blogghar is a Next.js blog browsing and authoring frontend. Readers land on a homepage, browse or search and paginate blog listings, and open individual posts; the authoring page provides title, content-editor, and category inputs. The visible data path fetches blog collections through the blogs API, with a shared server helper also fetching that endpoint. The tree and excerpts show UI composition but do not establish persistence, publishing behavior, or backend implementation. Unsampled components are represented at their enclosing directory where appropriate.

Main entry points: [`app/explore/page.jsx`](https://github.com/dinglevarshney12/blogghar/blob/main/app/explore/page.jsx) (Explore listings), [`app/page.jsx`](https://github.com/dinglevarshney12/blogghar/blob/main/app/page.jsx) (Home page), [`components/ui/Recommend&LatestBlog.jsx`](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/Recommend%26LatestBlog.jsx) (Recommendations), [`hooks/getData.jsx`](https://github.com/dinglevarshney12/blogghar/blob/main/hooks/getData.jsx) (Blog data helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Blog discovery"]
  node_home["Home page<br/>[page.jsx]"]
  node_explore["Explore listings<br/>[page.jsx]"]
  node_search["Search input<br/>[search_input.jsx]"]
  node_pagination["Pagination<br/>[pagination.jsx]"]
  node_categories["Categories page<br/>[page.jsx]"]
end

subgraph group_content["Blog content"]
  node_blogcards["Blog cards<br/>[blogCard.jsx]"]
  node_recommendations["Recommendations"]
  node_listcard["List blog card<br/>[ListBlogCard.jsx]"]
  node_detail["Blog detail<br/>[page.jsx]"]
  node_datahelper["Blog data helper<br/>[getData.jsx]"]
  node_blogapi["Blogs API route<br/>[route.js]"]
end

subgraph group_authoring["Blog authoring"]
  node_create["Create blog page<br/>[page.jsx]"]
  node_editor["Text editor<br/>[TextEditor.jsx]"]
  node_categoryselect["Category selector"]
  node_categorydata["Category definitions<br/>[index.jsx]"]
end

subgraph group_shell["App shell"]
  node_layout["Root layout<br/>[layout.js]"]
  node_navbar["Navigation bar<br/>[navbar.jsx]"]
  node_footer["Footer<br/>[footer.jsx]"]
  node_theme["Theme provider<br/>[themeProvider.js]"]
end

subgraph group_shared["Shared UI"]
  node_primitives["UI primitives"]
  node_utils["Class utilities<br/>[utils.js]"]
end

node_reader(("Reader"))
node_author(("Author"))

node_reader -->|"opens"| node_home
node_home -->|"fetches blogs"| node_blogapi
node_home -->|"renders"| node_blogcards
node_home -->|"renders"| node_recommendations
node_reader -->|"browses"| node_explore
node_explore -->|"requests data"| node_datahelper
node_datahelper -->|"fetches endpoint"| node_blogapi
node_explore -->|"renders"| node_search
node_search -->|"updates query"| node_explore
node_explore -->|"renders"| node_pagination
node_explore -->|"renders results"| node_blogcards
node_reader -->|"opens post"| node_detail
node_detail -->|"requests data"| node_datahelper
node_detail -->|"renders"| node_recommendations
node_recommendations -->|"requests data"| node_datahelper
node_recommendations -->|"renders"| node_listcard
node_author -->|"opens authoring"| node_create
node_create -->|"renders editor"| node_editor
node_create -->|"renders selector"| node_categoryselect
node_categoryselect -->|"uses categories"| node_categorydata
node_layout -->|"renders"| node_navbar
node_layout -->|"renders"| node_footer
node_layout -->|"configures theme"| node_theme
node_categories -->|"uses categories"| node_categorydata
node_blogcards -.->|"uses components"| node_primitives
node_navbar -.->|"uses components"| node_primitives
node_footer -.->|"uses components"| node_primitives
node_primitives -->|"merges classes"| node_utils

click node_home "https://github.com/dinglevarshney12/blogghar/blob/main/app/page.jsx"
click node_explore "https://github.com/dinglevarshney12/blogghar/blob/main/app/explore/page.jsx"
click node_search "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/search_input.jsx"
click node_pagination "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/pagination.jsx"
click node_categories "https://github.com/dinglevarshney12/blogghar/blob/main/app/categories/page.jsx"
click node_blogcards "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/blogCard.jsx"
click node_recommendations "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/Recommend%26LatestBlog.jsx"
click node_listcard "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/ListBlogCard.jsx"
click node_detail "https://github.com/dinglevarshney12/blogghar/blob/main/app/blog/%5Bid%5D/page.jsx"
click node_datahelper "https://github.com/dinglevarshney12/blogghar/blob/main/hooks/getData.jsx"
click node_blogapi "https://github.com/dinglevarshney12/blogghar/blob/main/app/api/blogs/route.js"
click node_create "https://github.com/dinglevarshney12/blogghar/blob/main/app/create-blog/page.jsx"
click node_editor "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/TextEditor.jsx"
click node_categoryselect "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/categoriesSelection.jsx"
click node_categorydata "https://github.com/dinglevarshney12/blogghar/blob/main/constant/index.jsx"
click node_layout "https://github.com/dinglevarshney12/blogghar/blob/main/app/layout.js"
click node_navbar "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/navbar.jsx"
click node_footer "https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/footer.jsx"
click node_primitives "https://github.com/dinglevarshney12/blogghar/tree/main/components/ui"
click node_utils "https://github.com/dinglevarshney12/blogghar/blob/main/lib/utils.js"
click node_theme "https://github.com/dinglevarshney12/blogghar/blob/main/lib/themeProvider.js"

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_explore,node_search,node_pagination,node_categories toneBlue
class node_blogcards,node_recommendations,node_listcard,node_detail,node_datahelper,node_blogapi toneAmber
class node_create,node_editor,node_categoryselect,node_categorydata toneMint
class node_layout,node_navbar,node_footer,node_theme toneRose
class node_primitives,node_utils,node_reader,node_author toneIndigo
```

## Components

### Blog discovery

- [Home page](https://github.com/dinglevarshney12/blogghar/blob/main/app/page.jsx): `app/page.jsx`
- [Explore listings](https://github.com/dinglevarshney12/blogghar/blob/main/app/explore/page.jsx): `app/explore/page.jsx`
- [Search input](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/search_input.jsx): `components/ui/search_input.jsx`
- [Pagination](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/pagination.jsx): `components/ui/pagination.jsx`
- [Categories page](https://github.com/dinglevarshney12/blogghar/blob/main/app/categories/page.jsx): `app/categories/page.jsx`

### Blog content

- [Blog cards](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/blogCard.jsx): `components/ui/blogCard.jsx`
- [Recommendations](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/Recommend%26LatestBlog.jsx): `components/ui/Recommend&LatestBlog.jsx`
- [List blog card](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/ListBlogCard.jsx): `components/ui/ListBlogCard.jsx`
- [Blog detail](https://github.com/dinglevarshney12/blogghar/blob/main/app/blog/%5Bid%5D/page.jsx): `app/blog/[id]/page.jsx`
- [Blog data helper](https://github.com/dinglevarshney12/blogghar/blob/main/hooks/getData.jsx): `hooks/getData.jsx`
- [Blogs API route](https://github.com/dinglevarshney12/blogghar/blob/main/app/api/blogs/route.js): `app/api/blogs/route.js`

### Blog authoring

- [Create blog page](https://github.com/dinglevarshney12/blogghar/blob/main/app/create-blog/page.jsx): `app/create-blog/page.jsx`
- [Text editor](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/TextEditor.jsx): `components/ui/TextEditor.jsx`
- [Category selector](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/categoriesSelection.jsx): `components/ui/categoriesSelection.jsx`
- [Category definitions](https://github.com/dinglevarshney12/blogghar/blob/main/constant/index.jsx): `constant/index.jsx`

### App shell

- [Root layout](https://github.com/dinglevarshney12/blogghar/blob/main/app/layout.js): `app/layout.js`
- [Navigation bar](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/navbar.jsx): `components/ui/navbar.jsx`
- [Footer](https://github.com/dinglevarshney12/blogghar/blob/main/components/ui/footer.jsx): `components/ui/footer.jsx`
- [Theme provider](https://github.com/dinglevarshney12/blogghar/blob/main/lib/themeProvider.js): `lib/themeProvider.js`

### Shared UI

- [UI primitives](https://github.com/dinglevarshney12/blogghar/tree/main/components/ui): `components/ui`
- [Class utilities](https://github.com/dinglevarshney12/blogghar/blob/main/lib/utils.js): `lib/utils.js`

### Other components

- **Reader**
- **Author**

## Connections

- Reader → Home page: opens (evidence: `app/page.jsx`)
- Home page → Blogs API route: fetches blogs (evidence: `app/page.jsx`)
- Home page → Blog cards: renders (evidence: `app/page.jsx`)
- Home page → Recommendations: renders (evidence: `app/page.jsx`)
- Reader → Explore listings: browses (evidence: `app/explore/page.jsx`)
- Explore listings → Blog data helper: requests data (evidence: `app/explore/page.jsx`)
- Blog data helper → Blogs API route: fetches endpoint (evidence: `hooks/getData.jsx`)
- Explore listings → Search input: renders (evidence: `app/explore/page.jsx`)
- Search input → Explore listings: updates query (evidence: `components/ui/search_input.jsx`)
- Explore listings → Pagination: renders (evidence: `app/explore/page.jsx`)
- Explore listings → Blog cards: renders results (evidence: `app/explore/page.jsx`)
- Reader → Blog detail: opens post (evidence: `app/blog/[id]/page.jsx`)
- Blog detail → Blog data helper: requests data (evidence: `app/blog/[id]/page.jsx`)
- Blog detail → Recommendations: renders (evidence: `app/blog/[id]/page.jsx`)
- Recommendations → Blog data helper: requests data (evidence: `components/ui/Recommend&LatestBlog.jsx`)
- Recommendations → List blog card: renders (evidence: `components/ui/Recommend&LatestBlog.jsx`)
- Author → Create blog page: opens authoring (evidence: `app/create-blog/page.jsx`)
- Create blog page → Text editor: renders editor (evidence: `app/create-blog/page.jsx`)
- Create blog page → Category selector: renders selector (evidence: `app/create-blog/page.jsx`)
- Category selector → Category definitions: uses categories (evidence: `components/ui/categoriesSelection.jsx`)
- Root layout → Navigation bar: renders (evidence: `app/layout.js`)
- Root layout → Footer: renders (evidence: `app/layout.js`)
- Root layout → Theme provider: configures theme (evidence: `app/layout.js`)
- Categories page → Category definitions: uses categories (evidence: `app/categories/page.jsx`)
- Blog cards → UI primitives: uses components (evidence: `components/ui/blogCard.jsx`)
- Navigation bar → UI primitives: uses components (evidence: `components/ui/navbar.jsx`)
- Footer → UI primitives: uses components (evidence: `components/ui/footer.jsx`)
- UI primitives → Class utilities: merges classes (evidence: `components/ui/button.jsx`)
