# anamelyilma/keepmycoding architecture

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

- Interactive diagram: https://gitdiagram.com/anamelyilma/keepmycoding
- Repository: https://github.com/anamelyilma/keepmycoding

## Overview

KeepCoding is a deliberate coding-practice web app: developers calibrate or create a challenge, ingest its tagged specification, solve it in a multi-file browser workspace, and receive private feedback from an AI or offline judge. The graph also preserves the challenge catalog, authoring, authentication, invitations, and post-pass learning features. The README documents the product workflow; sampled route and library excerpts show several server-side calls. Some UI and API subsystems are represented by their exact tree paths because their implementation was not sampled.

Main entry points: [`src/app/api/judge/route.ts`](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/judge/route.ts) (Judge endpoint), [`src/lib/supabase/server.ts`](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/supabase/server.ts) (Supabase data), [`src/components/workspace/WorkspaceLayout.tsx`](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/WorkspaceLayout.tsx) (Coding studio), [`src/app/api/challenges/route.ts`](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/route.ts) (Challenge API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Practice workflow"]
  node_calibration["Prompt calibration"]
  node_ingestion["Challenge ingestion"]
  node_validation["Challenge validation"]
  node_studio["Coding studio"]
  node_task_pane["Task guide<br/>[TaskGuidePane.tsx]"]
  node_code_editor["Multi-file editor<br/>[CodeEditor.tsx]"]
  node_symbol_outline["Symbol outline<br/>[SymbolOutline.tsx]"]
  node_file_state["Workspace file state"]
end

subgraph group_community["Challenge community"]
  node_authoring["Challenge authoring"]
  node_challenge_api["Challenge API<br/>[route.ts]"]
  node_catalog["Challenge catalog<br/>[library.ts]"]
  node_curated["Curated challenges<br/>[rust.ts]"]
  node_invites["Challenge invitations<br/>[route.ts]"]
  node_invite_ui["Invite controls<br/>[InviteModal.tsx]"]
  node_attempt_api["Attempt tracking<br/>[route.ts]"]
  node_solution_api["Solution reveal<br/>[route.ts]"]
end

subgraph group_evaluation["Evaluation"]
  node_judge_api["Judge endpoint<br/>[route.ts]"]
  node_judge_prompt["Judge prompts<br/>[judge-prompt.ts]"]
  node_local_eval["Offline evaluator<br/>[local-evaluator.ts]"]
  node_result_parser["Verdict parser<br/>[judge-parser.ts]"]
  node_result_ui["Practice results<br/>[ResultModal.tsx]"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication<br/>[AuthForm.tsx]"]
  node_auth_callback["Auth callback<br/>[route.ts]"]
  node_supabase[("Supabase data<br/>[server.ts]")]
  node_admin_supabase[("Privileged data access<br/>[admin.ts]")]
  node_marketing["Marketing experience"]
end

node_developer(("Developer"))
node_external_ai(("External AI"))

node_developer -->|"selects challenge"| node_calibration
node_developer -->|"authors challenge"| node_authoring
node_calibration -->|"prompts generation"| node_external_ai
node_authoring -->|"interviews author"| node_external_ai
node_external_ai -->|"returns tagged blocks"| node_ingestion
node_ingestion -->|"validates structure"| node_validation
node_developer -->|"solves challenge"| node_studio
node_studio -->|"shows specification"| node_task_pane
node_studio -->|"hosts editing"| node_code_editor
node_studio -->|"shows symbols"| node_symbol_outline
node_code_editor -->|"updates files"| node_file_state
node_authoring -.->|"saves challenge"| node_challenge_api
node_challenge_api -->|"validates submission"| node_validation
node_challenge_api -->|"stores challenge"| node_supabase
node_challenge_api -->|"normalizes sources"| node_catalog
node_developer -->|"browses challenges"| node_catalog
node_curated -.->|"supplies built-ins"| node_catalog
node_developer -->|"manages invitations"| node_invite_ui
node_invite_ui -.->|"checks or accepts"| node_invites
node_invites -->|"checks invite access"| node_supabase
node_developer -->|"tracks attempts"| node_attempt_api
node_attempt_api -->|"reads attempt records"| node_supabase
node_studio -->|"submits work"| node_judge_api
node_judge_api -->|"builds evaluation prompts"| node_judge_prompt
node_judge_api -->|"evaluates offline"| node_local_eval
node_judge_api -->|"parses AI verdict"| node_result_parser
node_judge_api -->|"requests cloud judgment"| node_external_ai
node_judge_api -->|"loads challenge data"| node_supabase
node_judge_api -->|"loads protected solution"| node_admin_supabase
node_judge_api -->|"returns verdict"| node_result_ui
node_developer -->|"signs in"| node_auth
node_auth -.->|"completes verification"| node_auth_callback
node_auth_callback -->|"verifies session"| node_supabase
node_judge_api -.->|"reveals after pass"| node_solution_api
node_solution_api -->|"checks completion"| node_supabase
node_solution_api -->|"reads protected solution"| node_admin_supabase
node_developer -->|"discovers practice"| node_marketing

click node_calibration "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/prompt/PromptWizardPage.tsx"
click node_ingestion "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/parser/challenge-parser.ts"
click node_validation "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/parser/challenge-validator.ts"
click node_studio "https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/WorkspaceLayout.tsx"
click node_task_pane "https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/TaskGuidePane.tsx"
click node_code_editor "https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/CodeEditor.tsx"
click node_symbol_outline "https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/SymbolOutline.tsx"
click node_file_state "https://github.com/anamelyilma/keepmycoding/blob/master/src/hooks/useWorkspaceFiles.ts"
click node_authoring "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/challenges/create/ChallengeCreatorPage.tsx"
click node_challenge_api "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/route.ts"
click node_catalog "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/challenges/library.ts"
click node_curated "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/challenges/data/rust.ts"
click node_invites "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/invites/%5Btoken%5D/route.ts"
click node_invite_ui "https://github.com/anamelyilma/keepmycoding/blob/master/src/components/challenges/InviteModal.tsx"
click node_attempt_api "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/%5Bid%5D/attempts/route.ts"
click node_judge_api "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/judge/route.ts"
click node_judge_prompt "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/judge/judge-prompt.ts"
click node_local_eval "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/judge/local-evaluator.ts"
click node_result_parser "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/judge/judge-parser.ts"
click node_result_ui "https://github.com/anamelyilma/keepmycoding/blob/master/src/components/result/ResultModal.tsx"
click node_auth "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/auth/AuthForm.tsx"
click node_auth_callback "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/auth/callback/route.ts"
click node_supabase "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/supabase/server.ts"
click node_admin_supabase "https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/supabase/admin.ts"
click node_solution_api "https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/%5Bid%5D/solution/route.ts"
click node_marketing "https://github.com/anamelyilma/keepmycoding/tree/master/src/components/marketing"

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_calibration,node_ingestion,node_validation,node_studio,node_task_pane,node_code_editor,node_symbol_outline,node_file_state toneBlue
class node_authoring,node_challenge_api,node_catalog,node_curated,node_invites,node_invite_ui,node_attempt_api,node_solution_api toneAmber
class node_judge_api,node_judge_prompt,node_local_eval,node_result_parser,node_result_ui toneMint
class node_auth,node_auth_callback,node_supabase,node_admin_supabase,node_marketing toneRose
class node_developer,node_external_ai toneIndigo
```

## Components

### Practice workflow

- [Prompt calibration](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/prompt/PromptWizardPage.tsx): `src/app/prompt/PromptWizardPage.tsx`
- [Challenge ingestion](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/parser/challenge-parser.ts): `src/lib/parser/challenge-parser.ts`
- [Challenge validation](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/parser/challenge-validator.ts): `src/lib/parser/challenge-validator.ts`
- [Coding studio](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/WorkspaceLayout.tsx): `src/components/workspace/WorkspaceLayout.tsx`
- [Task guide](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/TaskGuidePane.tsx): `src/components/workspace/TaskGuidePane.tsx`
- [Multi-file editor](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/CodeEditor.tsx): `src/components/workspace/CodeEditor.tsx`
- [Symbol outline](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/workspace/SymbolOutline.tsx): `src/components/workspace/SymbolOutline.tsx`
- [Workspace file state](https://github.com/anamelyilma/keepmycoding/blob/master/src/hooks/useWorkspaceFiles.ts): `src/hooks/useWorkspaceFiles.ts`

### Challenge community

- [Challenge authoring](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/challenges/create/ChallengeCreatorPage.tsx): `src/app/challenges/create/ChallengeCreatorPage.tsx`
- [Challenge API](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/route.ts): `src/app/api/challenges/route.ts`
- [Challenge catalog](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/challenges/library.ts): `src/lib/challenges/library.ts`
- [Curated challenges](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/challenges/data/rust.ts): `src/lib/challenges/data/rust.ts`
- [Challenge invitations](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/invites/%5Btoken%5D/route.ts): `src/app/api/invites/[token]/route.ts`
- [Invite controls](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/challenges/InviteModal.tsx): `src/components/challenges/InviteModal.tsx`
- [Attempt tracking](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/%5Bid%5D/attempts/route.ts): `src/app/api/challenges/[id]/attempts/route.ts`
- [Solution reveal](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/challenges/%5Bid%5D/solution/route.ts): `src/app/api/challenges/[id]/solution/route.ts`

### Evaluation

- [Judge endpoint](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/api/judge/route.ts): `src/app/api/judge/route.ts`
- [Judge prompts](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/judge/judge-prompt.ts): `src/lib/judge/judge-prompt.ts`
- [Offline evaluator](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/judge/local-evaluator.ts): `src/lib/judge/local-evaluator.ts`
- [Verdict parser](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/judge/judge-parser.ts): `src/lib/judge/judge-parser.ts`
- [Practice results](https://github.com/anamelyilma/keepmycoding/blob/master/src/components/result/ResultModal.tsx): `src/components/result/ResultModal.tsx`

### Platform services

- [Authentication](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/auth/AuthForm.tsx): `src/app/auth/AuthForm.tsx`
- [Auth callback](https://github.com/anamelyilma/keepmycoding/blob/master/src/app/auth/callback/route.ts): `src/app/auth/callback/route.ts`
- [Supabase data](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- [Privileged data access](https://github.com/anamelyilma/keepmycoding/blob/master/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`
- [Marketing experience](https://github.com/anamelyilma/keepmycoding/tree/master/src/components/marketing): `src/components/marketing`

### Other components

- **Developer**
- **External AI**

## Connections

- Developer → Prompt calibration: selects challenge (evidence: `README.md`)
- Developer → Challenge authoring: authors challenge (evidence: `README.md`)
- Prompt calibration → External AI: prompts generation (evidence: `README.md`)
- Challenge authoring → External AI: interviews author (evidence: `README.md`)
- External AI → Challenge ingestion: returns tagged blocks (evidence: `README.md`)
- Challenge ingestion → Challenge validation: validates structure (evidence: `src/lib/parser/challenge-validator.ts`)
- Developer → Coding studio: solves challenge (evidence: `README.md`)
- Coding studio → Task guide: shows specification (evidence: `README.md`)
- Coding studio → Multi-file editor: hosts editing (evidence: `README.md`)
- Coding studio → Symbol outline: shows symbols (evidence: `README.md`)
- Multi-file editor → Workspace file state: updates files (evidence: `src/hooks/useWorkspaceFiles.ts`)
- Challenge authoring → Challenge API: saves challenge
- Challenge API → Challenge validation: validates submission (evidence: `src/app/api/challenges/route.ts`)
- Challenge API → Supabase data: stores challenge (evidence: `src/app/api/challenges/route.ts`)
- Challenge API → Challenge catalog: normalizes sources (evidence: `src/app/api/challenges/route.ts`)
- Developer → Challenge catalog: browses challenges (evidence: `README.md`)
- Curated challenges → Challenge catalog: supplies built-ins
- Developer → Invite controls: manages invitations (evidence: `README.md`)
- Invite controls → Challenge invitations: checks or accepts
- Challenge invitations → Supabase data: checks invite access (evidence: `src/app/api/invites/[token]/route.ts`)
- Developer → Attempt tracking: tracks attempts (evidence: `README.md`)
- Attempt tracking → Supabase data: reads attempt records (evidence: `src/app/api/challenges/[id]/attempts/route.ts`)
- Coding studio → Judge endpoint: submits work (evidence: `README.md`)
- Judge endpoint → Judge prompts: builds evaluation prompts (evidence: `src/app/api/judge/route.ts`)
- Judge endpoint → Offline evaluator: evaluates offline (evidence: `src/app/api/judge/route.ts`)
- Judge endpoint → Verdict parser: parses AI verdict (evidence: `src/app/api/judge/route.ts`)
- Judge endpoint → External AI: requests cloud judgment (evidence: `README.md`)
- Judge endpoint → Supabase data: loads challenge data (evidence: `src/app/api/judge/route.ts`)
- Judge endpoint → Privileged data access: loads protected solution (evidence: `src/app/api/judge/route.ts`)
- Judge endpoint → Practice results: returns verdict (evidence: `README.md`)
- Developer → Authentication: signs in (evidence: `README.md`)
- Authentication → Auth callback: completes verification
- Auth callback → Supabase data: verifies session (evidence: `src/app/auth/callback/route.ts`)
- Judge endpoint → Solution reveal: reveals after pass
- Solution reveal → Supabase data: checks completion (evidence: `src/app/api/challenges/[id]/solution/route.ts`)
- Solution reveal → Privileged data access: reads protected solution (evidence: `src/app/api/challenges/[id]/solution/route.ts`)
- Developer → Marketing experience: discovers practice
