# dxrxxn/bsit3a-django-motor_assistant architecture

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

- Interactive diagram: https://gitdiagram.com/dxrxxn/bsit3a-django-motor_assistant
- Repository: https://github.com/dxrxxn/bsit3a-django-motor_assistant

## Overview

MOTOR_ASSISTANT is a Django application combining motorcycle troubleshooting and a PictureTo3D studio. Users can search diagnostic symptoms and receive troubleshooting guidance, or submit an image for 3D generation, mesh repair and validation, and export. Studio views orchestrate the processing components and track job progress; the AI worker launches the reconstruction runner as a subprocess. The excerpts and source index support these component links, but do not show URL routing or every internal processing call, so those details are omitted.

Main entry points: [`apps/studio/views.py`](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/views.py) (Studio jobs and API), [`apps/core/views.py`](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/core/views.py) (Assistant views), [`apps/motor/views.py`](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/views.py) (Motor views), [`apps/studio/ai_engine/worker.py`](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/ai_engine/worker.py) (AI worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_motorcycle["Motorcycle assistant"]
  node_core_views["Assistant views<br/>[views.py]"]
  node_motor_data[("Motorcycle data<br/>[models.py]")]
  node_motor_views["Motor views<br/>[views.py]"]
  node_image_reconstruction["Image reconstruction<br/>[reconstruct.py]"]
end

subgraph group_studio["3D studio"]
  node_studio_views["Studio jobs and API<br/>[views.py]"]
end

subgraph group_processing["3D processing"]
  node_ai_worker["AI worker<br/>[worker.py]"]
  node_triposr_runner["TripoSR runner<br/>[triposr_runner.py]"]
  node_mesh_loader["Mesh loader<br/>[loader.py]"]
  node_mesh_repair["Mesh repair<br/>[repair.py]"]
  node_mesh_validator["Mesh validation<br/>[validator.py]"]
  node_studio_schemas["Validation schemas<br/>[schemas.py]"]
  node_mesh_export["Mesh export<br/>[export.py]"]
end

subgraph group_storage["Job files"]
  node_job_files["Job files and history<br/>[views.py]"]
end

node_user(("User"))

node_user -.->|"requests"| node_core_views
node_core_views -->|"queries"| node_motor_data
node_user -.->|"requests"| node_motor_views
node_motor_views -->|"calls"| node_image_reconstruction
node_user -.->|"submits image"| node_studio_views
node_studio_views -->|"runs AI job"| node_ai_worker
node_ai_worker -->|"launches subprocess"| node_triposr_runner
node_studio_views -->|"loads mesh"| node_mesh_loader
node_studio_views -->|"repairs mesh"| node_mesh_repair
node_studio_views -->|"validates mesh"| node_mesh_validator
node_mesh_validator -->|"builds report"| node_studio_schemas
node_studio_views -->|"exports mesh"| node_mesh_export
node_studio_views -->|"tracks jobs"| node_job_files

click node_core_views "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/core/views.py"
click node_motor_data "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/models.py"
click node_motor_views "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/views.py"
click node_image_reconstruction "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/reconstruct.py"
click node_studio_views "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/views.py"
click node_job_files "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/views.py"
click node_ai_worker "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/ai_engine/worker.py"
click node_triposr_runner "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/ai_engine/triposr_runner.py"
click node_mesh_loader "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/mesh_processing/loader.py"
click node_mesh_repair "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/mesh_processing/repair.py"
click node_mesh_validator "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/mesh_processing/validator.py"
click node_studio_schemas "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/schemas.py"
click node_mesh_export "https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/exporters/export.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_core_views,node_motor_data,node_motor_views,node_image_reconstruction,node_user toneBlue
class node_studio_views toneAmber
class node_ai_worker,node_triposr_runner,node_mesh_loader,node_mesh_repair,node_mesh_validator,node_studio_schemas,node_mesh_export toneMint
class node_job_files toneRose
```

## Components

### Motorcycle assistant

- [Assistant views](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/core/views.py): `apps/core/views.py`
- [Motorcycle data](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/models.py): `apps/motor/models.py`
- [Motor views](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/views.py): `apps/motor/views.py`
- [Image reconstruction](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/motor/reconstruct.py): `apps/motor/reconstruct.py`

### 3D studio

- [Studio jobs and API](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/views.py): `apps/studio/views.py`

### 3D processing

- [AI worker](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/ai_engine/worker.py): `apps/studio/ai_engine/worker.py`
- [TripoSR runner](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/ai_engine/triposr_runner.py): `apps/studio/ai_engine/triposr_runner.py`
- [Mesh loader](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/mesh_processing/loader.py): `apps/studio/mesh_processing/loader.py`
- [Mesh repair](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/mesh_processing/repair.py): `apps/studio/mesh_processing/repair.py`
- [Mesh validation](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/mesh_processing/validator.py): `apps/studio/mesh_processing/validator.py`
- [Validation schemas](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/schemas.py): `apps/studio/schemas.py`
- [Mesh export](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/exporters/export.py): `apps/studio/exporters/export.py`

### Job files

- [Job files and history](https://github.com/dxrxxn/bsit3a-django-motor_assistant/blob/main/apps/studio/views.py): `apps/studio/views.py`

### Other components

- **User**

## Connections

- User → Assistant views: requests
- Assistant views → Motorcycle data: queries (evidence: `apps/core/views.py`)
- User → Motor views: requests
- Motor views → Image reconstruction: calls (evidence: `apps/motor/views.py`)
- User → Studio jobs and API: submits image
- Studio jobs and API → AI worker: runs AI job (evidence: `apps/studio/views.py`)
- AI worker → TripoSR runner: launches subprocess (evidence: `apps/studio/ai_engine/worker.py`)
- Studio jobs and API → Mesh loader: loads mesh (evidence: `apps/studio/views.py`)
- Studio jobs and API → Mesh repair: repairs mesh (evidence: `apps/studio/views.py`)
- Studio jobs and API → Mesh validation: validates mesh (evidence: `apps/studio/views.py`)
- Mesh validation → Validation schemas: builds report (evidence: `apps/studio/mesh_processing/validator.py`)
- Studio jobs and API → Mesh export: exports mesh (evidence: `apps/studio/views.py`)
- Studio jobs and API → Job files and history: tracks jobs (evidence: `apps/studio/views.py`)
