# hacksoftware/django-styleguide architecture

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

- Interactive diagram: https://gitdiagram.com/hacksoftware/django-styleguide
- Repository: https://github.com/hacksoftware/django-styleguide

## Overview

This repository is a Django application-architecture styleguide, not a Django runtime package. Its principal workflow is for a developer to consult the guide and apply its recommendations when structuring a project: keep business logic in domain-focused components and separate it from interfaces. The README also documents API design, configuration, errors, background tasks, and testing. The tree contains no implementation of those Django features; all capability nodes therefore point to README.md, and the graph shows documented recommendations rather than runtime calls.

Main entry points: [`README.md`](https://github.com/hacksoftware/django-styleguide/blob/master/README.md) (Styleguide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_domain["Domain Logic"]
  node_models["Models<br/>[README.md]"]
  node_services["Services<br/>[README.md]"]
  node_selectors["Selectors<br/>[README.md]"]
end

subgraph group_interfaces["Application Interfaces"]
  node_apis["APIs and Views<br/>[README.md]"]
  node_serializers["Serializers<br/>[README.md]"]
  node_urls["URL Routing<br/>[README.md]"]
end

subgraph group_operations["Project Operations"]
  node_settings["Settings and Integrations<br/>[README.md]"]
  node_errors["Error Handling<br/>[README.md]"]
  node_celery["Background Tasks<br/>[README.md]"]
end

subgraph group_quality["Quality Practices"]
  node_testing["Testing<br/>[README.md]"]
end

node_developer(("Django Developer"))
node_guide["Styleguide<br/>[README.md]"]

node_developer -->|"consults"| node_guide
node_guide -->|"assigns business logic"| node_services
node_guide -->|"assigns data fetching"| node_selectors
node_guide -->|"recommends model logic"| node_models
node_guide -->|"separates business logic"| node_apis
node_guide -->|"separates business logic"| node_serializers
node_guide -->|"documents routing"| node_urls
node_guide -->|"documents configuration"| node_settings
node_guide -->|"documents handling"| node_errors
node_guide -->|"documents task patterns"| node_celery
node_guide -->|"documents practices"| node_testing

click node_guide "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_models "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_services "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_selectors "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_apis "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_serializers "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_urls "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_settings "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_errors "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_celery "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"
click node_testing "https://github.com/hacksoftware/django-styleguide/blob/master/README.md"

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_models,node_services,node_selectors toneBlue
class node_apis,node_serializers,node_urls toneAmber
class node_settings,node_errors,node_celery toneMint
class node_testing toneRose
class node_developer toneIndigo
class node_guide toneTeal
```

## Components

### Domain Logic

- [Models](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`
- [Services](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`
- [Selectors](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`

### Application Interfaces

- [APIs and Views](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`
- [Serializers](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`
- [URL Routing](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`

### Project Operations

- [Settings and Integrations](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`
- [Error Handling](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`
- [Background Tasks](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`

### Quality Practices

- [Testing](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`

### Other components

- **Django Developer**
- [Styleguide](https://github.com/hacksoftware/django-styleguide/blob/master/README.md): `README.md`

## Connections

- Django Developer → Styleguide: consults (evidence: `README.md`)
- Styleguide → Services: assigns business logic (evidence: `README.md`)
- Styleguide → Selectors: assigns data fetching (evidence: `README.md`)
- Styleguide → Models: recommends model logic (evidence: `README.md`)
- Styleguide → APIs and Views: separates business logic (evidence: `README.md`)
- Styleguide → Serializers: separates business logic (evidence: `README.md`)
- Styleguide → URL Routing: documents routing (evidence: `README.md`)
- Styleguide → Settings and Integrations: documents configuration (evidence: `README.md`)
- Styleguide → Error Handling: documents handling (evidence: `README.md`)
- Styleguide → Background Tasks: documents task patterns (evidence: `README.md`)
- Styleguide → Testing: documents practices (evidence: `README.md`)
