# sahilgoyal231/interarena architecture

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

- Interactive diagram: https://gitdiagram.com/sahilgoyal231/interarena
- Repository: https://github.com/sahilgoyal231/interarena

## Overview

InterArena is a student mock-assessment platform: students enter through the landing page or dashboard, choose a practice or mock-assessment module, answer timed questions or work in a code editor, and review results. Its runtime spans learning modules, assessment execution, question and session APIs, and persistence. The README documents several capabilities whose route implementations were not sampled; those branches are shown at their exact tree paths, while links without visible call evidence are omitted. PostgreSQL and Clerk are documented integrations.

Main entry points: [`src/app/home/page.tsx`](https://github.com/sahilgoyal231/interarena/blob/main/src/app/home/page.tsx) (Student dashboard), [`src/lib/prisma.ts`](https://github.com/sahilgoyal231/interarena/blob/main/src/lib/prisma.ts) (Prisma client), [`src/components/assessment/AssessmentContext.tsx`](https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentContext.tsx) (Assessment state), [`src/components/assessment/AssessmentRunner.tsx`](https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentRunner.tsx) (Assessment runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and navigation"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_dashboard["Student dashboard<br/>[page.tsx]"]
end

subgraph group_practice["Practice modules"]
  node_coding["Coding practice<br/>[page.tsx]"]
  node_guess["Output prediction<br/>[page.tsx]"]
  node_aptitude["Aptitude practice"]
  node_verbal["Verbal practice"]
  node_design["System design"]
  node_prompt["Prompt engineering"]
  node_genai["Generative AI"]
  node_techsuites["Technical suites"]
end

subgraph group_assessment["Assessment experience"]
  node_runner["Assessment runner"]
  node_context["Assessment state"]
  node_questionpane["Question interaction"]
  node_codeenv["Assessment code editor"]
  node_review["Question review"]
  node_runnerui["Assessment UI components"]
end

subgraph group_services["Assessment services"]
  node_moagenerate["MOA generation<br/>[route.ts]"]
  node_moasection["MOA sections<br/>[route.ts]"]
  node_questions["Question API<br/>[route.ts]"]
  node_sessions["Session recording<br/>[route.ts]"]
  node_execute["Code execution API<br/>[route.ts]"]
end

subgraph group_shared["Shared runtime"]
  node_evaluator["Code driver generation<br/>[code-evaluator.ts]"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_database[("PostgreSQL")]
  node_clerk["Clerk identity"]
end

node_student(("Student"))

node_student -->|"opens"| node_landing
node_student -->|"opens"| node_dashboard
node_dashboard -->|"offers practice"| node_coding
node_dashboard -->|"offers practice"| node_aptitude
node_dashboard -->|"offers practice"| node_verbal
node_dashboard -->|"offers module"| node_design
node_dashboard -->|"offers module"| node_prompt
node_dashboard -->|"offers module"| node_genai
node_dashboard -->|"offers module"| node_techsuites
node_student -->|"practices"| node_guess
node_student -->|"takes assessment"| node_runner
node_runner -->|"uses state"| node_context
node_runner -->|"renders questions"| node_questionpane
node_runner -->|"renders review"| node_review
node_questionpane -->|"reads and updates"| node_context
node_questionpane -->|"renders coding"| node_codeenv
node_context -->|"fetches assessment"| node_moagenerate
node_context -->|"fetches section"| node_moasection
node_context -->|"records attempt"| node_sessions
node_coding -->|"runs code"| node_execute
node_execute -->|"generates drivers"| node_evaluator
node_questions -->|"reads and writes"| node_prisma
node_moagenerate -->|"fetches questions"| node_prisma
node_moasection -->|"fetches questions"| node_prisma
node_sessions -->|"records session"| node_prisma
node_execute -->|"loads question"| node_prisma
node_prisma -->|"connects"| node_database
node_execute -->|"authenticates"| node_clerk
node_runnerui -.->|"supports interaction"| node_questionpane

click node_landing "https://github.com/sahilgoyal231/interarena/blob/main/src/app/page.tsx"
click node_dashboard "https://github.com/sahilgoyal231/interarena/blob/main/src/app/home/page.tsx"
click node_coding "https://github.com/sahilgoyal231/interarena/blob/main/src/app/coding/debug/page.tsx"
click node_guess "https://github.com/sahilgoyal231/interarena/blob/main/src/app/coding/guess/page.tsx"
click node_aptitude "https://github.com/sahilgoyal231/interarena/tree/main/src/app/aptitude"
click node_verbal "https://github.com/sahilgoyal231/interarena/tree/main/src/app/verbal"
click node_design "https://github.com/sahilgoyal231/interarena/tree/main/src/app/design"
click node_prompt "https://github.com/sahilgoyal231/interarena/tree/main/src/app/prompt"
click node_genai "https://github.com/sahilgoyal231/interarena/tree/main/src/app/genai"
click node_techsuites "https://github.com/sahilgoyal231/interarena/tree/main/src/app/tech-suites"
click node_runner "https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentRunner.tsx"
click node_context "https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentContext.tsx"
click node_questionpane "https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/ActiveQuestionPane.tsx"
click node_codeenv "https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentCodeEnvironment.tsx"
click node_review "https://github.com/sahilgoyal231/interarena/blob/main/src/components/ui/QuestionReviewCard.tsx"
click node_moagenerate "https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/moa/generate/route.ts"
click node_moasection "https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/moa/section/route.ts"
click node_questions "https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/questions/route.ts"
click node_sessions "https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/sessions/record/route.ts"
click node_execute "https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/execute/route.ts"
click node_evaluator "https://github.com/sahilgoyal231/interarena/blob/main/src/lib/code-evaluator.ts"
click node_prisma "https://github.com/sahilgoyal231/interarena/blob/main/src/lib/prisma.ts"
click node_runnerui "https://github.com/sahilgoyal231/interarena/tree/main/src/components/assessment"

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_landing,node_dashboard toneBlue
class node_coding,node_guess,node_aptitude,node_verbal,node_design,node_prompt,node_genai,node_techsuites toneAmber
class node_runner,node_context,node_questionpane,node_codeenv,node_review,node_runnerui toneMint
class node_moagenerate,node_moasection,node_questions,node_sessions,node_execute toneRose
class node_evaluator,node_prisma,node_database,node_clerk,node_student toneIndigo
```

## Components

### Entry and navigation

- [Landing page](https://github.com/sahilgoyal231/interarena/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Student dashboard](https://github.com/sahilgoyal231/interarena/blob/main/src/app/home/page.tsx): `src/app/home/page.tsx`

### Practice modules

- [Coding practice](https://github.com/sahilgoyal231/interarena/blob/main/src/app/coding/debug/page.tsx): `src/app/coding/debug/page.tsx`
- [Output prediction](https://github.com/sahilgoyal231/interarena/blob/main/src/app/coding/guess/page.tsx): `src/app/coding/guess/page.tsx`
- [Aptitude practice](https://github.com/sahilgoyal231/interarena/tree/main/src/app/aptitude): `src/app/aptitude`
- [Verbal practice](https://github.com/sahilgoyal231/interarena/tree/main/src/app/verbal): `src/app/verbal`
- [System design](https://github.com/sahilgoyal231/interarena/tree/main/src/app/design): `src/app/design`
- [Prompt engineering](https://github.com/sahilgoyal231/interarena/tree/main/src/app/prompt): `src/app/prompt`
- [Generative AI](https://github.com/sahilgoyal231/interarena/tree/main/src/app/genai): `src/app/genai`
- [Technical suites](https://github.com/sahilgoyal231/interarena/tree/main/src/app/tech-suites): `src/app/tech-suites`

### Assessment experience

- [Assessment runner](https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentRunner.tsx): `src/components/assessment/AssessmentRunner.tsx`
- [Assessment state](https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentContext.tsx): `src/components/assessment/AssessmentContext.tsx`
- [Question interaction](https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/ActiveQuestionPane.tsx): `src/components/assessment/ActiveQuestionPane.tsx`
- [Assessment code editor](https://github.com/sahilgoyal231/interarena/blob/main/src/components/assessment/AssessmentCodeEnvironment.tsx): `src/components/assessment/AssessmentCodeEnvironment.tsx`
- [Question review](https://github.com/sahilgoyal231/interarena/blob/main/src/components/ui/QuestionReviewCard.tsx): `src/components/ui/QuestionReviewCard.tsx`
- [Assessment UI components](https://github.com/sahilgoyal231/interarena/tree/main/src/components/assessment): `src/components/assessment`

### Assessment services

- [MOA generation](https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/moa/generate/route.ts): `src/app/api/moa/generate/route.ts`
- [MOA sections](https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/moa/section/route.ts): `src/app/api/moa/section/route.ts`
- [Question API](https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/questions/route.ts): `src/app/api/questions/route.ts`
- [Session recording](https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/sessions/record/route.ts): `src/app/api/sessions/record/route.ts`
- [Code execution API](https://github.com/sahilgoyal231/interarena/blob/main/src/app/api/execute/route.ts): `src/app/api/execute/route.ts`

### Shared runtime

- [Code driver generation](https://github.com/sahilgoyal231/interarena/blob/main/src/lib/code-evaluator.ts): `src/lib/code-evaluator.ts`
- [Prisma client](https://github.com/sahilgoyal231/interarena/blob/main/src/lib/prisma.ts): `src/lib/prisma.ts`
- **PostgreSQL**
- **Clerk identity**

### Other components

- **Student**

## Connections

- Student → Landing page: opens (evidence: `README.md`)
- Student → Student dashboard: opens (evidence: `README.md`)
- Student dashboard → Coding practice: offers practice (evidence: `src/app/home/page.tsx`)
- Student dashboard → Aptitude practice: offers practice (evidence: `README.md`)
- Student dashboard → Verbal practice: offers practice (evidence: `src/app/home/page.tsx`)
- Student dashboard → System design: offers module (evidence: `src/app/home/page.tsx`)
- Student dashboard → Prompt engineering: offers module (evidence: `README.md`)
- Student dashboard → Generative AI: offers module (evidence: `README.md`)
- Student dashboard → Technical suites: offers module (evidence: `src/app/home/page.tsx`)
- Student → Output prediction: practices (evidence: `README.md`)
- Student → Assessment runner: takes assessment (evidence: `README.md`)
- Assessment runner → Assessment state: uses state (evidence: `src/components/assessment/AssessmentRunner.tsx`)
- Assessment runner → Question interaction: renders questions (evidence: `src/components/assessment/AssessmentRunner.tsx`)
- Assessment runner → Question review: renders review (evidence: `src/components/assessment/AssessmentRunner.tsx`)
- Question interaction → Assessment state: reads and updates (evidence: `src/components/assessment/ActiveQuestionPane.tsx`)
- Question interaction → Assessment code editor: renders coding (evidence: `src/components/assessment/ActiveQuestionPane.tsx`)
- Assessment state → MOA generation: fetches assessment (evidence: `src/components/assessment/AssessmentContext.tsx`)
- Assessment state → MOA sections: fetches section (evidence: `src/components/assessment/AssessmentContext.tsx`)
- Assessment state → Session recording: records attempt (evidence: `src/components/assessment/AssessmentContext.tsx`)
- Coding practice → Code execution API: runs code (evidence: `README.md`)
- Code execution API → Code driver generation: generates drivers (evidence: `src/app/api/execute/route.ts`)
- Question API → Prisma client: reads and writes (evidence: `src/app/api/questions/route.ts`)
- MOA generation → Prisma client: fetches questions (evidence: `src/app/api/moa/generate/route.ts`)
- MOA sections → Prisma client: fetches questions (evidence: `src/app/api/moa/section/route.ts`)
- Session recording → Prisma client: records session (evidence: `src/app/api/sessions/record/route.ts`)
- Code execution API → Prisma client: loads question (evidence: `src/app/api/execute/route.ts`)
- Prisma client → PostgreSQL: connects (evidence: `README.md`)
- Code execution API → Clerk identity: authenticates (evidence: `src/app/api/execute/route.ts`)
- Assessment UI components → Question interaction: supports interaction (evidence: `src/components/assessment/ActiveQuestionPane.tsx`)
