# vishwas2628/blog-app architecture

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

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

## Overview

This Django application serves a public blog and provides authenticated management for posts, categories, and users. Readers browse featured and recent posts, filter by category or search, and comment on posts; visitors can also register and log in. The dashboard manages content and offers an AI-assisted text-correction endpoint. The source excerpts show view-to-model and view-to-render behavior, but not URL configuration or model definitions, so routing details and finer data relationships are omitted.

Main entry points: [`blog_main/views.py`](https://github.com/vishwas2628/blog-app/blob/main/blog_main/views.py) (Home and auth), [`blogs/views.py`](https://github.com/vishwas2628/blog-app/blob/main/blogs/views.py) (Browse and comment), [`dashboard/views.py`](https://github.com/vishwas2628/blog-app/blob/main/dashboard/views.py) (Dashboard actions), [`blogs/models.py`](https://github.com/vishwas2628/blog-app/blob/main/blogs/models.py) (Posts and categories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public blog"]
  node_site_views["Home and auth<br/>[views.py]"]
  node_blog_views["Browse and comment<br/>[views.py]"]
  node_home_template["Home page<br/>[index.html]"]
  node_blog_template["Post page<br/>[blogs.html]"]
  node_category_template["Category page"]
  node_search_template["Search page<br/>[search.html]"]
  node_register_template["Registration page<br/>[register.html]"]
  node_login_template["Login page<br/>[login.html]"]
end

subgraph group_management["Content management"]
  node_dashboard_views["Dashboard actions<br/>[views.py]"]
  node_dashboard_templates["Dashboard UI"]
  node_dashboard_forms["Management forms<br/>[forms.py]"]
  node_gemini_service["Text correction<br/>[gemini_service.py]"]
end

subgraph group_shared["Shared services"]
  node_blog_models["Posts and categories<br/>[models.py]"]
  node_assignment_models["About and links<br/>[models.py]"]
  node_context_processors["Shared page context"]
  node_register_form["Registration form<br/>[forms.py]"]
end

subgraph group_state["Data and integrations"]
  node_database[("SQLite database<br/>[settings.py]")]
  node_gemini{{"Google Gemini"}}
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_site_views
node_site_views -->|"reads posts"| node_blog_models
node_site_views -->|"reads about"| node_assignment_models
node_site_views -->|"renders"| node_home_template
node_site_views -->|"validates registration"| node_register_form
node_site_views -->|"renders"| node_register_template
node_site_views -->|"renders"| node_login_template
node_visitor -->|"browses and comments"| node_blog_views
node_blog_views -->|"queries and saves"| node_blog_models
node_blog_views -->|"renders"| node_blog_template
node_blog_views -->|"renders"| node_category_template
node_blog_views -->|"renders"| node_search_template
node_visitor -->|"manages content"| node_dashboard_views
node_dashboard_views -->|"reads and writes"| node_blog_models
node_dashboard_views -->|"validates changes"| node_dashboard_forms
node_dashboard_views -->|"renders"| node_dashboard_templates
node_dashboard_views -->|"requests correction"| node_gemini_service
node_gemini_service -->|"sends text"| node_gemini
node_context_processors -->|"reads categories"| node_blog_models
node_context_processors -->|"reads social links"| node_assignment_models
node_blog_models -->|"reads and writes"| node_database
node_assignment_models -->|"reads and writes"| node_database

click node_site_views "https://github.com/vishwas2628/blog-app/blob/main/blog_main/views.py"
click node_blog_views "https://github.com/vishwas2628/blog-app/blob/main/blogs/views.py"
click node_home_template "https://github.com/vishwas2628/blog-app/blob/main/templates/index.html"
click node_blog_template "https://github.com/vishwas2628/blog-app/blob/main/templates/blogs.html"
click node_category_template "https://github.com/vishwas2628/blog-app/blob/main/templates/blog_by_category.html"
click node_search_template "https://github.com/vishwas2628/blog-app/blob/main/templates/search.html"
click node_register_template "https://github.com/vishwas2628/blog-app/blob/main/templates/register.html"
click node_login_template "https://github.com/vishwas2628/blog-app/blob/main/templates/login.html"
click node_dashboard_views "https://github.com/vishwas2628/blog-app/blob/main/dashboard/views.py"
click node_dashboard_templates "https://github.com/vishwas2628/blog-app/tree/main/templates/dashboard"
click node_blog_models "https://github.com/vishwas2628/blog-app/blob/main/blogs/models.py"
click node_assignment_models "https://github.com/vishwas2628/blog-app/blob/main/assignments/models.py"
click node_context_processors "https://github.com/vishwas2628/blog-app/blob/main/blogs/context_processors.py"
click node_dashboard_forms "https://github.com/vishwas2628/blog-app/blob/main/dashboard/forms.py"
click node_register_form "https://github.com/vishwas2628/blog-app/blob/main/blog_main/forms.py"
click node_gemini_service "https://github.com/vishwas2628/blog-app/blob/main/dashboard/gemini_service.py"
click node_database "https://github.com/vishwas2628/blog-app/blob/main/blog_main/settings.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_site_views,node_blog_views,node_home_template,node_blog_template,node_category_template,node_search_template,node_register_template,node_login_template toneBlue
class node_dashboard_views,node_dashboard_templates,node_dashboard_forms,node_gemini_service toneAmber
class node_blog_models,node_assignment_models,node_context_processors,node_register_form toneMint
class node_database,node_gemini toneRose
class node_visitor toneIndigo
```

## Components

### Public blog

- [Home and auth](https://github.com/vishwas2628/blog-app/blob/main/blog_main/views.py): `blog_main/views.py`
- [Browse and comment](https://github.com/vishwas2628/blog-app/blob/main/blogs/views.py): `blogs/views.py`
- [Home page](https://github.com/vishwas2628/blog-app/blob/main/templates/index.html): `templates/index.html`
- [Post page](https://github.com/vishwas2628/blog-app/blob/main/templates/blogs.html): `templates/blogs.html`
- [Category page](https://github.com/vishwas2628/blog-app/blob/main/templates/blog_by_category.html): `templates/blog_by_category.html`
- [Search page](https://github.com/vishwas2628/blog-app/blob/main/templates/search.html): `templates/search.html`
- [Registration page](https://github.com/vishwas2628/blog-app/blob/main/templates/register.html): `templates/register.html`
- [Login page](https://github.com/vishwas2628/blog-app/blob/main/templates/login.html): `templates/login.html`

### Content management

- [Dashboard actions](https://github.com/vishwas2628/blog-app/blob/main/dashboard/views.py): `dashboard/views.py`
- [Dashboard UI](https://github.com/vishwas2628/blog-app/tree/main/templates/dashboard): `templates/dashboard`
- [Management forms](https://github.com/vishwas2628/blog-app/blob/main/dashboard/forms.py): `dashboard/forms.py`
- [Text correction](https://github.com/vishwas2628/blog-app/blob/main/dashboard/gemini_service.py): `dashboard/gemini_service.py`

### Shared services

- [Posts and categories](https://github.com/vishwas2628/blog-app/blob/main/blogs/models.py): `blogs/models.py`
- [About and links](https://github.com/vishwas2628/blog-app/blob/main/assignments/models.py): `assignments/models.py`
- [Shared page context](https://github.com/vishwas2628/blog-app/blob/main/blogs/context_processors.py): `blogs/context_processors.py`
- [Registration form](https://github.com/vishwas2628/blog-app/blob/main/blog_main/forms.py): `blog_main/forms.py`

### Data and integrations

- [SQLite database](https://github.com/vishwas2628/blog-app/blob/main/blog_main/settings.py): `blog_main/settings.py`
- **Google Gemini**

### Other components

- **Visitor**

## Connections

- Visitor → Home and auth: requests pages
- Home and auth → Posts and categories: reads posts
- Home and auth → About and links: reads about
- Home and auth → Home page: renders
- Home and auth → Registration form: validates registration
- Home and auth → Registration page: renders
- Home and auth → Login page: renders
- Visitor → Browse and comment: browses and comments
- Browse and comment → Posts and categories: queries and saves
- Browse and comment → Post page: renders
- Browse and comment → Category page: renders
- Browse and comment → Search page: renders
- Visitor → Dashboard actions: manages content
- Dashboard actions → Posts and categories: reads and writes
- Dashboard actions → Management forms: validates changes
- Dashboard actions → Dashboard UI: renders
- Dashboard actions → Text correction: requests correction
- Text correction → Google Gemini: sends text
- Shared page context → Posts and categories: reads categories
- Shared page context → About and links: reads social links
- Posts and categories → SQLite database: reads and writes
- About and links → SQLite database: reads and writes
