# mazenkhaled74/personal_blog architecture

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

- Interactive diagram: https://gitdiagram.com/mazenkhaled74/personal_blog
- Repository: https://github.com/mazenkhaled74/personal_blog

## Overview

This repository implements a Django REST API for user accounts and a social blogging service. The main workflow is account registration or login, followed by authenticated post creation and retrieval, with separate endpoints for editing, likes, comments, profiles, and search. Views coordinate serializers and ORM models; the models define users and blog content. The supplied excerpts show app-level routes and view behavior, but not project URL inclusion or database configuration, so those links are omitted.

Main entry points: [`auth_manager/views.py`](https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/views.py) (Account Views), [`content/views.py`](https://github.com/mazenkhaled74/personal_blog/blob/main/content/views.py) (Content Views), [`content/models.py`](https://github.com/mazenkhaled74/personal_blog/blob/main/content/models.py) (Content Models), [`auth_manager/models.py`](https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/models.py) (Custom User)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_account_views["Account Views<br/>[views.py]"]
  node_account_serializer["User Serializer<br/>[serializers.py]"]
  node_user_model["Custom User<br/>[models.py]"]
end

subgraph group_content["Blog Content"]
  node_content_views["Content Views<br/>[views.py]"]
  node_content_serializers["Content Serializers<br/>[serializers.py]"]
  node_content_models["Content Models<br/>[models.py]"]
end

subgraph group_api["API Handling"]
  node_account_routes["Account Routes<br/>[urls.py]"]
  node_content_routes["Content Routes<br/>[urls.py]"]
end

node_user(("API User"))

node_user -->|"requests account"| node_account_routes
node_account_routes -->|"dispatches"| node_account_views
node_account_views -->|"validates users"| node_account_serializer
node_account_serializer -->|"serializes"| node_user_model
node_account_views -->|"authenticates"| node_user_model
node_user -->|"requests content"| node_content_routes
node_content_routes -->|"dispatches"| node_content_views
node_content_views -->|"serializes content"| node_content_serializers
node_content_views -->|"queries and updates"| node_content_models
node_content_serializers -->|"serializes"| node_content_models
node_content_models -->|"references user"| node_user_model

click node_account_routes "https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/urls.py"
click node_account_views "https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/views.py"
click node_account_serializer "https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/serializers.py"
click node_user_model "https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/models.py"
click node_content_routes "https://github.com/mazenkhaled74/personal_blog/blob/main/content/urls.py"
click node_content_views "https://github.com/mazenkhaled74/personal_blog/blob/main/content/views.py"
click node_content_serializers "https://github.com/mazenkhaled74/personal_blog/blob/main/content/serializers.py"
click node_content_models "https://github.com/mazenkhaled74/personal_blog/blob/main/content/models.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_account_views,node_account_serializer,node_user_model,node_user toneBlue
class node_content_views,node_content_serializers,node_content_models toneAmber
class node_account_routes,node_content_routes toneMint
```

## Components

### Accounts

- [Account Views](https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/views.py): `auth_manager/views.py`
- [User Serializer](https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/serializers.py): `auth_manager/serializers.py`
- [Custom User](https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/models.py): `auth_manager/models.py`

### Blog Content

- [Content Views](https://github.com/mazenkhaled74/personal_blog/blob/main/content/views.py): `content/views.py`
- [Content Serializers](https://github.com/mazenkhaled74/personal_blog/blob/main/content/serializers.py): `content/serializers.py`
- [Content Models](https://github.com/mazenkhaled74/personal_blog/blob/main/content/models.py): `content/models.py`

### API Handling

- [Account Routes](https://github.com/mazenkhaled74/personal_blog/blob/main/auth_manager/urls.py): `auth_manager/urls.py`
- [Content Routes](https://github.com/mazenkhaled74/personal_blog/blob/main/content/urls.py): `content/urls.py`

### Other components

- **API User**

## Connections

- API User → Account Routes: requests account (evidence: `auth_manager/urls.py`)
- Account Routes → Account Views: dispatches (evidence: `auth_manager/urls.py`)
- Account Views → User Serializer: validates users (evidence: `auth_manager/views.py`)
- User Serializer → Custom User: serializes (evidence: `auth_manager/serializers.py`)
- Account Views → Custom User: authenticates (evidence: `auth_manager/views.py`)
- API User → Content Routes: requests content (evidence: `content/urls.py`)
- Content Routes → Content Views: dispatches (evidence: `content/urls.py`)
- Content Views → Content Serializers: serializes content (evidence: `content/views.py`)
- Content Views → Content Models: queries and updates (evidence: `content/views.py`)
- Content Serializers → Content Models: serializes (evidence: `content/serializers.py`)
- Content Models → Custom User: references user (evidence: `content/models.py`)
