# aaryansrinivas/storynest-django-blog architecture

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

- Interactive diagram: https://gitdiagram.com/aaryansrinivas/storynest-django-blog
- Repository: https://github.com/aaryansrinivas/storynest-django-blog

## Overview

StoryNest is a React and Django blogging platform. Readers browse and search posts, open post details, and view author profiles; authenticated users register or sign in, manage posts and profiles, and interact through likes, comments, and image uploads. The frontend routes pages through a shared API client and auth state; Django endpoints apply serializers and permissions around account and blog data. OAuth, throttling, and post analytics are also represented. Backend persistence and some wiring are inferred from documented behavior and models; unsampled implementation details are not asserted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/App.jsx) (Routes and guards), [`frontend/src/lib/api.js`](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/lib/api.js) (API client), [`blog/views.py`](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/views.py) (Post and comment API), [`account/views.py`](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/views.py) (Account endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Routes and guards<br/>[App.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
  node_home["Post discovery<br/>[Home.jsx]"]
  node_postcard["Post cards<br/>[PostCard.jsx]"]
  node_detail["Post detail<br/>[PostDetail.jsx]"]
  node_editor["Post editor<br/>[PostEditor.jsx]"]
  node_myposts["My posts<br/>[MyPosts.jsx]"]
  node_profilepage["Profile pages<br/>[Profile.jsx]"]
  node_authpages["Login and signup<br/>[Login.jsx]"]
  node_oauthcallback["OAuth callback<br/>[OAuthCallback.jsx]"]
  node_oauthbuttons["OAuth buttons<br/>[OAuthButtons.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_authstate["Auth state<br/>[authStore.js]"]
end

subgraph group_account["Accounts and security"]
  node_accountapi["Account endpoints<br/>[views.py]"]
  node_accountserializers["Account serializers<br/>[serializers.py]"]
  node_profiles[("User profiles<br/>[models.py]")]
  node_socialauth["Social authentication<br/>[pipeline.py]"]
end

subgraph group_publishing["Blog publishing"]
  node_blogapi["Post and comment API<br/>[views.py]"]
  node_blogserializers["Blog serializers<br/>[serializers.py]"]
  node_blogdata[("Posts, tags, media<br/>[models.py]")]
  node_permissions["Post permissions<br/>[permissions.py]"]
end

subgraph group_platform["Backend platform"]
  node_throttles["Rate limits<br/>[throttles.py]"]
  node_routing["API routing<br/>[urls.py]"]
end

node_reader(("Reader / author"))
node_database[("PostgreSQL")]
node_oauthproviders(("Google / GitHub"))

node_reader -->|"uses"| node_app
node_app -->|"renders"| node_layout
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_detail
node_app -->|"guards and routes"| node_editor
node_app -->|"guards and routes"| node_myposts
node_app -->|"routes to"| node_profilepage
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_oauthcallback
node_home -->|"requests"| node_api
node_home -->|"renders"| node_postcard
node_detail -->|"requests"| node_api
node_editor -->|"requests"| node_api
node_myposts -->|"requests"| node_api
node_profilepage -->|"requests"| node_api
node_profilepage -->|"renders"| node_postcard
node_authpages -->|"authenticates"| node_authstate
node_authpages -->|"renders"| node_oauthbuttons
node_oauthbuttons -->|"loads providers"| node_api
node_oauthcallback -->|"exchanges session"| node_authstate
node_authstate -->|"calls"| node_api
node_api -->|"REST requests"| node_accountapi
node_accountapi -->|"serializes"| node_accountserializers
node_accountapi -->|"reads and updates"| node_profiles
node_accountserializers -->|"serializes"| node_profiles
node_accountapi -->|"applies limits"| node_throttles
node_oauthproviders -.->|"authenticates via"| node_socialauth
node_oauthbuttons -->|"starts login"| node_oauthproviders
node_api -->|"REST requests"| node_blogapi
node_blogapi -->|"serializes"| node_blogserializers
node_blogapi -->|"queries and updates"| node_blogdata
node_blogapi -->|"checks access"| node_permissions
node_blogapi -->|"applies limits"| node_throttles
node_blogserializers -->|"serializes"| node_blogdata
node_routing -.->|"routes auth"| node_accountapi
node_routing -.->|"routes posts"| node_blogapi
node_accountapi -.->|"persists account data"| node_database
node_blogapi -.->|"persists blog data"| node_database

click node_app "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/App.jsx"
click node_layout "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/components/Layout.jsx"
click node_home "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/Home.jsx"
click node_postcard "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/components/PostCard.jsx"
click node_detail "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/PostDetail.jsx"
click node_editor "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/PostEditor.jsx"
click node_myposts "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/MyPosts.jsx"
click node_profilepage "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/Profile.jsx"
click node_authpages "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/Login.jsx"
click node_oauthcallback "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/OAuthCallback.jsx"
click node_oauthbuttons "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/components/OAuthButtons.jsx"
click node_api "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/lib/api.js"
click node_authstate "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/store/authStore.js"
click node_accountapi "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/views.py"
click node_accountserializers "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/serializers.py"
click node_profiles "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/models.py"
click node_socialauth "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/pipeline.py"
click node_blogapi "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/views.py"
click node_blogserializers "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/serializers.py"
click node_blogdata "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/models.py"
click node_permissions "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/permissions.py"
click node_throttles "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog_project/throttles.py"
click node_routing "https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog_project/urls.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_app,node_layout,node_home,node_postcard,node_detail,node_editor,node_myposts,node_profilepage,node_authpages,node_oauthcallback,node_oauthbuttons,node_api,node_authstate toneBlue
class node_accountapi,node_accountserializers,node_profiles,node_socialauth,node_database toneAmber
class node_blogapi,node_blogserializers,node_blogdata,node_permissions toneMint
class node_throttles,node_routing toneRose
class node_reader,node_oauthproviders toneIndigo
```

## Components

### React client

- [Routes and guards](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Shared layout](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/components/Layout.jsx): `frontend/src/components/Layout.jsx`
- [Post discovery](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Post cards](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/components/PostCard.jsx): `frontend/src/components/PostCard.jsx`
- [Post detail](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/PostDetail.jsx): `frontend/src/pages/PostDetail.jsx`
- [Post editor](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/PostEditor.jsx): `frontend/src/pages/PostEditor.jsx`
- [My posts](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/MyPosts.jsx): `frontend/src/pages/MyPosts.jsx`
- [Profile pages](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Login and signup](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [OAuth callback](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/pages/OAuthCallback.jsx): `frontend/src/pages/OAuthCallback.jsx`
- [OAuth buttons](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/components/OAuthButtons.jsx): `frontend/src/components/OAuthButtons.jsx`
- [API client](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`
- [Auth state](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/frontend/src/store/authStore.js): `frontend/src/store/authStore.js`

### Accounts and security

- [Account endpoints](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/views.py): `account/views.py`
- [Account serializers](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/serializers.py): `account/serializers.py`
- [User profiles](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/models.py): `account/models.py`
- [Social authentication](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/account/pipeline.py): `account/pipeline.py`

### Blog publishing

- [Post and comment API](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/views.py): `blog/views.py`
- [Blog serializers](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/serializers.py): `blog/serializers.py`
- [Posts, tags, media](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/models.py): `blog/models.py`
- [Post permissions](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog/permissions.py): `blog/permissions.py`

### Backend platform

- [Rate limits](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog_project/throttles.py): `blog_project/throttles.py`
- [API routing](https://github.com/aaryansrinivas/storynest-django-blog/blob/main/blog_project/urls.py): `blog_project/urls.py`

### Other components

- **Reader / author**
- **PostgreSQL**
- **Google / GitHub**

## Connections

- Reader / author → Routes and guards: uses (evidence: `README.md`)
- Routes and guards → Shared layout: renders (evidence: `frontend/src/App.jsx`)
- Routes and guards → Post discovery: routes to (evidence: `frontend/src/App.jsx`)
- Routes and guards → Post detail: routes to (evidence: `frontend/src/App.jsx`)
- Routes and guards → Post editor: guards and routes (evidence: `frontend/src/App.jsx`)
- Routes and guards → My posts: guards and routes (evidence: `frontend/src/App.jsx`)
- Routes and guards → Profile pages: routes to (evidence: `frontend/src/App.jsx`)
- Routes and guards → Login and signup: routes to (evidence: `frontend/src/App.jsx`)
- Routes and guards → OAuth callback: routes to (evidence: `frontend/src/App.jsx`)
- Post discovery → API client: requests (evidence: `frontend/src/pages/Home.jsx`)
- Post discovery → Post cards: renders (evidence: `frontend/src/pages/Home.jsx`)
- Post detail → API client: requests (evidence: `frontend/src/pages/PostDetail.jsx`)
- Post editor → API client: requests (evidence: `frontend/src/pages/PostEditor.jsx`)
- My posts → API client: requests (evidence: `frontend/src/pages/MyPosts.jsx`)
- Profile pages → API client: requests (evidence: `frontend/src/pages/Profile.jsx`)
- Profile pages → Post cards: renders (evidence: `frontend/src/pages/Profile.jsx`)
- Login and signup → Auth state: authenticates (evidence: `frontend/src/pages/Login.jsx`)
- Login and signup → OAuth buttons: renders (evidence: `frontend/src/pages/Login.jsx`)
- OAuth buttons → API client: loads providers (evidence: `frontend/src/components/OAuthButtons.jsx`)
- OAuth callback → Auth state: exchanges session (evidence: `frontend/src/pages/OAuthCallback.jsx`)
- Auth state → API client: calls (evidence: `frontend/src/store/authStore.js`)
- API client → Account endpoints: REST requests (evidence: `README.md`)
- Account endpoints → Account serializers: serializes (evidence: `account/views.py`)
- Account endpoints → User profiles: reads and updates (evidence: `account/views.py`)
- Account serializers → User profiles: serializes (evidence: `account/serializers.py`)
- Account endpoints → Rate limits: applies limits (evidence: `account/views.py`)
- Google / GitHub → Social authentication: authenticates via (evidence: `README.md`)
- OAuth buttons → Google / GitHub: starts login (evidence: `frontend/src/components/OAuthButtons.jsx`)
- API client → Post and comment API: REST requests (evidence: `README.md`)
- Post and comment API → Blog serializers: serializes (evidence: `blog/views.py`)
- Post and comment API → Posts, tags, media: queries and updates (evidence: `blog/views.py`)
- Post and comment API → Post permissions: checks access (evidence: `blog/views.py`)
- Post and comment API → Rate limits: applies limits (evidence: `blog/views.py`)
- Blog serializers → Posts, tags, media: serializes (evidence: `blog/serializers.py`)
- API routing → Account endpoints: routes auth (evidence: `README.md`)
- API routing → Post and comment API: routes posts (evidence: `README.md`)
- Account endpoints → PostgreSQL: persists account data (evidence: `README.md`)
- Post and comment API → PostgreSQL: persists blog data (evidence: `README.md`)
