# priyanka-ch-dev/django-rest-crud-mixins-employee-student-product architecture

> Architecture diagram of the GitHub repository priyanka-ch-dev/django-rest-crud-mixins-employee-student-product, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product
- Repository: https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product

## Overview

This Django REST Framework project exposes CRUD APIs for employees, students, and products, each using a distinct DRF approach. Requests enter through the project URL configuration and are routed to app endpoints; views perform CRUD using each app’s model and serializer. Employee handling is manual, Student handling composes generic views with mixins, and Product handling uses predefined generic views. The excerpts do not show project-level URL wiring or database configuration, so those relationships are documented but not asserted as source-level calls.

Main entry points: [`p1/urls.py`](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/p1/urls.py) (Project routes), [`student/urls.py`](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/urls.py) (Student routes), [`product/urls.py`](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/urls.py) (Product routes), [`emp/views.py`](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/views.py) (Manual CRUD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["API routing"]
  node_project_routes["Project routes<br/>[urls.py]"]
  node_employee_routes["Employee routes<br/>[urls.py]"]
  node_student_routes["Student routes<br/>[urls.py]"]
  node_product_routes["Product routes<br/>[urls.py]"]
end

subgraph group_employee["Employee API"]
  node_employee_api["Manual CRUD<br/>[views.py]"]
  node_employee_serializer["Employee serializer<br/>[serializer.py]"]
  node_employee_model[("Employee record<br/>[models.py]")]
end

subgraph group_student["Student API"]
  node_student_collection["List and create<br/>[views.py]"]
  node_student_detail["Retrieve and modify<br/>[views.py]"]
  node_student_serializer["Student serializer<br/>[serializers.py]"]
  node_student_model[("Student record<br/>[models.py]")]
end

subgraph group_product["Product API"]
  node_product_collection["List and create<br/>[views.py]"]
  node_product_detail["Retrieve and modify<br/>[views.py]"]
  node_product_serializer["Product serializer<br/>[serializers.py]"]
  node_product_model[("Product record<br/>[models.py]")]
end

node_client(("API client"))
node_browsable_api["Browsable API"]
node_postman["Postman"]

node_client -.->|"sends request"| node_project_routes
node_project_routes -.->|"routes to"| node_employee_routes
node_project_routes -.->|"routes to"| node_student_routes
node_project_routes -.->|"routes to"| node_product_routes
node_employee_routes -->|"dispatches"| node_employee_api
node_student_routes -->|"dispatches"| node_student_collection
node_student_routes -->|"dispatches"| node_student_detail
node_product_routes -->|"dispatches"| node_product_collection
node_product_routes -->|"dispatches"| node_product_detail
node_employee_api -->|"validates data"| node_employee_serializer
node_employee_serializer -->|"serializes"| node_employee_model
node_employee_api -->|"queries and saves"| node_employee_model
node_student_collection -->|"uses serializer"| node_student_serializer
node_student_detail -->|"uses serializer"| node_student_serializer
node_student_serializer -->|"serializes"| node_student_model
node_student_collection -->|"queries"| node_student_model
node_student_detail -->|"queries"| node_student_model
node_product_collection -->|"uses serializer"| node_product_serializer
node_product_detail -->|"uses serializer"| node_product_serializer
node_product_serializer -->|"serializes"| node_product_model
node_product_collection -->|"queries"| node_product_model
node_product_detail -->|"queries"| node_product_model
node_browsable_api -.->|"serves interface"| node_client
node_postman -.->|"sends requests"| node_project_routes

click node_project_routes "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/p1/urls.py"
click node_employee_routes "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/urls.py"
click node_student_routes "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/urls.py"
click node_product_routes "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/urls.py"
click node_employee_api "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/views.py"
click node_employee_serializer "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/serializer.py"
click node_employee_model "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/models.py"
click node_student_collection "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/views.py"
click node_student_detail "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/views.py"
click node_student_serializer "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/serializers.py"
click node_student_model "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/models.py"
click node_product_collection "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/views.py"
click node_product_detail "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/views.py"
click node_product_serializer "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/serializers.py"
click node_product_model "https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/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_project_routes,node_employee_routes,node_student_routes,node_product_routes,node_client toneBlue
class node_employee_api,node_employee_serializer,node_employee_model toneAmber
class node_student_collection,node_student_detail,node_student_serializer,node_student_model,node_browsable_api toneMint
class node_product_collection,node_product_detail,node_product_serializer,node_product_model toneRose
class node_postman toneIndigo
```

## Components

### API routing

- [Project routes](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/p1/urls.py): `p1/urls.py`
- [Employee routes](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/urls.py): `emp/urls.py`
- [Student routes](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/urls.py): `student/urls.py`
- [Product routes](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/urls.py): `product/urls.py`

### Employee API

- [Manual CRUD](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/views.py): `emp/views.py`
- [Employee serializer](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/serializer.py): `emp/serializer.py`
- [Employee record](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/emp/models.py): `emp/models.py`

### Student API

- [List and create](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/views.py): `student/views.py`
- [Retrieve and modify](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/views.py): `student/views.py`
- [Student serializer](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/serializers.py): `student/serializers.py`
- [Student record](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/student/models.py): `student/models.py`

### Product API

- [List and create](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/views.py): `product/views.py`
- [Retrieve and modify](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/views.py): `product/views.py`
- [Product serializer](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/serializers.py): `product/serializers.py`
- [Product record](https://github.com/priyanka-ch-dev/django-rest-crud-mixins-employee-student-product/blob/main/product/models.py): `product/models.py`

### Other components

- **API client**
- **Browsable API**
- **Postman**

## Connections

- API client → Project routes: sends request
- Project routes → Employee routes: routes to (evidence: `README.md`)
- Project routes → Student routes: routes to (evidence: `README.md`)
- Project routes → Product routes: routes to (evidence: `README.md`)
- Employee routes → Manual CRUD: dispatches (evidence: `emp/urls.py`)
- Student routes → List and create: dispatches (evidence: `student/urls.py`)
- Student routes → Retrieve and modify: dispatches (evidence: `student/urls.py`)
- Product routes → List and create: dispatches (evidence: `product/urls.py`)
- Product routes → Retrieve and modify: dispatches (evidence: `product/urls.py`)
- Manual CRUD → Employee serializer: validates data (evidence: `emp/views.py`)
- Employee serializer → Employee record: serializes (evidence: `emp/serializer.py`)
- Manual CRUD → Employee record: queries and saves (evidence: `emp/views.py`)
- List and create → Student serializer: uses serializer (evidence: `student/views.py`)
- Retrieve and modify → Student serializer: uses serializer (evidence: `student/views.py`)
- Student serializer → Student record: serializes (evidence: `student/serializers.py`)
- List and create → Student record: queries (evidence: `student/views.py`)
- Retrieve and modify → Student record: queries (evidence: `student/views.py`)
- List and create → Product serializer: uses serializer (evidence: `product/views.py`)
- Retrieve and modify → Product serializer: uses serializer (evidence: `product/views.py`)
- Product serializer → Product record: serializes (evidence: `product/serializers.py`)
- List and create → Product record: queries (evidence: `product/views.py`)
- Retrieve and modify → Product record: queries (evidence: `product/views.py`)
- Browsable API → API client: serves interface (evidence: `README.md`)
- Postman → Project routes: sends requests (evidence: `README.md`)
