# duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm architecture

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

- Interactive diagram: https://gitdiagram.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm
- Repository: https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm

## Overview

Perspect is a Vietnamese Django social network for sharing short “perspectives.” Users register and complete profiles, publish posts with optional images and topic tags, browse and search feeds, then interact through likes, comments and follows; notifications surface those interactions and new posts. The map separates request routing, account/content workflows, social features and persistence/integrations. Some documented capabilities, such as notifications and exploration, are included from the README and URL routes; their unsampled implementation details are not inferred.

Main entry points: [`Blog/devBlog/models.py`](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/models.py) (Social data models), [`Blog/devBlog/views.py`](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py) (Request handlers), [`Blog/devBlog/forms.py`](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/forms.py) (Input validation), [`Blog/Blog/settings.py`](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/Blog/settings.py) (Django configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["Request routes<br/>[urls.py]"]
  node_views["Request handlers<br/>[views.py]"]
  node_templates["Rendered pages"]
  node_settings["Django configuration<br/>[settings.py]"]
end

subgraph group_accounts["Accounts and content"]
  node_registration["Registration and profile<br/>[views.py]"]
  node_forms["Input validation<br/>[forms.py]"]
  node_authentication["Email or phone login<br/>[backends.py]"]
  node_publishing["Post publishing<br/>[views.py]"]
end

subgraph group_social["Social discovery"]
  node_feed["Feed and search<br/>[views.py]"]
  node_interactions["Likes and comments<br/>[views.py]"]
  node_following["Profiles and follows<br/>[views.py]"]
  node_notifications["Notifications<br/>[views.py]"]
end

subgraph group_data["Data and media"]
  node_domain["Social data models<br/>[models.py]"]
  node_database[("Neon PostgreSQL")]
  node_cloudinary[("Cloudinary image storage")]
  node_staticfiles["WhiteNoise static files"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_routes
node_routes -->|"routes requests"| node_views
node_views -->|"renders pages"| node_templates
node_views -->|"validates input"| node_forms
node_views -->|"queries and saves"| node_domain
node_registration -->|"validates signup"| node_forms
node_registration -->|"creates profiles"| node_domain
node_authentication -->|"normalizes phone"| node_forms
node_publishing -->|"validates posts"| node_forms
node_publishing -->|"saves posts"| node_domain
node_feed -->|"queries posts and tags"| node_domain
node_interactions -->|"records interactions"| node_domain
node_following -->|"updates follows"| node_domain
node_notifications -->|"records notifications"| node_domain
node_domain -->|"stores model data"| node_database
node_settings -->|"configures connection"| node_database
node_settings -->|"configures uploads"| node_cloudinary
node_settings -->|"configures static files"| node_staticfiles

click node_routes "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/urls.py"
click node_views "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_templates "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/tree/main/Blog/devBlog/templates/devBlog"
click node_settings "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/Blog/settings.py"
click node_registration "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_forms "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/forms.py"
click node_authentication "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/backends.py"
click node_publishing "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_feed "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_interactions "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_following "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_notifications "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py"
click node_domain "https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/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_routes,node_views,node_templates,node_settings toneBlue
class node_registration,node_forms,node_authentication,node_publishing toneAmber
class node_feed,node_interactions,node_following,node_notifications toneMint
class node_domain,node_database,node_cloudinary,node_staticfiles toneRose
class node_visitor toneIndigo
```

## Components

### Web interface

- [Request routes](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/urls.py): `Blog/devBlog/urls.py`
- [Request handlers](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`
- [Rendered pages](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/tree/main/Blog/devBlog/templates/devBlog): `Blog/devBlog/templates/devBlog`
- [Django configuration](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/Blog/settings.py): `Blog/Blog/settings.py`

### Accounts and content

- [Registration and profile](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`
- [Input validation](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/forms.py): `Blog/devBlog/forms.py`
- [Email or phone login](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/backends.py): `Blog/devBlog/backends.py`
- [Post publishing](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`

### Social discovery

- [Feed and search](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`
- [Likes and comments](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`
- [Profiles and follows](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`
- [Notifications](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/views.py): `Blog/devBlog/views.py`

### Data and media

- [Social data models](https://github.com/duchoai039-ctrl/24ct1-nguyenbahoaiduc-cnpm/blob/main/Blog/devBlog/models.py): `Blog/devBlog/models.py`
- **Neon PostgreSQL**
- **Cloudinary image storage**
- **WhiteNoise static files**

### Other components

- **Visitor**

## Connections

- Visitor → Request routes: requests pages (evidence: `Blog/devBlog/urls.py`)
- Request routes → Request handlers: routes requests (evidence: `Blog/devBlog/urls.py`)
- Request handlers → Rendered pages: renders pages (evidence: `Blog/devBlog/views.py`)
- Request handlers → Input validation: validates input (evidence: `Blog/devBlog/views.py`)
- Request handlers → Social data models: queries and saves (evidence: `Blog/devBlog/views.py`)
- Registration and profile → Input validation: validates signup (evidence: `Blog/devBlog/views.py`)
- Registration and profile → Social data models: creates profiles (evidence: `Blog/devBlog/views.py`)
- Email or phone login → Input validation: normalizes phone (evidence: `Blog/devBlog/backends.py`)
- Post publishing → Input validation: validates posts (evidence: `Blog/devBlog/views.py`)
- Post publishing → Social data models: saves posts (evidence: `Blog/devBlog/views.py`)
- Feed and search → Social data models: queries posts and tags (evidence: `Blog/devBlog/views.py`)
- Likes and comments → Social data models: records interactions (evidence: `Blog/devBlog/views.py`)
- Profiles and follows → Social data models: updates follows (evidence: `Blog/devBlog/views.py`)
- Notifications → Social data models: records notifications (evidence: `Blog/devBlog/views.py`)
- Social data models → Neon PostgreSQL: stores model data (evidence: `README.md`)
- Django configuration → Neon PostgreSQL: configures connection (evidence: `README.md`)
- Django configuration → Cloudinary image storage: configures uploads (evidence: `README.md`)
- Django configuration → WhiteNoise static files: configures static files (evidence: `README.md`)
