# raghavendrasai2003/blog architecture

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

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

## Overview

This is a Django blog with reader and writer roles, HTML browsing and authoring, a posts API with JWT authentication, and asynchronous welcome email. The main user flow is HTTP routing into authentication or blog views, which read or update blog records and return pages or API responses. Celery handles the registration email task. The source excerpts show the core domain and calls; admin, maintenance behavior, and some configuration are represented only where supported by the index or settings excerpt.

Main entry points: [`my_site/urls.py`](https://github.com/raghavendrasai2003/blog/blob/main/my_site/urls.py) (Site routes), [`blog/auth_views.py`](https://github.com/raghavendrasai2003/blog/blob/main/blog/auth_views.py) (Account flows), [`blog/models.py`](https://github.com/raghavendrasai2003/blog/blob/main/blog/models.py) (Blog records), [`blog/views.py`](https://github.com/raghavendrasai2003/blog/blob/main/blog/views.py) (Blog views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Web routing"]
  node_site_routes["Site routes<br/>[urls.py]"]
  node_blog_routes["Blog routes<br/>[urls.py]"]
  node_api_routes["API routes<br/>[urls_api.py]"]
end

subgraph group_experience["Blog experience"]
  node_blog_views["Blog views<br/>[views.py]"]
  node_admin["Django admin<br/>[admin.py]"]
  node_middleware["Maintenance gate<br/>[middleware.py]"]
end

subgraph group_identity["Identity and API"]
  node_auth_views["Account flows<br/>[auth_views.py]"]
  node_api_views["Posts API<br/>[api_views.py]"]
  node_serializers["API serializers<br/>[serializers.py]"]
end

subgraph group_domain["Domain and async"]
  node_models[("Blog records<br/>[models.py]")]
  node_forms["Post forms<br/>[forms.py]"]
  node_signals["Profile signals<br/>[signals.py]"]
  node_app_config["App startup<br/>[apps.py]"]
  node_celery_app["Celery app<br/>[celery.py]"]
  node_email_task["Welcome email task<br/>[tasks.py]"]
end

node_visitor(("Visitor"))
node_mail["SMTP email"]
node_task_broker["Redis broker"]

node_visitor -->|"sends requests"| node_site_routes
node_site_routes -->|"includes blog"| node_blog_routes
node_site_routes -->|"includes API"| node_api_routes
node_site_routes -->|"routes dashboards"| node_blog_views
node_site_routes -->|"routes account"| node_auth_views
node_blog_routes -->|"routes pages"| node_blog_views
node_blog_routes -->|"routes registration"| node_auth_views
node_blog_views -->|"queries records"| node_models
node_blog_views -->|"uses forms"| node_forms
node_auth_views -->|"creates profiles"| node_models
node_auth_views -->|"sets token serializer"| node_serializers
node_api_routes -->|"routes endpoints"| node_api_views
node_api_views -->|"queries posts"| node_models
node_api_views -->|"serializes posts"| node_serializers
node_serializers -->|"maps posts"| node_models
node_app_config -->|"loads handlers"| node_signals
node_signals -->|"uses profile models"| node_models
node_auth_views -->|"queues welcome email"| node_email_task
node_celery_app -.->|"discovers tasks"| node_email_task
node_email_task -->|"sends email"| node_mail
node_celery_app -.->|"uses broker"| node_task_broker
node_site_routes -->|"exposes admin"| node_admin
node_middleware -.->|"gates requests"| node_site_routes

click node_site_routes "https://github.com/raghavendrasai2003/blog/blob/main/my_site/urls.py"
click node_blog_routes "https://github.com/raghavendrasai2003/blog/blob/main/blog/urls.py"
click node_api_routes "https://github.com/raghavendrasai2003/blog/blob/main/blog/urls_api.py"
click node_blog_views "https://github.com/raghavendrasai2003/blog/blob/main/blog/views.py"
click node_admin "https://github.com/raghavendrasai2003/blog/blob/main/blog/admin.py"
click node_middleware "https://github.com/raghavendrasai2003/blog/blob/main/blog/middleware.py"
click node_auth_views "https://github.com/raghavendrasai2003/blog/blob/main/blog/auth_views.py"
click node_api_views "https://github.com/raghavendrasai2003/blog/blob/main/blog/api_views.py"
click node_serializers "https://github.com/raghavendrasai2003/blog/blob/main/blog/serializers.py"
click node_models "https://github.com/raghavendrasai2003/blog/blob/main/blog/models.py"
click node_forms "https://github.com/raghavendrasai2003/blog/blob/main/blog/forms.py"
click node_signals "https://github.com/raghavendrasai2003/blog/blob/main/blog/signals.py"
click node_app_config "https://github.com/raghavendrasai2003/blog/blob/main/blog/apps.py"
click node_celery_app "https://github.com/raghavendrasai2003/blog/blob/main/my_site/celery.py"
click node_email_task "https://github.com/raghavendrasai2003/blog/blob/main/blog/tasks.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_routes,node_blog_routes,node_api_routes toneBlue
class node_blog_views,node_admin,node_middleware,node_task_broker toneAmber
class node_auth_views,node_api_views,node_serializers toneMint
class node_models,node_forms,node_signals,node_app_config,node_celery_app,node_email_task toneRose
class node_visitor,node_mail toneIndigo
```

## Components

### Web routing

- [Site routes](https://github.com/raghavendrasai2003/blog/blob/main/my_site/urls.py): `my_site/urls.py`
- [Blog routes](https://github.com/raghavendrasai2003/blog/blob/main/blog/urls.py): `blog/urls.py`
- [API routes](https://github.com/raghavendrasai2003/blog/blob/main/blog/urls_api.py): `blog/urls_api.py`

### Blog experience

- [Blog views](https://github.com/raghavendrasai2003/blog/blob/main/blog/views.py): `blog/views.py`
- [Django admin](https://github.com/raghavendrasai2003/blog/blob/main/blog/admin.py): `blog/admin.py`
- [Maintenance gate](https://github.com/raghavendrasai2003/blog/blob/main/blog/middleware.py): `blog/middleware.py`

### Identity and API

- [Account flows](https://github.com/raghavendrasai2003/blog/blob/main/blog/auth_views.py): `blog/auth_views.py`
- [Posts API](https://github.com/raghavendrasai2003/blog/blob/main/blog/api_views.py): `blog/api_views.py`
- [API serializers](https://github.com/raghavendrasai2003/blog/blob/main/blog/serializers.py): `blog/serializers.py`

### Domain and async

- [Blog records](https://github.com/raghavendrasai2003/blog/blob/main/blog/models.py): `blog/models.py`
- [Post forms](https://github.com/raghavendrasai2003/blog/blob/main/blog/forms.py): `blog/forms.py`
- [Profile signals](https://github.com/raghavendrasai2003/blog/blob/main/blog/signals.py): `blog/signals.py`
- [App startup](https://github.com/raghavendrasai2003/blog/blob/main/blog/apps.py): `blog/apps.py`
- [Celery app](https://github.com/raghavendrasai2003/blog/blob/main/my_site/celery.py): `my_site/celery.py`
- [Welcome email task](https://github.com/raghavendrasai2003/blog/blob/main/blog/tasks.py): `blog/tasks.py`

### Other components

- **Visitor**
- **SMTP email**
- **Redis broker**

## Connections

- Visitor → Site routes: sends requests (evidence: `my_site/urls.py`)
- Site routes → Blog routes: includes blog (evidence: `my_site/urls.py`)
- Site routes → API routes: includes API (evidence: `my_site/urls.py`)
- Site routes → Blog views: routes dashboards (evidence: `my_site/urls.py`)
- Site routes → Account flows: routes account (evidence: `my_site/urls.py`)
- Blog routes → Blog views: routes pages (evidence: `blog/urls.py`)
- Blog routes → Account flows: routes registration (evidence: `blog/urls.py`)
- Blog views → Blog records: queries records (evidence: `blog/views.py`)
- Blog views → Post forms: uses forms (evidence: `blog/views.py`)
- Account flows → Blog records: creates profiles (evidence: `blog/auth_views.py`)
- Account flows → API serializers: sets token serializer (evidence: `blog/auth_views.py`)
- API routes → Posts API: routes endpoints (evidence: `blog/urls_api.py`)
- Posts API → Blog records: queries posts (evidence: `blog/api_views.py`)
- Posts API → API serializers: serializes posts (evidence: `blog/api_views.py`)
- API serializers → Blog records: maps posts (evidence: `blog/serializers.py`)
- App startup → Profile signals: loads handlers (evidence: `blog/apps.py`)
- Profile signals → Blog records: uses profile models (evidence: `blog/signals.py`)
- Account flows → Welcome email task: queues welcome email (evidence: `blog/auth_views.py`)
- Celery app → Welcome email task: discovers tasks (evidence: `blog/tasks.py`)
- Welcome email task → SMTP email: sends email (evidence: `blog/tasks.py`)
- Celery app → Redis broker: uses broker
- Site routes → Django admin: exposes admin (evidence: `my_site/urls.py`)
- Maintenance gate → Site routes: gates requests
