# subhranshusahu05/happyblog_mvc_project architecture

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

- Interactive diagram: https://gitdiagram.com/subhranshusahu05/happyblog_mvc_project
- Repository: https://github.com/subhranshusahu05/happyblog_mvc_project

## Overview

HappyBlog is an ASP.NET Core MVC blog: visitors browse and filter posts, open details and comment; administrators manage posts and images; users register or sign in. Controllers own the application actions, while views render their results. The sampled source shows SQL Server-backed EF Core and Identity configuration, but does not include the README detail or full view implementations, so uncertain UI wiring is omitted.

Main entry points: [`HappyBlog/Controllers/PostController.cs`](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/PostController.cs) (Post routes), [`HappyBlog/Program.cs`](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Program.cs) (App startup), [`HappyBlog/Controllers/HomeController.cs`](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/HomeController.cs) (Home routes), [`HappyBlog/Controllers/AuthController.cs`](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/AuthController.cs) (Auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_program["App startup<br/>[Program.cs]"]
  node_home["Home routes<br/>[HomeController.cs]"]
  node_homeviews["Home views"]
  node_layout["Shared layout"]
end

subgraph group_content["Blog content"]
  node_post["Post routes<br/>[PostController.cs]"]
  node_postviews["Post views"]
  node_postmodel["Post model<br/>[Post.cs]"]
  node_category["Category model<br/>[Category.cs]"]
  node_comment["Comment model<br/>[Comment.cs]"]
end

subgraph group_identity["Identity"]
  node_auth["Auth routes<br/>[AuthController.cs]"]
  node_authviews["Auth views"]
  node_identityservice["ASP.NET Identity"]
end

subgraph group_storage["Persistence"]
  node_context["EF context<br/>[AppDbContext.cs]"]
  node_sql[("SQL Server")]
  node_images["Image files"]
end

node_visitor(("Visitor"))
node_admin(("Administrator"))

node_visitor -->|"requests"| node_home
node_visitor -->|"browses, comments"| node_post
node_admin -->|"manages posts"| node_post
node_visitor -->|"registers, signs in"| node_auth
node_program -->|"routes requests"| node_home
node_program -->|"routes requests"| node_post
node_program -->|"routes requests"| node_auth
node_program -->|"configures"| node_context
node_program -->|"configures"| node_identityservice
node_home -->|"loads posts"| node_context
node_home -->|"returns view"| node_homeviews
node_post -->|"reads, writes"| node_context
node_post -->|"uploads, deletes"| node_images
node_post -->|"returns view"| node_postviews
node_post -->|"creates comment"| node_comment
node_auth -->|"registers, authenticates"| node_identityservice
node_auth -->|"returns view"| node_authviews
node_context -->|"reads, writes"| node_sql
node_post -->|"uses"| node_postmodel
node_post -->|"loads categories"| node_category
node_home -->|"loads posts"| node_postmodel
node_homeviews -->|"uses layout"| node_layout
node_postviews -->|"uses layout"| node_layout
node_authviews -->|"uses layout"| node_layout

click node_program "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Program.cs"
click node_home "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/HomeController.cs"
click node_post "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/PostController.cs"
click node_auth "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/AuthController.cs"
click node_homeviews "https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Home"
click node_postviews "https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Post"
click node_authviews "https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Auth"
click node_layout "https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Shared"
click node_postmodel "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Models/Post.cs"
click node_category "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Models/Category.cs"
click node_comment "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Models/Comment.cs"
click node_context "https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Data/AppDbContext.cs"
click node_images "https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/wwwroot/images"

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_program,node_home,node_homeviews,node_layout toneBlue
class node_post,node_postviews,node_postmodel,node_category,node_comment toneAmber
class node_auth,node_authviews,node_identityservice toneMint
class node_context,node_sql,node_images toneRose
class node_visitor,node_admin toneIndigo
```

## Components

### Web experience

- [App startup](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Program.cs): `HappyBlog/Program.cs`
- [Home routes](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/HomeController.cs): `HappyBlog/Controllers/HomeController.cs`
- [Home views](https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Home): `HappyBlog/Views/Home`
- [Shared layout](https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Shared): `HappyBlog/Views/Shared`

### Blog content

- [Post routes](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/PostController.cs): `HappyBlog/Controllers/PostController.cs`
- [Post views](https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Post): `HappyBlog/Views/Post`
- [Post model](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Models/Post.cs): `HappyBlog/Models/Post.cs`
- [Category model](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Models/Category.cs): `HappyBlog/Models/Category.cs`
- [Comment model](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Models/Comment.cs): `HappyBlog/Models/Comment.cs`

### Identity

- [Auth routes](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Controllers/AuthController.cs): `HappyBlog/Controllers/AuthController.cs`
- [Auth views](https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/Views/Auth): `HappyBlog/Views/Auth`
- **ASP.NET Identity**

### Persistence

- [EF context](https://github.com/subhranshusahu05/happyblog_mvc_project/blob/main/HappyBlog/Data/AppDbContext.cs): `HappyBlog/Data/AppDbContext.cs`
- **SQL Server**
- [Image files](https://github.com/subhranshusahu05/happyblog_mvc_project/tree/main/HappyBlog/wwwroot/images): `HappyBlog/wwwroot/images`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Home routes: requests
- Visitor → Post routes: browses, comments
- Administrator → Post routes: manages posts
- Visitor → Auth routes: registers, signs in
- App startup → Home routes: routes requests
- App startup → Post routes: routes requests
- App startup → Auth routes: routes requests
- App startup → EF context: configures
- App startup → ASP.NET Identity: configures
- Home routes → EF context: loads posts
- Home routes → Home views: returns view
- Post routes → EF context: reads, writes
- Post routes → Image files: uploads, deletes
- Post routes → Post views: returns view
- Post routes → Comment model: creates comment
- Auth routes → ASP.NET Identity: registers, authenticates
- Auth routes → Auth views: returns view
- EF context → SQL Server: reads, writes
- Post routes → Post model: uses
- Post routes → Category model: loads categories
- Home routes → Post model: loads posts
- Home views → Shared layout: uses layout
- Post views → Shared layout: uses layout
- Auth views → Shared layout: uses layout
