# stanleyyoga123/mimiclearningplatform architecture

> Architecture diagram of the GitHub repository stanleyyoga123/mimiclearningplatform, 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/stanleyyoga123/mimiclearningplatform
- Repository: https://github.com/stanleyyoga123/mimiclearningplatform

## Overview

Mimic turns an author’s task brief or RCA into a verified, unpublished exercise, then publishes a starter repository for learners. Learners browse published modules, work in their own clone, ask contextual AI coworkers or a mentor, and open pull requests for automated Codex review. GitHub webhooks queue reviews; frontend profile and mentor dashboards are static previews. Several backend internals were not sampled, so their documented capabilities are shown without speculative internal links.

Main entry points: [`frontend/src/app/App.tsx`](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/app/App.tsx) (Frontend app), [`frontend/src/pages/junior/JuniorPage.tsx`](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/junior/JuniorPage.tsx) (Learner workspace), [`backend/src/apprenticeship/features/modules/module_pipeline.py`](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_pipeline.py) (Generate and publish), [`backend/src/apprenticeship/features/learner_workspace/chat_session_service.py`](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/learner_workspace/chat_session_service.py) (Chat sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User workspaces"]
  node_app["Frontend app<br/>[App.tsx]"]
  node_senior["Author workspace<br/>[SeniorPage.tsx]"]
  node_junior["Learner workspace<br/>[JuniorPage.tsx]"]
  node_profiles["Profile previews"]
  node_mentorpreview["Mentor preview<br/>[MentorPage.tsx]"]
end

subgraph group_generation["Exercise generation"]
  node_moduleapi["Module API<br/>[ModuleApi.ts]"]
  node_module_routes["Module routes<br/>[module_routes.py]"]
  node_module_service["Module service<br/>[module_service.py]"]
  node_module_pipeline["Generate and publish<br/>[module_pipeline.py]"]
  node_modules_db[("Module records")]
  node_verifier["Exercise verifier<br/>[docker_verifier.py]"]
  node_publisher["GitHub publisher"]
end

subgraph group_learning["Learner assistance"]
  node_sessionapi["Session API<br/>[SessionApi.ts]"]
  node_chat["Chat sessions"]
  node_materials["Context materials"]
  node_openrouter_client["Chat model client"]
end

subgraph group_review["GitHub review"]
  node_submissionapi["Submission API<br/>[SubmissionApi.ts]"]
  node_webhook["Webhook intake<br/>[webhook_routes.py]"]
  node_webhook_service["Webhook service"]
  node_inbox[("Webhook inbox")]
  node_worker["Background worker<br/>[job_worker.py]"]
  node_submission_pipeline["PR review pipeline"]
  node_review_client["GitHub review client"]
  node_submission_db[("Submission records")]
end

node_author(("Module author"))
node_learner(("Learner"))
node_github["GitHub"]
node_openrouter["OpenRouter"]

node_author -->|"uses"| node_app
node_app -->|"routes to"| node_senior
node_app -->|"routes to"| node_junior
node_app -->|"routes to"| node_profiles
node_app -->|"routes to"| node_mentorpreview
node_senior -->|"requests modules"| node_moduleapi
node_moduleapi -.->|"calls API"| node_module_routes
node_module_routes -->|"delegates"| node_module_service
node_module_service -.->|"queues generation"| node_module_pipeline
node_module_pipeline -->|"updates records"| node_modules_db
node_module_pipeline -->|"verifies exercise"| node_verifier
node_module_pipeline -->|"publishes starter"| node_publisher
node_publisher -->|"creates repository"| node_github
node_learner -->|"uses"| node_junior
node_junior -->|"browses modules"| node_moduleapi
node_junior -->|"starts chat"| node_sessionapi
node_sessionapi -->|"streams conversation"| node_chat
node_chat -->|"loads context"| node_materials
node_chat -->|"streams replies"| node_openrouter_client
node_openrouter_client -->|"sends chat"| node_openrouter
node_junior -->|"checks reviews"| node_submissionapi
node_github -->|"delivers events"| node_webhook
node_webhook -->|"ingests event"| node_webhook_service
node_webhook_service -->|"stores delivery"| node_inbox
node_inbox -.->|"provides queued events"| node_worker
node_worker -->|"runs review"| node_submission_pipeline
node_submission_pipeline -->|"records result"| node_submission_db
node_submission_pipeline -->|"fetches and posts review"| node_review_client
node_review_client -->|"reviews pull request"| node_github

click node_app "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/app/App.tsx"
click node_senior "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/senior/SeniorPage.tsx"
click node_junior "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/junior/JuniorPage.tsx"
click node_profiles "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/junior/JuniorProfilePage.tsx"
click node_mentorpreview "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/mentor/MentorPage.tsx"
click node_moduleapi "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/features/modules/services/ModuleApi.ts"
click node_module_routes "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_routes.py"
click node_module_service "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_service.py"
click node_module_pipeline "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_pipeline.py"
click node_modules_db "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_repository.py"
click node_verifier "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/verification/docker_verifier.py"
click node_publisher "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/clients/github_publisher.py"
click node_sessionapi "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/features/sessions/services/SessionApi.ts"
click node_chat "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/learner_workspace/chat_session_service.py"
click node_materials "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/learner_workspace/chat_materials_reader.py"
click node_openrouter_client "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/clients/openrouter_client.py"
click node_submissionapi "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/features/submissions/services/SubmissionApi.ts"
click node_webhook "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/github_webhooks/webhook_routes.py"
click node_webhook_service "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/github_webhooks/github_webhook_service.py"
click node_inbox "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/github_webhooks/webhook_inbox_repository.py"
click node_worker "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/services/job_worker.py"
click node_submission_pipeline "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/submissions/submission_pipeline.py"
click node_review_client "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/clients/github_review_client.py"
click node_submission_db "https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/submissions/submission_repository.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_app,node_senior,node_junior,node_profiles,node_mentorpreview toneBlue
class node_moduleapi,node_module_routes,node_module_service,node_module_pipeline,node_modules_db,node_verifier,node_publisher toneAmber
class node_sessionapi,node_chat,node_materials,node_openrouter_client,node_openrouter toneMint
class node_submissionapi,node_webhook,node_webhook_service,node_inbox,node_worker,node_submission_pipeline,node_review_client,node_submission_db toneRose
class node_author,node_learner,node_github toneIndigo
```

## Components

### User workspaces

- [Frontend app](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Author workspace](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/senior/SeniorPage.tsx): `frontend/src/pages/senior/SeniorPage.tsx`
- [Learner workspace](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/junior/JuniorPage.tsx): `frontend/src/pages/junior/JuniorPage.tsx`
- [Profile previews](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/junior/JuniorProfilePage.tsx): `frontend/src/pages/junior/JuniorProfilePage.tsx`
- [Mentor preview](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/pages/mentor/MentorPage.tsx): `frontend/src/pages/mentor/MentorPage.tsx`

### Exercise generation

- [Module API](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/features/modules/services/ModuleApi.ts): `frontend/src/features/modules/services/ModuleApi.ts`
- [Module routes](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_routes.py): `backend/src/apprenticeship/features/modules/module_routes.py`
- [Module service](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_service.py): `backend/src/apprenticeship/features/modules/module_service.py`
- [Generate and publish](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_pipeline.py): `backend/src/apprenticeship/features/modules/module_pipeline.py`
- [Module records](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/modules/module_repository.py): `backend/src/apprenticeship/features/modules/module_repository.py`
- [Exercise verifier](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/verification/docker_verifier.py): `backend/src/apprenticeship/features/verification/docker_verifier.py`
- [GitHub publisher](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/clients/github_publisher.py): `backend/src/apprenticeship/clients/github_publisher.py`

### Learner assistance

- [Session API](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/features/sessions/services/SessionApi.ts): `frontend/src/features/sessions/services/SessionApi.ts`
- [Chat sessions](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/learner_workspace/chat_session_service.py): `backend/src/apprenticeship/features/learner_workspace/chat_session_service.py`
- [Context materials](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/learner_workspace/chat_materials_reader.py): `backend/src/apprenticeship/features/learner_workspace/chat_materials_reader.py`
- [Chat model client](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/clients/openrouter_client.py): `backend/src/apprenticeship/clients/openrouter_client.py`

### GitHub review

- [Submission API](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/frontend/src/features/submissions/services/SubmissionApi.ts): `frontend/src/features/submissions/services/SubmissionApi.ts`
- [Webhook intake](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/github_webhooks/webhook_routes.py): `backend/src/apprenticeship/features/github_webhooks/webhook_routes.py`
- [Webhook service](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/github_webhooks/github_webhook_service.py): `backend/src/apprenticeship/features/github_webhooks/github_webhook_service.py`
- [Webhook inbox](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/github_webhooks/webhook_inbox_repository.py): `backend/src/apprenticeship/features/github_webhooks/webhook_inbox_repository.py`
- [Background worker](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/services/job_worker.py): `backend/src/apprenticeship/services/job_worker.py`
- [PR review pipeline](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/submissions/submission_pipeline.py): `backend/src/apprenticeship/features/submissions/submission_pipeline.py`
- [GitHub review client](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/clients/github_review_client.py): `backend/src/apprenticeship/clients/github_review_client.py`
- [Submission records](https://github.com/stanleyyoga123/mimiclearningplatform/blob/main/backend/src/apprenticeship/features/submissions/submission_repository.py): `backend/src/apprenticeship/features/submissions/submission_repository.py`

### Other components

- **Module author**
- **Learner**
- **GitHub**
- **OpenRouter**

## Connections

- Module author → Frontend app: uses
- Frontend app → Author workspace: routes to (evidence: `frontend/src/app/App.tsx`)
- Frontend app → Learner workspace: routes to (evidence: `frontend/src/app/App.tsx`)
- Frontend app → Profile previews: routes to (evidence: `frontend/src/app/App.tsx`)
- Frontend app → Mentor preview: routes to (evidence: `frontend/src/app/App.tsx`)
- Author workspace → Module API: requests modules (evidence: `frontend/src/app/App.tsx`)
- Module API → Module routes: calls API
- Module routes → Module service: delegates (evidence: `backend/src/apprenticeship/features/modules/module_routes.py`)
- Module service → Generate and publish: queues generation
- Generate and publish → Module records: updates records (evidence: `backend/src/apprenticeship/features/modules/module_pipeline.py`)
- Generate and publish → Exercise verifier: verifies exercise (evidence: `backend/src/apprenticeship/features/modules/module_pipeline.py`)
- Generate and publish → GitHub publisher: publishes starter (evidence: `backend/src/apprenticeship/features/modules/module_pipeline.py`)
- GitHub publisher → GitHub: creates repository
- Learner → Learner workspace: uses
- Learner workspace → Module API: browses modules
- Learner workspace → Session API: starts chat
- Session API → Chat sessions: streams conversation
- Chat sessions → Context materials: loads context (evidence: `backend/src/apprenticeship/features/learner_workspace/chat_session_service.py`)
- Chat sessions → Chat model client: streams replies (evidence: `backend/src/apprenticeship/features/learner_workspace/chat_session_service.py`)
- Chat model client → OpenRouter: sends chat
- Learner workspace → Submission API: checks reviews
- GitHub → Webhook intake: delivers events
- Webhook intake → Webhook service: ingests event (evidence: `backend/src/apprenticeship/features/github_webhooks/webhook_routes.py`)
- Webhook service → Webhook inbox: stores delivery (evidence: `backend/src/apprenticeship/features/github_webhooks/webhook_routes.py`)
- Webhook inbox → Background worker: provides queued events
- Background worker → PR review pipeline: runs review (evidence: `backend/src/apprenticeship/services/job_worker.py`)
- PR review pipeline → Submission records: records result (evidence: `backend/src/apprenticeship/features/submissions/submission_pipeline.py`)
- PR review pipeline → GitHub review client: fetches and posts review (evidence: `backend/src/apprenticeship/features/submissions/submission_pipeline.py`)
- GitHub review client → GitHub: reviews pull request
