# tologon7/internet-blog architecture

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

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

## Overview

This repository implements a Django REST API for a blog with user accounts. Users register or log in, receive JWTs, then use authenticated endpoints to manage posts, comments, and collections; account endpoints also support profile and password changes and OTP-based recovery. Blog responses are shaped by serializers, with category filtering, pagination, and localized dates. The excerpts and source index support the main app-to-view and view-to-domain relationships; some routing and external-service details are not fully shown, so uncertain links are omitted or marked dashed.

Main entry points: [`blog/views.py`](https://github.com/tologon7/internet-blog/blob/main/blog/views.py) (Blog handlers), [`authentication/views.py`](https://github.com/tologon7/internet-blog/blob/main/authentication/views.py) (Account handlers), [`blog/serializers.py`](https://github.com/tologon7/internet-blog/blob/main/blog/serializers.py) (Blog serializers), [`blog/models.py`](https://github.com/tologon7/internet-blog/blob/main/blog/models.py) (Posts and collections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API Routing"]
  node_auth_routes["Account routes<br/>[urls.py]"]
  node_blog_routes["Blog routes<br/>[urls.py]"]
end

subgraph group_accounts["Accounts"]
  node_account_views["Account handlers<br/>[views.py]"]
  node_user_serializers["Account serializers<br/>[serializers.py]"]
  node_account_models[("Users and OTP<br/>[models.py]")]
  node_permissions["Ownership checks<br/>[permissions.py]"]
end

subgraph group_blog["Blog Features"]
  node_blog_views["Blog handlers<br/>[views.py]"]
  node_blog_serializers["Blog serializers<br/>[serializers.py]"]
  node_blog_models[("Posts and collections<br/>[models.py]")]
  node_post_filters["Post filtering<br/>[filters.py]"]
  node_pagination["Pagination<br/>[pagination.py]"]
  node_date_format["Date formatting<br/>[datetime.py]"]
end

subgraph group_runtime["Runtime Configuration"]
  node_settings["Django settings<br/>[settings.py]"]
end

node_client(("API client"))
node_database[("Configured database")]
node_email_service["SMTP email"]
node_media_storage["Cloudinary storage"]

node_client -.->|"calls"| node_auth_routes
node_client -.->|"calls"| node_blog_routes
node_auth_routes -->|"routes to"| node_account_views
node_blog_routes -->|"routes to"| node_blog_views
node_account_views -->|"validates with"| node_user_serializers
node_account_views -->|"reads and writes"| node_account_models
node_user_serializers -->|"serializes"| node_account_models
node_account_views -->|"sends email"| node_email_service
node_blog_views -->|"queries"| node_blog_models
node_blog_views -->|"serializes with"| node_blog_serializers
node_blog_views -->|"filters with"| node_post_filters
node_blog_views -->|"paginates with"| node_pagination
node_blog_views -->|"checks ownership"| node_permissions
node_blog_serializers -->|"serializes"| node_blog_models
node_blog_serializers -->|"formats dates"| node_date_format
node_blog_models -->|"references users"| node_account_models
node_settings -->|"configures"| node_database
node_settings -->|"configures"| node_media_storage

click node_auth_routes "https://github.com/tologon7/internet-blog/blob/main/authentication/urls.py"
click node_blog_routes "https://github.com/tologon7/internet-blog/blob/main/blog/urls.py"
click node_account_views "https://github.com/tologon7/internet-blog/blob/main/authentication/views.py"
click node_user_serializers "https://github.com/tologon7/internet-blog/blob/main/authentication/serializers.py"
click node_account_models "https://github.com/tologon7/internet-blog/blob/main/authentication/models.py"
click node_permissions "https://github.com/tologon7/internet-blog/blob/main/authentication/permissions.py"
click node_blog_views "https://github.com/tologon7/internet-blog/blob/main/blog/views.py"
click node_blog_serializers "https://github.com/tologon7/internet-blog/blob/main/blog/serializers.py"
click node_blog_models "https://github.com/tologon7/internet-blog/blob/main/blog/models.py"
click node_post_filters "https://github.com/tologon7/internet-blog/blob/main/blog/filters.py"
click node_pagination "https://github.com/tologon7/internet-blog/blob/main/blog/pagination.py"
click node_date_format "https://github.com/tologon7/internet-blog/blob/main/blog/datetime.py"
click node_settings "https://github.com/tologon7/internet-blog/blob/main/config/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_auth_routes,node_blog_routes,node_client toneBlue
class node_account_views,node_user_serializers,node_account_models,node_permissions,node_database,node_media_storage toneAmber
class node_blog_views,node_blog_serializers,node_blog_models,node_post_filters,node_pagination,node_date_format toneMint
class node_settings toneRose
class node_email_service toneIndigo
```

## Components

### API Routing

- [Account routes](https://github.com/tologon7/internet-blog/blob/main/authentication/urls.py): `authentication/urls.py`
- [Blog routes](https://github.com/tologon7/internet-blog/blob/main/blog/urls.py): `blog/urls.py`

### Accounts

- [Account handlers](https://github.com/tologon7/internet-blog/blob/main/authentication/views.py): `authentication/views.py`
- [Account serializers](https://github.com/tologon7/internet-blog/blob/main/authentication/serializers.py): `authentication/serializers.py`
- [Users and OTP](https://github.com/tologon7/internet-blog/blob/main/authentication/models.py): `authentication/models.py`
- [Ownership checks](https://github.com/tologon7/internet-blog/blob/main/authentication/permissions.py): `authentication/permissions.py`

### Blog Features

- [Blog handlers](https://github.com/tologon7/internet-blog/blob/main/blog/views.py): `blog/views.py`
- [Blog serializers](https://github.com/tologon7/internet-blog/blob/main/blog/serializers.py): `blog/serializers.py`
- [Posts and collections](https://github.com/tologon7/internet-blog/blob/main/blog/models.py): `blog/models.py`
- [Post filtering](https://github.com/tologon7/internet-blog/blob/main/blog/filters.py): `blog/filters.py`
- [Pagination](https://github.com/tologon7/internet-blog/blob/main/blog/pagination.py): `blog/pagination.py`
- [Date formatting](https://github.com/tologon7/internet-blog/blob/main/blog/datetime.py): `blog/datetime.py`

### Runtime Configuration

- [Django settings](https://github.com/tologon7/internet-blog/blob/main/config/settings.py): `config/settings.py`

### Other components

- **API client**
- **Configured database**
- **SMTP email**
- **Cloudinary storage**

## Connections

- API client → Account routes: calls
- API client → Blog routes: calls
- Account routes → Account handlers: routes to (evidence: `authentication/urls.py`)
- Blog routes → Blog handlers: routes to (evidence: `blog/urls.py`)
- Account handlers → Account serializers: validates with (evidence: `authentication/views.py`)
- Account handlers → Users and OTP: reads and writes (evidence: `authentication/views.py`)
- Account serializers → Users and OTP: serializes (evidence: `authentication/serializers.py`)
- Account handlers → SMTP email: sends email (evidence: `authentication/views.py`)
- Blog handlers → Posts and collections: queries (evidence: `blog/views.py`)
- Blog handlers → Blog serializers: serializes with (evidence: `blog/views.py`)
- Blog handlers → Post filtering: filters with (evidence: `blog/views.py`)
- Blog handlers → Pagination: paginates with (evidence: `blog/views.py`)
- Blog handlers → Ownership checks: checks ownership (evidence: `blog/views.py`)
- Blog serializers → Posts and collections: serializes (evidence: `blog/serializers.py`)
- Blog serializers → Date formatting: formats dates (evidence: `blog/serializers.py`)
- Posts and collections → Users and OTP: references users (evidence: `blog/models.py`)
- Django settings → Configured database: configures (evidence: `config/settings.py`)
- Django settings → Cloudinary storage: configures (evidence: `config/settings.py`)
