# charanpasham/byteblogger architecture

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

## Overview

Byte Blogger is a Next.js blogging platform. Readers browse published posts and tags, open a post, and can like it or add a view; administrators create and edit posts, manage tags and profiles, and publish, pin, or delete posts. The graph also includes the documented OAuth and image-upload integrations, plus the database and editor layers. Some server actions and admin pages were not sampled, so their internal calls are omitted or shown only where the index or README supports them.

Main entry points: [`src/server/db/index.ts`](https://github.com/charanpasham/byteblogger/blob/main/src/server/db/index.ts) (Database Client), [`src/app/admin/(home)/page.tsx`](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/(home)/page.tsx) (Admin Dashboard), [`src/app/(home)/page.tsx`](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/page.tsx) (Post Listing), [`src/app/admin/create-blog/page.tsx`](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/create-blog/page.tsx) (Create Post)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reader["Public Blog"]
  node_home["Post Listing<br/>[page.tsx]"]
  node_postgrid["Post Grid<br/>[postGrid.tsx]"]
  node_about["About Panel<br/>[aboutMe.tsx]"]
  node_tagsview["Tag Listing<br/>[renderTags.tsx]"]
  node_tagpage["Tag Page<br/>[page.tsx]"]
  node_postpage["Post Detail<br/>[page.tsx]"]
  node_postview["Post View<br/>[viewBlog.tsx]"]
  node_analytics["Post Interactions"]
end

subgraph group_admin["Admin Workspace"]
  node_adminhome["Admin Dashboard<br/>[page.tsx]"]
  node_createpost["Create Post<br/>[page.tsx]"]
  node_createaction["Post Creation Action"]
  node_editpage["Edit Post Page<br/>[page.tsx]"]
  node_tagadmin["Tag Management<br/>[page.tsx]"]
  node_settings["Profile Settings<br/>[page.tsx]"]
end

subgraph group_authoring["Authoring and Uploads"]
  node_editor["Blog Editor<br/>[blogEditor.tsx]"]
  node_editorcore["TipTap Editor<br/>[editor.tsx]"]
  node_editormenu["Editor Menu<br/>[editorMenu.tsx]"]
  node_imageupload["Editor Image Upload"]
  node_uploadcore["Upload Handler<br/>[core.ts]"]
end

subgraph group_platform["Platform Services"]
  node_auth["Authentication<br/>[config.ts]"]
  node_authroute["Auth Route<br/>[route.ts]"]
  node_dbclient["Database Client<br/>[index.ts]"]
  node_schema["Blog Data Model<br/>[schema.ts]"]
  node_badge["Tag Badge<br/>[badge.tsx]"]
  node_button["Button<br/>[button.tsx]"]
  node_card["Card<br/>[card.tsx]"]
  node_input["Input<br/>[input.tsx]"]
  node_sheet["Sheet<br/>[sheet.tsx]"]
  node_tooltip["Tooltip<br/>[tooltip.tsx]"]
  node_env["Environment Config<br/>[env.js]"]
end

node_visitor(("Reader"))
node_uploadthing{{"UploadThing"}}
node_google{{"Google OAuth"}}
node_postgres[("PostgreSQL")]

node_visitor -->|"browses"| node_home
node_home -->|"queries posts"| node_dbclient
node_home -->|"reads tables"| node_schema
node_home -->|"renders"| node_about
node_home -->|"renders"| node_postgrid
node_home -->|"renders"| node_tagsview
node_visitor -->|"opens tag"| node_tagpage
node_tagpage -->|"queries tags"| node_dbclient
node_tagpage -->|"renders"| node_postgrid
node_tagpage -->|"renders"| node_about
node_tagpage -->|"renders"| node_tagsview
node_visitor -->|"opens post"| node_postpage
node_postpage -->|"loads post"| node_dbclient
node_postpage -->|"reads tables"| node_schema
node_postpage -->|"renders"| node_postview
node_postview -->|"records views"| node_analytics
node_adminhome -->|"checks session"| node_auth
node_adminhome -->|"loads dashboard data"| node_dbclient
node_adminhome -->|"reads tables"| node_schema
node_adminhome -->|"links to"| node_createpost
node_createpost -->|"submits"| node_createaction
node_createpost -->|"routes to"| node_editor
node_editpage -->|"loads post"| node_dbclient
node_editpage -->|"reads tables"| node_schema
node_editpage -->|"renders"| node_editor
node_editor -->|"uses"| node_editorcore
node_editor -->|"uses"| node_editormenu
node_editormenu -->|"uses"| node_imageupload
node_imageupload -->|"calls"| node_uploadcore
node_uploadcore -->|"checks access"| node_auth
node_uploadcore -->|"uses"| node_dbclient
node_uploadthing -.->|"provides uploads"| node_uploadcore
node_tagadmin -->|"queries tags"| node_dbclient
node_tagadmin -->|"reads tables"| node_schema
node_tagadmin -->|"renders tags"| node_badge
node_settings -->|"loads session"| node_auth
node_authroute -->|"uses handlers"| node_auth
node_auth -.->|"configures OAuth"| node_google
node_dbclient -->|"configures ORM"| node_schema
node_dbclient -->|"reads config"| node_env
node_dbclient -->|"connects"| node_postgres
node_createpost -->|"uses"| node_button
node_createpost -->|"uses"| node_input
node_createpost -->|"uses"| node_card
node_adminhome -->|"uses"| node_card
node_adminhome -->|"uses"| node_button
node_editor -->|"uses"| node_button
node_editor -->|"uses"| node_sheet

click node_home "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/page.tsx"
click node_postgrid "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/postGrid.tsx"
click node_about "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/aboutMe.tsx"
click node_tagsview "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/renderTags.tsx"
click node_tagpage "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/tags/%5Bslug%5D/page.tsx"
click node_postpage "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/%5Bslug%5D/page.tsx"
click node_postview "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/%5Bslug%5D/viewBlog.tsx"
click node_analytics "https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/incrementPostViewCountAction.tsx"
click node_adminhome "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/(home)/page.tsx"
click node_createpost "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/create-blog/page.tsx"
click node_createaction "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/create-blog/createBlogAction.tsx"
click node_editor "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/edit/%5Bslug%5D/blogEditor.tsx"
click node_editpage "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/edit/%5Bslug%5D/page.tsx"
click node_tagadmin "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/tags-management/page.tsx"
click node_settings "https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/settings/page.tsx"
click node_editorcore "https://github.com/charanpasham/byteblogger/blob/main/src/components/editor.tsx"
click node_editormenu "https://github.com/charanpasham/byteblogger/blob/main/src/components/editorMenu.tsx"
click node_imageupload "https://github.com/charanpasham/byteblogger/blob/main/src/components/editorImageUpload.ts"
click node_uploadcore "https://github.com/charanpasham/byteblogger/blob/main/src/app/api/uploadthing/core.ts"
click node_auth "https://github.com/charanpasham/byteblogger/blob/main/src/server/auth/config.ts"
click node_authroute "https://github.com/charanpasham/byteblogger/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_dbclient "https://github.com/charanpasham/byteblogger/blob/main/src/server/db/index.ts"
click node_schema "https://github.com/charanpasham/byteblogger/blob/main/src/server/db/schema.ts"
click node_badge "https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/badge.tsx"
click node_button "https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/button.tsx"
click node_card "https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/card.tsx"
click node_input "https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/input.tsx"
click node_sheet "https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/sheet.tsx"
click node_tooltip "https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/tooltip.tsx"
click node_env "https://github.com/charanpasham/byteblogger/blob/main/src/env.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_postgrid,node_about,node_tagsview,node_tagpage,node_postpage,node_postview,node_analytics toneBlue
class node_adminhome,node_createpost,node_createaction,node_editpage,node_tagadmin,node_settings,node_postgres toneAmber
class node_editor,node_editorcore,node_editormenu,node_imageupload,node_uploadcore toneMint
class node_auth,node_authroute,node_dbclient,node_schema,node_badge,node_button,node_card,node_input,node_sheet,node_tooltip,node_env toneRose
class node_visitor,node_uploadthing,node_google toneIndigo
```

## Components

### Public Blog

- [Post Listing](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/page.tsx): `src/app/(home)/page.tsx`
- [Post Grid](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/postGrid.tsx): `src/app/(home)/postGrid.tsx`
- [About Panel](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/aboutMe.tsx): `src/app/(home)/aboutMe.tsx`
- [Tag Listing](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/renderTags.tsx): `src/app/(home)/renderTags.tsx`
- [Tag Page](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/tags/%5Bslug%5D/page.tsx): `src/app/(home)/posts/tags/[slug]/page.tsx`
- [Post Detail](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/%5Bslug%5D/page.tsx): `src/app/(home)/posts/[slug]/page.tsx`
- [Post View](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/%5Bslug%5D/viewBlog.tsx): `src/app/(home)/posts/[slug]/viewBlog.tsx`
- [Post Interactions](https://github.com/charanpasham/byteblogger/blob/main/src/app/(home)/posts/incrementPostViewCountAction.tsx): `src/app/(home)/posts/incrementPostViewCountAction.tsx`

### Admin Workspace

- [Admin Dashboard](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/(home)/page.tsx): `src/app/admin/(home)/page.tsx`
- [Create Post](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/create-blog/page.tsx): `src/app/admin/create-blog/page.tsx`
- [Post Creation Action](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/create-blog/createBlogAction.tsx): `src/app/admin/create-blog/createBlogAction.tsx`
- [Edit Post Page](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/edit/%5Bslug%5D/page.tsx): `src/app/admin/edit/[slug]/page.tsx`
- [Tag Management](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/tags-management/page.tsx): `src/app/admin/tags-management/page.tsx`
- [Profile Settings](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/settings/page.tsx): `src/app/admin/settings/page.tsx`

### Authoring and Uploads

- [Blog Editor](https://github.com/charanpasham/byteblogger/blob/main/src/app/admin/edit/%5Bslug%5D/blogEditor.tsx): `src/app/admin/edit/[slug]/blogEditor.tsx`
- [TipTap Editor](https://github.com/charanpasham/byteblogger/blob/main/src/components/editor.tsx): `src/components/editor.tsx`
- [Editor Menu](https://github.com/charanpasham/byteblogger/blob/main/src/components/editorMenu.tsx): `src/components/editorMenu.tsx`
- [Editor Image Upload](https://github.com/charanpasham/byteblogger/blob/main/src/components/editorImageUpload.ts): `src/components/editorImageUpload.ts`
- [Upload Handler](https://github.com/charanpasham/byteblogger/blob/main/src/app/api/uploadthing/core.ts): `src/app/api/uploadthing/core.ts`

### Platform Services

- [Authentication](https://github.com/charanpasham/byteblogger/blob/main/src/server/auth/config.ts): `src/server/auth/config.ts`
- [Auth Route](https://github.com/charanpasham/byteblogger/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts): `src/app/api/auth/[...nextauth]/route.ts`
- [Database Client](https://github.com/charanpasham/byteblogger/blob/main/src/server/db/index.ts): `src/server/db/index.ts`
- [Blog Data Model](https://github.com/charanpasham/byteblogger/blob/main/src/server/db/schema.ts): `src/server/db/schema.ts`
- [Tag Badge](https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/badge.tsx): `src/components/ui/badge.tsx`
- [Button](https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/button.tsx): `src/components/ui/button.tsx`
- [Card](https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/card.tsx): `src/components/ui/card.tsx`
- [Input](https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/input.tsx): `src/components/ui/input.tsx`
- [Sheet](https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/sheet.tsx): `src/components/ui/sheet.tsx`
- [Tooltip](https://github.com/charanpasham/byteblogger/blob/main/src/components/ui/tooltip.tsx): `src/components/ui/tooltip.tsx`
- [Environment Config](https://github.com/charanpasham/byteblogger/blob/main/src/env.js): `src/env.js`

### Other components

- **Reader**
- **UploadThing**
- **Google OAuth**
- **PostgreSQL**

## Connections

- Reader → Post Listing: browses
- Post Listing → Database Client: queries posts (evidence: `src/app/(home)/page.tsx`)
- Post Listing → Blog Data Model: reads tables (evidence: `src/app/(home)/page.tsx`)
- Post Listing → About Panel: renders (evidence: `src/app/(home)/page.tsx`)
- Post Listing → Post Grid: renders (evidence: `src/app/(home)/page.tsx`)
- Post Listing → Tag Listing: renders (evidence: `src/app/(home)/page.tsx`)
- Reader → Tag Page: opens tag
- Tag Page → Database Client: queries tags (evidence: `src/app/(home)/posts/tags/[slug]/page.tsx`)
- Tag Page → Post Grid: renders (evidence: `src/app/(home)/posts/tags/[slug]/page.tsx`)
- Tag Page → About Panel: renders (evidence: `src/app/(home)/posts/tags/[slug]/page.tsx`)
- Tag Page → Tag Listing: renders (evidence: `src/app/(home)/posts/tags/[slug]/page.tsx`)
- Reader → Post Detail: opens post
- Post Detail → Database Client: loads post (evidence: `src/app/(home)/posts/[slug]/page.tsx`)
- Post Detail → Blog Data Model: reads tables (evidence: `src/app/(home)/posts/[slug]/page.tsx`)
- Post Detail → Post View: renders (evidence: `src/app/(home)/posts/[slug]/page.tsx`)
- Post View → Post Interactions: records views (evidence: `src/app/(home)/posts/[slug]/viewBlog.tsx`)
- Admin Dashboard → Authentication: checks session (evidence: `src/app/admin/(home)/page.tsx`)
- Admin Dashboard → Database Client: loads dashboard data (evidence: `src/app/admin/(home)/page.tsx`)
- Admin Dashboard → Blog Data Model: reads tables (evidence: `src/app/admin/(home)/page.tsx`)
- Admin Dashboard → Create Post: links to (evidence: `src/app/admin/(home)/page.tsx`)
- Create Post → Post Creation Action: submits (evidence: `src/app/admin/create-blog/page.tsx`)
- Create Post → Blog Editor: routes to (evidence: `src/app/admin/create-blog/page.tsx`)
- Edit Post Page → Database Client: loads post (evidence: `src/app/admin/edit/[slug]/page.tsx`)
- Edit Post Page → Blog Data Model: reads tables (evidence: `src/app/admin/edit/[slug]/page.tsx`)
- Edit Post Page → Blog Editor: renders (evidence: `src/app/admin/edit/[slug]/page.tsx`)
- Blog Editor → TipTap Editor: uses (evidence: `src/app/admin/edit/[slug]/blogEditor.tsx`)
- Blog Editor → Editor Menu: uses (evidence: `src/app/admin/edit/[slug]/blogEditor.tsx`)
- Editor Menu → Editor Image Upload: uses (evidence: `src/components/editorMenu.tsx`)
- Editor Image Upload → Upload Handler: calls (evidence: `src/components/editorImageUpload.ts`)
- Upload Handler → Authentication: checks access (evidence: `src/app/api/uploadthing/core.ts`)
- Upload Handler → Database Client: uses (evidence: `src/app/api/uploadthing/core.ts`)
- UploadThing → Upload Handler: provides uploads
- Tag Management → Database Client: queries tags (evidence: `src/app/admin/tags-management/page.tsx`)
- Tag Management → Blog Data Model: reads tables (evidence: `src/app/admin/tags-management/page.tsx`)
- Tag Management → Tag Badge: renders tags (evidence: `src/app/admin/tags-management/page.tsx`)
- Profile Settings → Authentication: loads session (evidence: `src/app/admin/settings/page.tsx`)
- Auth Route → Authentication: uses handlers (evidence: `src/app/api/auth/[...nextauth]/route.ts`)
- Authentication → Google OAuth: configures OAuth
- Database Client → Blog Data Model: configures ORM (evidence: `src/server/db/index.ts`)
- Database Client → Environment Config: reads config (evidence: `src/server/db/index.ts`)
- Database Client → PostgreSQL: connects (evidence: `src/server/db/index.ts`)
- Create Post → Button: uses (evidence: `src/app/admin/create-blog/page.tsx`)
- Create Post → Input: uses (evidence: `src/app/admin/create-blog/page.tsx`)
- Create Post → Card: uses (evidence: `src/app/admin/create-blog/page.tsx`)
- Admin Dashboard → Card: uses (evidence: `src/app/admin/(home)/page.tsx`)
- Admin Dashboard → Button: uses (evidence: `src/app/admin/(home)/page.tsx`)
- Blog Editor → Button: uses (evidence: `src/app/admin/edit/[slug]/blogEditor.tsx`)
- Blog Editor → Sheet: uses (evidence: `src/app/admin/edit/[slug]/blogEditor.tsx`)
