# frappe/blog architecture

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

## Overview

This Frappe app supports authoring and publishing blog posts, organizing them by category, and presenting posts on the website. The main workflow is to configure blog behavior, create a post with a blogger and category, publish it, then serve listings, individual post pages, and an RSS feed. Post pages also expose comments, likes, sharing, and calls to action; blogger records and settings provide supporting domain data. Source excerpts show the post, settings, category, like, and RSS behavior, but not all templates or comment implementation, so those subsystem links are limited to documented or visible wiring.

Main entry points: [`blog/blog/doctype/blog_post/blog_post.py`](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py) (Blog posts), [`blog/blog/doctype/blog_settings/blog_settings.py`](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_settings/blog_settings.py) (Blog settings), [`blog/www/rss.py`](https://github.com/frappe/blog/blob/develop/blog/www/rss.py) (RSS feed), [`blog/hooks.py`](https://github.com/frappe/blog/blob/develop/blog/hooks.py) (Frappe web hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Blog authoring"]
  node_editor["Post editor<br/>[blog_post.js]"]
  node_posts[("Blog posts<br/>[blog_post.py]")]
  node_categories[("Categories<br/>[blog_category.py]")]
  node_bloggers[("Blogger profiles<br/>[blogger.py]")]
end

subgraph group_website["Website publishing"]
  node_listing["Blog listing<br/>[blog_post.py]"]
  node_post_page["Post page<br/>[blog_post.py]"]
  node_category_page["Category page<br/>[blog_category.py]"]
  node_rss["RSS feed<br/>[rss.py]"]
end

subgraph group_engagement["Reader engagement"]
  node_likes["Likes<br/>[likes.py]"]
  node_comments["Comments<br/>[blog_post.py]"]
end

subgraph group_configuration["Blog configuration"]
  node_settings[("Blog settings<br/>[blog_settings.py]")]
  node_permission["App access<br/>[__init__.py]"]
  node_hooks["Frappe web hooks<br/>[hooks.py]"]
end

node_reader(("Blog reader"))
node_frappe{{"Frappe platform"}}

node_reader -->|"browses"| node_listing
node_editor -->|"updates"| node_posts
node_posts -->|"resolves category"| node_categories
node_posts -->|"loads profile"| node_bloggers
node_listing -->|"queries published"| node_posts
node_post_page -->|"reads options"| node_settings
node_post_page -->|"loads comments"| node_comments
node_post_page -->|"loads likes"| node_likes
node_category_page -.->|"lists posts"| node_posts
node_rss -->|"queries published"| node_posts
node_rss -->|"reads feed text"| node_settings
node_likes -->|"gets rate limit"| node_settings
node_hooks -->|"registers comment event"| node_comments
node_hooks -->|"configures permissions"| node_settings
node_frappe -.->|"checks access"| node_permission

click node_editor "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.js"
click node_posts "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py"
click node_categories "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_category/blog_category.py"
click node_bloggers "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blogger/blogger.py"
click node_settings "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_settings/blog_settings.py"
click node_permission "https://github.com/frappe/blog/blob/develop/blog/__init__.py"
click node_hooks "https://github.com/frappe/blog/blob/develop/blog/hooks.py"
click node_listing "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py"
click node_post_page "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py"
click node_category_page "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_category/blog_category.py"
click node_rss "https://github.com/frappe/blog/blob/develop/blog/www/rss.py"
click node_likes "https://github.com/frappe/blog/blob/develop/blog/templates/includes/likes/likes.py"
click node_comments "https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py"

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_editor,node_posts,node_categories,node_bloggers toneBlue
class node_listing,node_post_page,node_category_page,node_rss toneAmber
class node_likes,node_comments toneMint
class node_settings,node_permission,node_hooks toneRose
class node_reader,node_frappe toneIndigo
```

## Components

### Blog authoring

- [Post editor](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.js): `blog/blog/doctype/blog_post/blog_post.js`
- [Blog posts](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py): `blog/blog/doctype/blog_post/blog_post.py`
- [Categories](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_category/blog_category.py): `blog/blog/doctype/blog_category/blog_category.py`
- [Blogger profiles](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blogger/blogger.py): `blog/blog/doctype/blogger/blogger.py`

### Website publishing

- [Blog listing](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py): `blog/blog/doctype/blog_post/blog_post.py`
- [Post page](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py): `blog/blog/doctype/blog_post/blog_post.py`
- [Category page](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_category/blog_category.py): `blog/blog/doctype/blog_category/blog_category.py`
- [RSS feed](https://github.com/frappe/blog/blob/develop/blog/www/rss.py): `blog/www/rss.py`

### Reader engagement

- [Likes](https://github.com/frappe/blog/blob/develop/blog/templates/includes/likes/likes.py): `blog/templates/includes/likes/likes.py`
- [Comments](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_post/blog_post.py): `blog/blog/doctype/blog_post/blog_post.py`

### Blog configuration

- [Blog settings](https://github.com/frappe/blog/blob/develop/blog/blog/doctype/blog_settings/blog_settings.py): `blog/blog/doctype/blog_settings/blog_settings.py`
- [App access](https://github.com/frappe/blog/blob/develop/blog/__init__.py): `blog/__init__.py`
- [Frappe web hooks](https://github.com/frappe/blog/blob/develop/blog/hooks.py): `blog/hooks.py`

### Other components

- **Blog reader**
- **Frappe platform**

## Connections

- Blog reader → Blog listing: browses (evidence: `README.md`)
- Post editor → Blog posts: updates (evidence: `blog/blog/doctype/blog_post/blog_post.js`)
- Blog posts → Categories: resolves category (evidence: `blog/blog/doctype/blog_post/blog_post.py`)
- Blog posts → Blogger profiles: loads profile (evidence: `blog/blog/doctype/blog_post/blog_post.py`)
- Blog listing → Blog posts: queries published (evidence: `blog/blog/doctype/blog_post/blog_post.py`)
- Post page → Blog settings: reads options (evidence: `blog/blog/doctype/blog_post/blog_post.py`)
- Post page → Comments: loads comments (evidence: `blog/blog/doctype/blog_post/blog_post.py`)
- Post page → Likes: loads likes (evidence: `blog/blog/doctype/blog_post/blog_post.py`)
- Category page → Blog posts: lists posts
- RSS feed → Blog posts: queries published (evidence: `blog/www/rss.py`)
- RSS feed → Blog settings: reads feed text (evidence: `blog/www/rss.py`)
- Likes → Blog settings: gets rate limit (evidence: `blog/templates/includes/likes/likes.py`)
- Frappe web hooks → Comments: registers comment event (evidence: `blog/hooks.py`)
- Frappe web hooks → Blog settings: configures permissions (evidence: `blog/hooks.py`)
- Frappe platform → App access: checks access
