# jaisriv788/blog architecture

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

- Interactive diagram: https://gitdiagram.com/jaisriv788/blog
- Repository: https://github.com/jaisriv788/blog

## Overview

This is a blog-publishing application: users sign up or sign in, browse published posts, create posts, and manage their own posts. The React app routes those workflows and calls a deployed API; backend user routes validate credentials and use Prisma for persistence. The blog route implementation is a core module, but it was not sampled, so its internal behavior and storage relationships cannot be verified. Edges reflect only shown calls, routing, and documented endpoint requests.

Main entry points: [`frontend/src/App.tsx`](https://github.com/jaisriv788/blog/blob/main/frontend/src/App.tsx) (App routing), [`frontend/src/components/routes/Blogs.tsx`](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Blogs.tsx) (All blogs), [`frontend/src/components/routes/MyBlogs.tsx`](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/MyBlogs.tsx) (My blogs), [`frontend/src/main.tsx`](https://github.com/jaisriv788/blog/blob/main/frontend/src/main.tsx) (React bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_bootstrap["React bootstrap<br/>[main.tsx]"]
  node_app["App routing<br/>[App.tsx]"]
  node_navbar["Navigation bar<br/>[Navbar.tsx]"]
  node_session_end["Session expiry notice<br/>[SessionEnd.tsx]"]
end

subgraph group_identity["User identity"]
  node_signup["Sign up<br/>[Signup.tsx]"]
  node_signin["Sign in<br/>[Signin.tsx]"]
end

subgraph group_publishing["Blog workflows"]
  node_blogs_route["All blogs<br/>[Blogs.tsx]"]
  node_blog_card["Blog display<br/>[Blog.tsx]"]
  node_all_skeleton["Blog loading"]
  node_myblogs_route["My blogs<br/>[MyBlogs.tsx]"]
  node_myblog_card["Blog management<br/>[MyBlog.tsx]"]
  node_my_skeleton["My blog loading<br/>[MyBlogSkeleton.tsx]"]
  node_create_blog["Create blog<br/>[CreateBlog.tsx]"]
end

subgraph group_server["Backend API"]
  node_user_routes["User endpoints<br/>[user.ts]"]
  node_blog_routes["Blog endpoints<br/>[blog.ts]"]
end

subgraph group_storage["Persistence"]
  node_user_store[("User records")]
end

node_visitor(("Visitor"))
node_api_service{{"Deployed API"}}

node_visitor -->|"opens"| node_bootstrap
node_bootstrap -->|"renders"| node_app
node_app -->|"routes"| node_signup
node_app -->|"routes"| node_signin
node_app -->|"routes"| node_blogs_route
node_app -->|"routes"| node_myblogs_route
node_app -->|"routes"| node_create_blog
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_session_end
node_signup -->|"submits signup"| node_api_service
node_signin -->|"submits signin"| node_api_service
node_user_routes -->|"creates and reads"| node_user_store
node_blogs_route -->|"fetches posts"| node_api_service
node_blogs_route -->|"renders"| node_blog_card
node_blogs_route -->|"shows loading"| node_all_skeleton
node_myblogs_route -->|"fetches posts"| node_api_service
node_myblogs_route -->|"renders"| node_myblog_card
node_myblogs_route -->|"shows loading"| node_my_skeleton
node_myblog_card -->|"updates and deletes"| node_api_service
node_create_blog -->|"submits post"| node_api_service
node_api_service -.->|"handles identity"| node_user_routes
node_api_service -.->|"handles blog requests"| node_blog_routes

click node_bootstrap "https://github.com/jaisriv788/blog/blob/main/frontend/src/main.tsx"
click node_app "https://github.com/jaisriv788/blog/blob/main/frontend/src/App.tsx"
click node_navbar "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/Navbar.tsx"
click node_signup "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Signup.tsx"
click node_signin "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Signin.tsx"
click node_user_routes "https://github.com/jaisriv788/blog/blob/main/backend/routes/user.ts"
click node_blogs_route "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Blogs.tsx"
click node_blog_card "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/Blog.tsx"
click node_all_skeleton "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/AllBlogsSkeleton.tsx"
click node_myblogs_route "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/MyBlogs.tsx"
click node_myblog_card "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/MyBlog.tsx"
click node_my_skeleton "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/MyBlogSkeleton.tsx"
click node_create_blog "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/CreateBlog.tsx"
click node_blog_routes "https://github.com/jaisriv788/blog/blob/main/backend/routes/blog.ts"
click node_session_end "https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/SessionEnd.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_bootstrap,node_app,node_navbar,node_session_end toneBlue
class node_signup,node_signin toneAmber
class node_blogs_route,node_blog_card,node_all_skeleton,node_myblogs_route,node_myblog_card,node_my_skeleton,node_create_blog,node_api_service toneMint
class node_user_routes,node_blog_routes toneRose
class node_user_store,node_visitor toneIndigo
```

## Components

### Web application

- [React bootstrap](https://github.com/jaisriv788/blog/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [App routing](https://github.com/jaisriv788/blog/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Navigation bar](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/Navbar.tsx): `frontend/src/components/ui/Navbar.tsx`
- [Session expiry notice](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/SessionEnd.tsx): `frontend/src/components/ui/SessionEnd.tsx`

### User identity

- [Sign up](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Signup.tsx): `frontend/src/components/routes/Signup.tsx`
- [Sign in](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Signin.tsx): `frontend/src/components/routes/Signin.tsx`

### Blog workflows

- [All blogs](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/Blogs.tsx): `frontend/src/components/routes/Blogs.tsx`
- [Blog display](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/Blog.tsx): `frontend/src/components/ui/Blog.tsx`
- [Blog loading](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/AllBlogsSkeleton.tsx): `frontend/src/components/ui/AllBlogsSkeleton.tsx`
- [My blogs](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/MyBlogs.tsx): `frontend/src/components/routes/MyBlogs.tsx`
- [Blog management](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/MyBlog.tsx): `frontend/src/components/ui/MyBlog.tsx`
- [My blog loading](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/ui/MyBlogSkeleton.tsx): `frontend/src/components/ui/MyBlogSkeleton.tsx`
- [Create blog](https://github.com/jaisriv788/blog/blob/main/frontend/src/components/routes/CreateBlog.tsx): `frontend/src/components/routes/CreateBlog.tsx`

### Backend API

- [User endpoints](https://github.com/jaisriv788/blog/blob/main/backend/routes/user.ts): `backend/routes/user.ts`
- [Blog endpoints](https://github.com/jaisriv788/blog/blob/main/backend/routes/blog.ts): `backend/routes/blog.ts`

### Persistence

- **User records**

### Other components

- **Visitor**
- **Deployed API**

## Connections

- Visitor → React bootstrap: opens
- React bootstrap → App routing: renders (evidence: `frontend/src/main.tsx`)
- App routing → Sign up: routes (evidence: `frontend/src/App.tsx`)
- App routing → Sign in: routes (evidence: `frontend/src/App.tsx`)
- App routing → All blogs: routes (evidence: `frontend/src/App.tsx`)
- App routing → My blogs: routes (evidence: `frontend/src/App.tsx`)
- App routing → Create blog: routes (evidence: `frontend/src/App.tsx`)
- App routing → Navigation bar: renders (evidence: `frontend/src/App.tsx`)
- App routing → Session expiry notice: renders (evidence: `frontend/src/App.tsx`)
- Sign up → Deployed API: submits signup (evidence: `frontend/src/components/routes/Signup.tsx`)
- Sign in → Deployed API: submits signin (evidence: `frontend/src/components/routes/Signin.tsx`)
- User endpoints → User records: creates and reads (evidence: `backend/routes/user.ts`)
- All blogs → Deployed API: fetches posts (evidence: `frontend/src/components/routes/Blogs.tsx`)
- All blogs → Blog display: renders (evidence: `frontend/src/components/routes/Blogs.tsx`)
- All blogs → Blog loading: shows loading (evidence: `frontend/src/components/routes/Blogs.tsx`)
- My blogs → Deployed API: fetches posts (evidence: `frontend/src/components/routes/MyBlogs.tsx`)
- My blogs → Blog management: renders (evidence: `frontend/src/components/routes/MyBlogs.tsx`)
- My blogs → My blog loading: shows loading (evidence: `frontend/src/components/routes/MyBlogs.tsx`)
- Blog management → Deployed API: updates and deletes (evidence: `frontend/src/components/ui/MyBlog.tsx`)
- Create blog → Deployed API: submits post (evidence: `frontend/src/components/routes/CreateBlog.tsx`)
- Deployed API → User endpoints: handles identity
- Deployed API → Blog endpoints: handles blog requests
