# soham-darak/codegrowth-ai architecture

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

- Interactive diagram: https://gitdiagram.com/soham-darak/codegrowth-ai
- Repository: https://github.com/soham-darak/codegrowth-ai

## Overview

CodeGrowth AI combines a repository-analysis engine, learning-platform backends, and a Next.js interface. The main workflow is a student submission (code or repository URL), assignment evaluation by the AI engine, and saved evaluation results; separate platform capabilities cover courses, assignments, goals, authentication, and educator administration. The tree and README document the AI agent stages, but sampled AI source is incomplete, so internal agent-to-agent links are limited to those documented. The second Spring backend appears to provide competency and growth tracking; its relationship to the primary backend is not established.

Main entry points: [`frontend/app/api/backend/[...path]/route.js`](https://github.com/soham-darak/codegrowth-ai/blob/main/frontend/app/api/backend/%5B...path%5D/route.js) (Backend proxy), [`ai-engine/app/agents/orchestrator_agent.py`](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/orchestrator_agent.py) (Agent orchestration), [`backend/src/main/java/com/codegrowth/backend/api/AuthController.java`](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/AuthController.java) (Auth and OAuth API), [`backend/src/main/java/com/codegrowth/backend/api/StudentController.java`](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/StudentController.java) (Student API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_web["Role dashboards"]
  node_proxy["Backend proxy<br/>[route.js]"]
end

subgraph group_platform["Platform backend"]
  node_authapi["Auth and OAuth API"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_oauth["OAuth login<br/>[OAuthService.java]"]
  node_studentapi["Student API"]
  node_teacherapi["Teacher API"]
  node_adminapi["Admin API"]
  node_learning["Learning records"]
  node_submission["Submission evaluation"]
  node_aiadapter["AI service adapter<br/>[AiService.java]"]
  node_user[("Learner account<br/>[AppUser.java]")]
  node_platformstore[("Platform records")]
end

subgraph group_ai["AI analysis"]
  node_engineapi["AI HTTP API<br/>[main.py]"]
  node_orchestrator["Agent orchestration"]
  node_repoagent["Repository agent"]
  node_github["GitHub fetch<br/>[github_service.py]"]
  node_analysisagent["Code analysis agent"]
  node_analysis["Static analysis"]
  node_evidence["Evidence validation"]
  node_evaluationagent["Assignment evaluation"]
  node_llm["Local LLM runtime<br/>[llm_runtime.py]"]
end

subgraph group_competency["Competency backend"]
  node_competencyapi["Competency APIs"]
  node_competencysvc["Assessment service"]
  node_skillprofile["Skill growth profiles"]
  node_enrollment["Course enrollment"]
  node_competencystore[("Competency records")]
end

node_learner(("Student / teacher"))
node_ollama["Ollama model"]
node_githubservice["GitHub"]

node_learner -->|"uses"| node_web
node_web -->|"requests"| node_proxy
node_proxy -->|"forwards"| node_authapi
node_proxy -->|"forwards"| node_studentapi
node_proxy -->|"forwards"| node_teacherapi
node_proxy -->|"forwards"| node_adminapi
node_authapi -->|"calls"| node_auth
node_auth -->|"reads/writes"| node_user
node_authapi -.->|"calls"| node_oauth
node_oauth -.->|"creates/updates"| node_user
node_studentapi -->|"reads/writes"| node_platformstore
node_studentapi -->|"starts evaluation"| node_submission
node_submission -->|"evaluates submission"| node_aiadapter
node_aiadapter -->|"HTTP request"| node_engineapi
node_engineapi -->|"dispatches"| node_orchestrator
node_orchestrator -->|"routes repository task"| node_repoagent
node_repoagent -->|"fetches source"| node_github
node_github -->|"API access"| node_githubservice
node_orchestrator -->|"routes analysis task"| node_analysisagent
node_analysisagent -->|"analyzes code"| node_analysis
node_analysisagent -->|"requests inference"| node_llm
node_orchestrator -->|"routes evaluation task"| node_evaluationagent
node_evaluationagent -->|"checks evidence"| node_evidence
node_evaluationagent -->|"requests inference"| node_llm
node_llm -->|"inference request"| node_ollama
node_aiadapter -->|"saves evaluation"| node_platformstore
node_competencyapi -->|"calls"| node_competencysvc
node_competencysvc -->|"reads/writes"| node_competencystore
node_skillprofile -->|"reads assessment"| node_competencystore
node_enrollment -.->|"not applicable"| node_competencystore

click node_web "https://github.com/soham-darak/codegrowth-ai/tree/main/frontend/app"
click node_proxy "https://github.com/soham-darak/codegrowth-ai/blob/main/frontend/app/api/backend/%5B...path%5D/route.js"
click node_authapi "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/AuthController.java"
click node_auth "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/AuthService.java"
click node_oauth "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/OAuthService.java"
click node_studentapi "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/StudentController.java"
click node_teacherapi "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/TeacherController.java"
click node_adminapi "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/AdminController.java"
click node_learning "https://github.com/soham-darak/codegrowth-ai/tree/main/backend/src/main/java/com/codegrowth/backend/entity"
click node_submission "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/AiEvaluationService.java"
click node_aiadapter "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/AiService.java"
click node_engineapi "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/main.py"
click node_orchestrator "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/orchestrator_agent.py"
click node_repoagent "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/repository_agent.py"
click node_github "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/github_service.py"
click node_analysisagent "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/code_analysis_agent.py"
click node_analysis "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/code_analysis_service.py"
click node_evidence "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/evidence_validator.py"
click node_evaluationagent "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/evaluation_agent.py"
click node_llm "https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/llm_runtime.py"
click node_competencyapi "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/controller/CompetencyAssessmentController.java"
click node_competencysvc "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/service/CompetencyAssessmentService.java"
click node_skillprofile "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/service/StudentSkillProfileService.java"
click node_enrollment "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/service/EnrollmentService.java"
click node_competencystore "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/repository/CompetencyAssessmentRepository.java"
click node_user "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/entity/AppUser.java"
click node_platformstore "https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/repository/SubmissionRepository.java"

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_web,node_proxy toneBlue
class node_authapi,node_auth,node_oauth,node_studentapi,node_teacherapi,node_adminapi,node_learning,node_submission,node_aiadapter,node_user,node_platformstore toneAmber
class node_engineapi,node_orchestrator,node_repoagent,node_github,node_analysisagent,node_analysis,node_evidence,node_evaluationagent,node_llm toneMint
class node_competencyapi,node_competencysvc,node_skillprofile,node_enrollment,node_competencystore toneRose
class node_learner,node_ollama,node_githubservice toneIndigo
```

## Components

### Web interface

- [Role dashboards](https://github.com/soham-darak/codegrowth-ai/tree/main/frontend/app): `frontend/app`
- [Backend proxy](https://github.com/soham-darak/codegrowth-ai/blob/main/frontend/app/api/backend/%5B...path%5D/route.js): `frontend/app/api/backend/[...path]/route.js`

### Platform backend

- [Auth and OAuth API](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/AuthController.java): `backend/src/main/java/com/codegrowth/backend/api/AuthController.java`
- [Authentication](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/AuthService.java): `backend/src/main/java/com/codegrowth/backend/service/AuthService.java`
- [OAuth login](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/OAuthService.java): `backend/src/main/java/com/codegrowth/backend/service/OAuthService.java`
- [Student API](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/StudentController.java): `backend/src/main/java/com/codegrowth/backend/api/StudentController.java`
- [Teacher API](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/TeacherController.java): `backend/src/main/java/com/codegrowth/backend/api/TeacherController.java`
- [Admin API](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/api/AdminController.java): `backend/src/main/java/com/codegrowth/backend/api/AdminController.java`
- [Learning records](https://github.com/soham-darak/codegrowth-ai/tree/main/backend/src/main/java/com/codegrowth/backend/entity): `backend/src/main/java/com/codegrowth/backend/entity`
- [Submission evaluation](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/AiEvaluationService.java): `backend/src/main/java/com/codegrowth/backend/service/AiEvaluationService.java`
- [AI service adapter](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/service/AiService.java): `backend/src/main/java/com/codegrowth/backend/service/AiService.java`
- [Learner account](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/entity/AppUser.java): `backend/src/main/java/com/codegrowth/backend/entity/AppUser.java`
- [Platform records](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/src/main/java/com/codegrowth/backend/repository/SubmissionRepository.java): `backend/src/main/java/com/codegrowth/backend/repository/SubmissionRepository.java`

### AI analysis

- [AI HTTP API](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/main.py): `ai-engine/app/main.py`
- [Agent orchestration](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/orchestrator_agent.py): `ai-engine/app/agents/orchestrator_agent.py`
- [Repository agent](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/repository_agent.py): `ai-engine/app/agents/repository_agent.py`
- [GitHub fetch](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/github_service.py): `ai-engine/app/services/github_service.py`
- [Code analysis agent](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/code_analysis_agent.py): `ai-engine/app/agents/code_analysis_agent.py`
- [Static analysis](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/code_analysis_service.py): `ai-engine/app/services/code_analysis_service.py`
- [Evidence validation](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/evidence_validator.py): `ai-engine/app/services/evidence_validator.py`
- [Assignment evaluation](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/agents/evaluation_agent.py): `ai-engine/app/agents/evaluation_agent.py`
- [Local LLM runtime](https://github.com/soham-darak/codegrowth-ai/blob/main/ai-engine/app/services/llm_runtime.py): `ai-engine/app/services/llm_runtime.py`

### Competency backend

- [Competency APIs](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/controller/CompetencyAssessmentController.java): `backend/codegrowth-backend/src/main/java/com/codegrowth/controller/CompetencyAssessmentController.java`
- [Assessment service](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/service/CompetencyAssessmentService.java): `backend/codegrowth-backend/src/main/java/com/codegrowth/service/CompetencyAssessmentService.java`
- [Skill growth profiles](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/service/StudentSkillProfileService.java): `backend/codegrowth-backend/src/main/java/com/codegrowth/service/StudentSkillProfileService.java`
- [Course enrollment](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/service/EnrollmentService.java): `backend/codegrowth-backend/src/main/java/com/codegrowth/service/EnrollmentService.java`
- [Competency records](https://github.com/soham-darak/codegrowth-ai/blob/main/backend/codegrowth-backend/src/main/java/com/codegrowth/repository/CompetencyAssessmentRepository.java): `backend/codegrowth-backend/src/main/java/com/codegrowth/repository/CompetencyAssessmentRepository.java`

### Other components

- **Student / teacher**
- **Ollama model**
- **GitHub**

## Connections

- Student / teacher → Role dashboards: uses
- Role dashboards → Backend proxy: requests
- Backend proxy → Auth and OAuth API: forwards
- Backend proxy → Student API: forwards
- Backend proxy → Teacher API: forwards
- Backend proxy → Admin API: forwards
- Auth and OAuth API → Authentication: calls
- Authentication → Learner account: reads/writes
- Auth and OAuth API → OAuth login: calls
- OAuth login → Learner account: creates/updates
- Student API → Platform records: reads/writes
- Student API → Submission evaluation: starts evaluation
- Submission evaluation → AI service adapter: evaluates submission
- AI service adapter → AI HTTP API: HTTP request
- AI HTTP API → Agent orchestration: dispatches
- Agent orchestration → Repository agent: routes repository task
- Repository agent → GitHub fetch: fetches source
- GitHub fetch → GitHub: API access
- Agent orchestration → Code analysis agent: routes analysis task
- Code analysis agent → Static analysis: analyzes code
- Code analysis agent → Local LLM runtime: requests inference
- Agent orchestration → Assignment evaluation: routes evaluation task
- Assignment evaluation → Evidence validation: checks evidence
- Assignment evaluation → Local LLM runtime: requests inference
- Local LLM runtime → Ollama model: inference request
- AI service adapter → Platform records: saves evaluation
- Competency APIs → Assessment service: calls
- Assessment service → Competency records: reads/writes
- Skill growth profiles → Competency records: reads assessment
- Course enrollment → Competency records: not applicable
