# gothinkster/django-realworld-example-app architecture

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

- Interactive diagram: https://gitdiagram.com/gothinkster/django-realworld-example-app
- Repository: https://github.com/gothinkster/django-realworld-example-app

## Overview

Conduit is a Django REST API example implementing RealWorld-style accounts, profiles, and social article features. A client calls API views, which validate or query domain models, serialize results, and return JSON; the main content workflow includes article browsing and author/tag/favorite filters, comments, and a followed-author feed. Registration and login, profile follow/unfollow, and article favorites are distinct capabilities. The graph follows documented behavior and indexed references; unsampled URL wiring and runtime details are omitted where evidence is insufficient.

Main entry points: [`conduit/apps/articles/models.py`](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/models.py) (Articles, comments, tags), [`conduit/apps/profiles/models.py`](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/models.py) (Profiles and follows), [`conduit/apps/articles/views.py`](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/views.py) (Article endpoints), [`conduit/apps/authentication/views.py`](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/views.py) (Account endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API workflows"]
end

subgraph group_identity["Identity and profiles"]
  node_auth_views["Account endpoints<br/>[views.py]"]
  node_auth_serializers["Account serializers<br/>[serializers.py]"]
  node_users["Users and JWT<br/>[models.py]"]
  node_profiles["Profiles and follows<br/>[models.py]"]
  node_profile_views["Profile endpoints<br/>[views.py]"]
  node_profile_serializers["Profile serializer<br/>[serializers.py]"]
end

subgraph group_content["Articles and discussion"]
  node_article_views["Article endpoints<br/>[views.py]"]
  node_article_serializers["Article serializers<br/>[serializers.py]"]
  node_articles["Articles, comments, tags<br/>[models.py]"]
  node_tag_relations["Tag relations<br/>[relations.py]"]
  node_slug_signal["Article slug signal<br/>[signals.py]"]
end

subgraph group_shared["Shared API layer"]
  node_renderers["JSON rendering<br/>[renderers.py]"]
  node_timestamps["Timestamp base model<br/>[models.py]"]
end

node_client(("API client"))
node_database[("Relational database")]

node_client -->|"sends requests"| node_auth_views
node_client -->|"sends requests"| node_profile_views
node_client -->|"sends requests"| node_article_views
node_auth_views -->|"validates and saves"| node_auth_serializers
node_auth_serializers -->|"creates and authenticates"| node_users
node_auth_serializers -->|"embeds profile"| node_profile_serializers
node_profile_views -->|"reads and follows"| node_profiles
node_profile_views -->|"serializes profiles"| node_profile_serializers
node_profile_serializers -->|"serializes"| node_profiles
node_article_views -->|"queries and mutates"| node_articles
node_article_views -->|"validates and serializes"| node_article_serializers
node_article_serializers -->|"creates and serializes"| node_articles
node_article_serializers -->|"uses tag field"| node_tag_relations
node_article_views -.->|"configures rendering"| node_renderers
node_auth_views -.->|"configures rendering"| node_renderers
node_profiles -->|"favorites relation"| node_articles
node_articles -->|"author relation"| node_profiles
node_articles -->|"inherits timestamps"| node_timestamps
node_users -->|"inherits timestamps"| node_timestamps
node_profiles -->|"inherits timestamps"| node_timestamps
node_slug_signal -->|"sets article slug"| node_articles
node_users -.->|"persists records"| node_database
node_profiles -.->|"persists records"| node_database
node_articles -.->|"persists records"| node_database

click node_auth_views "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/views.py"
click node_auth_serializers "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/serializers.py"
click node_users "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/models.py"
click node_profiles "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/models.py"
click node_profile_views "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/views.py"
click node_profile_serializers "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/serializers.py"
click node_article_views "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/views.py"
click node_article_serializers "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/serializers.py"
click node_articles "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/models.py"
click node_tag_relations "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/relations.py"
click node_slug_signal "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/signals.py"
click node_renderers "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/core/renderers.py"
click node_timestamps "https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/core/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_auth_views,node_auth_serializers,node_users,node_profiles,node_profile_views,node_profile_serializers,node_database toneAmber
class node_article_views,node_article_serializers,node_articles,node_tag_relations,node_slug_signal toneMint
class node_renderers,node_timestamps toneRose
class node_client toneBlue
```

## Components

### Identity and profiles

- [Account endpoints](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/views.py): `conduit/apps/authentication/views.py`
- [Account serializers](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/serializers.py): `conduit/apps/authentication/serializers.py`
- [Users and JWT](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/authentication/models.py): `conduit/apps/authentication/models.py`
- [Profiles and follows](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/models.py): `conduit/apps/profiles/models.py`
- [Profile endpoints](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/views.py): `conduit/apps/profiles/views.py`
- [Profile serializer](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/profiles/serializers.py): `conduit/apps/profiles/serializers.py`

### Articles and discussion

- [Article endpoints](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/views.py): `conduit/apps/articles/views.py`
- [Article serializers](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/serializers.py): `conduit/apps/articles/serializers.py`
- [Articles, comments, tags](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/models.py): `conduit/apps/articles/models.py`
- [Tag relations](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/relations.py): `conduit/apps/articles/relations.py`
- [Article slug signal](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/articles/signals.py): `conduit/apps/articles/signals.py`

### Shared API layer

- [JSON rendering](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/core/renderers.py): `conduit/apps/core/renderers.py`
- [Timestamp base model](https://github.com/gothinkster/django-realworld-example-app/blob/master/conduit/apps/core/models.py): `conduit/apps/core/models.py`

### Other components

- **API client**
- **Relational database**

## Connections

- API client → Account endpoints: sends requests (evidence: `README.md`)
- API client → Profile endpoints: sends requests (evidence: `README.md`)
- API client → Article endpoints: sends requests (evidence: `README.md`)
- Account endpoints → Account serializers: validates and saves (evidence: `conduit/apps/authentication/views.py`)
- Account serializers → Users and JWT: creates and authenticates (evidence: `conduit/apps/authentication/serializers.py`)
- Account serializers → Profile serializer: embeds profile (evidence: `conduit/apps/authentication/serializers.py`)
- Profile endpoints → Profiles and follows: reads and follows (evidence: `conduit/apps/profiles/views.py`)
- Profile endpoints → Profile serializer: serializes profiles (evidence: `conduit/apps/profiles/views.py`)
- Profile serializer → Profiles and follows: serializes (evidence: `conduit/apps/profiles/serializers.py`)
- Article endpoints → Articles, comments, tags: queries and mutates (evidence: `conduit/apps/articles/views.py`)
- Article endpoints → Article serializers: validates and serializes (evidence: `conduit/apps/articles/views.py`)
- Article serializers → Articles, comments, tags: creates and serializes (evidence: `conduit/apps/articles/serializers.py`)
- Article serializers → Tag relations: uses tag field (evidence: `conduit/apps/articles/serializers.py`)
- Article endpoints → JSON rendering: configures rendering
- Account endpoints → JSON rendering: configures rendering
- Profiles and follows → Articles, comments, tags: favorites relation (evidence: `conduit/apps/profiles/models.py`)
- Articles, comments, tags → Profiles and follows: author relation (evidence: `conduit/apps/articles/models.py`)
- Articles, comments, tags → Timestamp base model: inherits timestamps (evidence: `conduit/apps/articles/models.py`)
- Users and JWT → Timestamp base model: inherits timestamps (evidence: `conduit/apps/authentication/models.py`)
- Profiles and follows → Timestamp base model: inherits timestamps (evidence: `conduit/apps/profiles/models.py`)
- Article slug signal → Articles, comments, tags: sets article slug (evidence: `conduit/apps/articles/signals.py`)
- Users and JWT → Relational database: persists records
- Profiles and follows → Relational database: persists records
- Articles, comments, tags → Relational database: persists records
