# shustrjak/simple_crm architecture

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

- Interactive diagram: https://gitdiagram.com/shustrjak/simple_crm
- Repository: https://github.com/shustrjak/simple_crm

## Overview

SimpleCRM is a Django CRM for organisations to manage clients, categories, and sales managers. The main workflow is an authenticated user reaching a client or category page; views apply organisation- and role-aware queries, accept forms for record changes, and render the result. Organisors can create sales managers and assign them to clients; signup and account-recovery routes are also present. The README gives setup commands rather than product documentation. The model and app URL implementations were not sampled, so their detailed behavior and some route wiring are represented only at the level supported by the tree and sampled imports.

Main entry points: [`clients/views.py`](https://github.com/shustrjak/simple_crm/blob/main/clients/views.py) (Client views), [`simplecrm/urls.py`](https://github.com/shustrjak/simple_crm/blob/main/simplecrm/urls.py) (Project routes), [`salesmanagers/views.py`](https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/views.py) (Sales manager views), [`clients/models.py`](https://github.com/shustrjak/simple_crm/blob/main/clients/models.py) (CRM models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_project_routes["Project routes<br/>[urls.py]"]
  node_client_routes["Client routes<br/>[urls.py]"]
  node_sales_routes["Sales routes<br/>[urls.py]"]
end

subgraph group_clients["Client management"]
  node_client_views["Client views<br/>[views.py]"]
  node_client_forms["Client forms<br/>[forms.py]"]
  node_client_pages["Client pages"]
  node_category_pages["Category pages"]
  node_signup_page["Signup page<br/>[signup.html]"]
end

subgraph group_sales["Sales management"]
  node_sales_views["Sales manager views<br/>[views.py]"]
  node_sales_forms["Sales manager forms<br/>[forms.py]"]
  node_sales_pages["Sales manager pages"]
end

subgraph group_platform["Persistence and services"]
  node_crm_models["CRM models<br/>[models.py]"]
  node_database_config["Database configuration<br/>[settings.py]"]
  node_postgres[("PostgreSQL")]
  node_django_auth["Django authentication"]
  node_mail["Django mail"]
end

node_user(("CRM user"))

node_user -->|"requests pages"| node_project_routes
node_project_routes -->|"includes clients"| node_client_routes
node_project_routes -->|"includes sales"| node_sales_routes
node_project_routes -->|"dispatches landing and signup"| node_client_views
node_client_routes -->|"dispatches client routes"| node_client_views
node_sales_routes -->|"dispatches sales routes"| node_sales_views
node_client_views -->|"validates input"| node_client_forms
node_client_views -->|"queries and saves"| node_crm_models
node_sales_views -->|"validates input"| node_sales_forms
node_sales_views -->|"queries and saves"| node_crm_models
node_client_views -->|"renders client pages"| node_client_pages
node_client_views -->|"renders category pages"| node_category_pages
node_client_views -->|"renders signup"| node_signup_page
node_sales_views -->|"renders manager pages"| node_sales_pages
node_client_views -->|"sends mail"| node_mail
node_sales_views -->|"sends invitations"| node_mail
node_project_routes -->|"routes account actions"| node_django_auth
node_database_config -->|"configures connection"| node_postgres
node_crm_models -->|"persists records"| node_postgres

click node_project_routes "https://github.com/shustrjak/simple_crm/blob/main/simplecrm/urls.py"
click node_client_routes "https://github.com/shustrjak/simple_crm/blob/main/clients/urls.py"
click node_sales_routes "https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/urls.py"
click node_client_views "https://github.com/shustrjak/simple_crm/blob/main/clients/views.py"
click node_client_forms "https://github.com/shustrjak/simple_crm/blob/main/clients/forms.py"
click node_client_pages "https://github.com/shustrjak/simple_crm/tree/main/clients/templates/clients"
click node_category_pages "https://github.com/shustrjak/simple_crm/tree/main/clients/templates/categories"
click node_signup_page "https://github.com/shustrjak/simple_crm/blob/main/templates/registration/signup.html"
click node_sales_views "https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/views.py"
click node_sales_forms "https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/forms.py"
click node_sales_pages "https://github.com/shustrjak/simple_crm/tree/main/salesmanagers/templates/salesmanagers"
click node_crm_models "https://github.com/shustrjak/simple_crm/blob/main/clients/models.py"
click node_database_config "https://github.com/shustrjak/simple_crm/blob/main/simplecrm/settings.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_project_routes,node_client_routes,node_sales_routes,node_user toneBlue
class node_client_views,node_client_forms,node_client_pages,node_category_pages,node_signup_page toneAmber
class node_sales_views,node_sales_forms,node_sales_pages toneMint
class node_crm_models,node_database_config,node_postgres,node_django_auth,node_mail toneRose
```

## Components

### Web entry

- [Project routes](https://github.com/shustrjak/simple_crm/blob/main/simplecrm/urls.py): `simplecrm/urls.py`
- [Client routes](https://github.com/shustrjak/simple_crm/blob/main/clients/urls.py): `clients/urls.py`
- [Sales routes](https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/urls.py): `salesmanagers/urls.py`

### Client management

- [Client views](https://github.com/shustrjak/simple_crm/blob/main/clients/views.py): `clients/views.py`
- [Client forms](https://github.com/shustrjak/simple_crm/blob/main/clients/forms.py): `clients/forms.py`
- [Client pages](https://github.com/shustrjak/simple_crm/tree/main/clients/templates/clients): `clients/templates/clients`
- [Category pages](https://github.com/shustrjak/simple_crm/tree/main/clients/templates/categories): `clients/templates/categories`
- [Signup page](https://github.com/shustrjak/simple_crm/blob/main/templates/registration/signup.html): `templates/registration/signup.html`

### Sales management

- [Sales manager views](https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/views.py): `salesmanagers/views.py`
- [Sales manager forms](https://github.com/shustrjak/simple_crm/blob/main/salesmanagers/forms.py): `salesmanagers/forms.py`
- [Sales manager pages](https://github.com/shustrjak/simple_crm/tree/main/salesmanagers/templates/salesmanagers): `salesmanagers/templates/salesmanagers`

### Persistence and services

- [CRM models](https://github.com/shustrjak/simple_crm/blob/main/clients/models.py): `clients/models.py`
- [Database configuration](https://github.com/shustrjak/simple_crm/blob/main/simplecrm/settings.py): `simplecrm/settings.py`
- **PostgreSQL**
- **Django authentication**
- **Django mail**

### Other components

- **CRM user**

## Connections

- CRM user → Project routes: requests pages
- Project routes → Client routes: includes clients
- Project routes → Sales routes: includes sales
- Project routes → Client views: dispatches landing and signup
- Client routes → Client views: dispatches client routes
- Sales routes → Sales manager views: dispatches sales routes
- Client views → Client forms: validates input
- Client views → CRM models: queries and saves
- Sales manager views → Sales manager forms: validates input
- Sales manager views → CRM models: queries and saves
- Client views → Client pages: renders client pages
- Client views → Category pages: renders category pages
- Client views → Signup page: renders signup
- Sales manager views → Sales manager pages: renders manager pages
- Client views → Django mail: sends mail
- Sales manager views → Django mail: sends invitations
- Project routes → Django authentication: routes account actions
- Database configuration → PostgreSQL: configures connection
- CRM models → PostgreSQL: persists records
