# karthim8/django_project architecture

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

- Interactive diagram: https://gitdiagram.com/karthim8/django_project
- Repository: https://github.com/karthim8/django_project

## Overview

NexusLink is a Django student community and developer-skills platform. Users create and verify accounts, connect GitHub for an asynchronous profile evaluation, and use community features such as study rooms, messaging, resources, and announcements; a separate coding-challenge workflow submits code for judging and leaderboard updates. The graph also shows the app’s websocket routing layer. The README is empty, so feature coverage comes from the sampled source and source index; several app capabilities are represented at their shared view/model layer because their individual implementations were not sampled.

Main entry points: [`accounts/tasks.py`](https://github.com/karthim8/django_project/blob/master/accounts/tasks.py) (GitHub Evaluation), [`coding_challenge/views.py`](https://github.com/karthim8/django_project/blob/master/coding_challenge/views.py) (Problem and Submission Flow), [`accounts/views.py`](https://github.com/karthim8/django_project/blob/master/accounts/views.py) (Signup and Verification), [`coding_challenge/judge0.py`](https://github.com/karthim8/django_project/blob/master/coding_challenge/judge0.py) (Code Judge Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and Evaluation"]
  node_account_views["Signup and Verification<br/>[views.py]"]
  node_account_models[("Profiles and Scores<br/>[models.py]")]
  node_account_signals["Evaluation Triggers<br/>[signals.py]"]
  node_evaluation_task["GitHub Evaluation<br/>[tasks.py]"]
end

subgraph group_community["Student Community"]
  node_community_views["Community Features<br/>[views.py]"]
  node_community_models[("Community Data<br/>[models.py]")]
end

subgraph group_challenges["Coding Challenges"]
  node_challenge_views["Problem and Submission Flow<br/>[views.py]"]
  node_challenge_models[("Problems and Submissions<br/>[models.py]")]
  node_judge["Code Judge Client<br/>[judge0.py]"]
end

subgraph group_realtime["Realtime Delivery"]
  node_chat_consumer["Chat and Room Sockets<br/>[consumers.py]"]
  node_app_socket_routes["Community Socket Routes<br/>[routing.py]"]
  node_challenge_consumer["Challenge Leaderboard Socket<br/>[consumers.py]"]
  node_challenge_socket_routes["Challenge Socket Route<br/>[routing.py]"]
  node_asgi["ASGI Socket Assembly<br/>[asgi.py]"]
end

node_user(("Student"))
node_github{{"GitHub API"}}
node_gemini{{"Gemini AI"}}
node_otp_store[("Upstash OTP Store")]
node_email_service{{"Brevo Email"}}
node_judge0{{"Judge0 Service"}}

node_user -->|"signs up"| node_account_views
node_account_views -->|"stores/checks OTP"| node_otp_store
node_account_views -->|"sends verification"| node_email_service
node_account_signals -->|"creates profile"| node_account_models
node_account_signals -->|"queues evaluation"| node_evaluation_task
node_evaluation_task -->|"updates scores"| node_account_models
node_evaluation_task -->|"fetches activity"| node_github
node_evaluation_task -->|"requests analysis"| node_gemini
node_user -->|"uses community"| node_community_views
node_community_views -->|"reads and writes"| node_community_models
node_chat_consumer -->|"uses chat data"| node_community_models
node_app_socket_routes -->|"routes sockets"| node_chat_consumer
node_user -->|"submits code"| node_challenge_views
node_challenge_views -->|"stores and reads"| node_challenge_models
node_challenge_views -->|"judges submission"| node_judge
node_judge -->|"updates result"| node_challenge_models
node_judge -->|"runs test cases"| node_judge0
node_challenge_views -.->|"broadcasts leaderboard"| node_challenge_consumer
node_challenge_socket_routes -->|"routes sockets"| node_challenge_consumer
node_asgi -->|"assembles routes"| node_app_socket_routes
node_asgi -->|"assembles routes"| node_challenge_socket_routes

click node_account_views "https://github.com/karthim8/django_project/blob/master/accounts/views.py"
click node_account_models "https://github.com/karthim8/django_project/blob/master/accounts/models.py"
click node_account_signals "https://github.com/karthim8/django_project/blob/master/accounts/signals.py"
click node_evaluation_task "https://github.com/karthim8/django_project/blob/master/accounts/tasks.py"
click node_community_views "https://github.com/karthim8/django_project/blob/master/appname/views.py"
click node_community_models "https://github.com/karthim8/django_project/blob/master/appname/models.py"
click node_chat_consumer "https://github.com/karthim8/django_project/blob/master/appname/consumers.py"
click node_app_socket_routes "https://github.com/karthim8/django_project/blob/master/appname/routing.py"
click node_challenge_views "https://github.com/karthim8/django_project/blob/master/coding_challenge/views.py"
click node_challenge_models "https://github.com/karthim8/django_project/blob/master/coding_challenge/models.py"
click node_judge "https://github.com/karthim8/django_project/blob/master/coding_challenge/judge0.py"
click node_challenge_consumer "https://github.com/karthim8/django_project/blob/master/coding_challenge/consumers.py"
click node_challenge_socket_routes "https://github.com/karthim8/django_project/blob/master/coding_challenge/routing.py"
click node_asgi "https://github.com/karthim8/django_project/blob/master/project1/asgi.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_account_views,node_account_models,node_account_signals,node_evaluation_task toneBlue
class node_community_views,node_community_models,node_otp_store toneAmber
class node_challenge_views,node_challenge_models,node_judge,node_github toneMint
class node_chat_consumer,node_app_socket_routes,node_challenge_consumer,node_challenge_socket_routes,node_asgi toneRose
class node_user,node_gemini,node_email_service,node_judge0 toneIndigo
```

## Components

### Accounts and Evaluation

- [Signup and Verification](https://github.com/karthim8/django_project/blob/master/accounts/views.py): `accounts/views.py`
- [Profiles and Scores](https://github.com/karthim8/django_project/blob/master/accounts/models.py): `accounts/models.py`
- [Evaluation Triggers](https://github.com/karthim8/django_project/blob/master/accounts/signals.py): `accounts/signals.py`
- [GitHub Evaluation](https://github.com/karthim8/django_project/blob/master/accounts/tasks.py): `accounts/tasks.py`

### Student Community

- [Community Features](https://github.com/karthim8/django_project/blob/master/appname/views.py): `appname/views.py`
- [Community Data](https://github.com/karthim8/django_project/blob/master/appname/models.py): `appname/models.py`

### Coding Challenges

- [Problem and Submission Flow](https://github.com/karthim8/django_project/blob/master/coding_challenge/views.py): `coding_challenge/views.py`
- [Problems and Submissions](https://github.com/karthim8/django_project/blob/master/coding_challenge/models.py): `coding_challenge/models.py`
- [Code Judge Client](https://github.com/karthim8/django_project/blob/master/coding_challenge/judge0.py): `coding_challenge/judge0.py`

### Realtime Delivery

- [Chat and Room Sockets](https://github.com/karthim8/django_project/blob/master/appname/consumers.py): `appname/consumers.py`
- [Community Socket Routes](https://github.com/karthim8/django_project/blob/master/appname/routing.py): `appname/routing.py`
- [Challenge Leaderboard Socket](https://github.com/karthim8/django_project/blob/master/coding_challenge/consumers.py): `coding_challenge/consumers.py`
- [Challenge Socket Route](https://github.com/karthim8/django_project/blob/master/coding_challenge/routing.py): `coding_challenge/routing.py`
- [ASGI Socket Assembly](https://github.com/karthim8/django_project/blob/master/project1/asgi.py): `project1/asgi.py`

### Other components

- **Student**
- **GitHub API**
- **Gemini AI**
- **Upstash OTP Store**
- **Brevo Email**
- **Judge0 Service**

## Connections

- Student → Signup and Verification: signs up (evidence: `accounts/views.py`)
- Signup and Verification → Upstash OTP Store: stores/checks OTP (evidence: `accounts/views.py`)
- Signup and Verification → Brevo Email: sends verification (evidence: `accounts/views.py`)
- Evaluation Triggers → Profiles and Scores: creates profile (evidence: `accounts/signals.py`)
- Evaluation Triggers → GitHub Evaluation: queues evaluation (evidence: `accounts/signals.py`)
- GitHub Evaluation → Profiles and Scores: updates scores (evidence: `accounts/tasks.py`)
- GitHub Evaluation → GitHub API: fetches activity (evidence: `accounts/tasks.py`)
- GitHub Evaluation → Gemini AI: requests analysis (evidence: `accounts/tasks.py`)
- Student → Community Features: uses community (evidence: `appname/views.py`)
- Community Features → Community Data: reads and writes (evidence: `appname/views.py`)
- Chat and Room Sockets → Community Data: uses chat data (evidence: `appname/consumers.py`)
- Community Socket Routes → Chat and Room Sockets: routes sockets (evidence: `appname/routing.py`)
- Student → Problem and Submission Flow: submits code (evidence: `coding_challenge/views.py`)
- Problem and Submission Flow → Problems and Submissions: stores and reads (evidence: `coding_challenge/views.py`)
- Problem and Submission Flow → Code Judge Client: judges submission (evidence: `coding_challenge/views.py`)
- Code Judge Client → Problems and Submissions: updates result (evidence: `coding_challenge/judge0.py`)
- Code Judge Client → Judge0 Service: runs test cases (evidence: `coding_challenge/judge0.py`)
- Problem and Submission Flow → Challenge Leaderboard Socket: broadcasts leaderboard (evidence: `coding_challenge/consumers.py`)
- Challenge Socket Route → Challenge Leaderboard Socket: routes sockets (evidence: `coding_challenge/routing.py`)
- ASGI Socket Assembly → Community Socket Routes: assembles routes (evidence: `project1/asgi.py`)
- ASGI Socket Assembly → Challenge Socket Route: assembles routes (evidence: `project1/asgi.py`)
