# codeyourfuture/curriculum architecture

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

- Interactive diagram: https://gitdiagram.com/codeyourfuture/curriculum
- Repository: https://github.com/codeyourfuture/curriculum

## Overview

Common is a Hugo-based, multi-tenant curriculum viewer backed by reusable headless curriculum content. Learners use a configured organization site to view learning material, while project work and submissions remain in GitHub. A separate Netlify endpoint supports cloning curriculum issues into a learner’s GitHub coursework repository. The graph includes the documented platform capabilities and the sampled clone implementation; other content internals and the unexcerpted submission hook are not inferred.

Main entry points: [`org-cyf/tooling/netlify/helpers/github.ts`](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/github.ts) (GitHub issue service), [`org-cyf/tooling/netlify/helpers/util.ts`](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/util.ts) (OAuth and response helpers), [`org-cyf/tooling/netlify/functions/clone.ts`](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/functions/clone.ts) (Clone endpoint), [`org-cyf/tooling/netlify/helpers/config.ts`](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/config.ts) (Runtime configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Curriculum content"]
  node_curriculum_content["Learning content"]
  node_activities["Blocks and activities"]
end

subgraph group_viewer["Hugo viewer"]
  node_org["Organization site"]
  node_hugo["Hugo platform"]
  node_site_view["Curriculum viewer"]
end

subgraph group_github["GitHub workflow"]
  node_project_work["Project work"]
  node_github["GitHub"]
end

subgraph group_clone["Issue cloning"]
  node_clone_handler["Clone endpoint<br/>[clone.ts]"]
  node_request_helpers["OAuth and response helpers<br/>[util.ts]"]
  node_github_service["GitHub issue service<br/>[github.ts]"]
  node_config["Runtime configuration<br/>[config.ts]"]
  node_graphql["Project GraphQL operations<br/>[gql.ts]"]
  node_templates["Redirect templates<br/>[templates.ts]"]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_org
node_org -->|"configures"| node_hugo
node_hugo -->|"renders"| node_curriculum_content
node_hugo -->|"renders"| node_activities
node_hugo -->|"generates"| node_site_view
node_learner -->|"submits work"| node_github
node_github -->|"hosts"| node_project_work
node_clone_handler -->|"validates auth"| node_request_helpers
node_clone_handler -->|"clones issues"| node_github_service
node_request_helpers -->|"uses OAuth"| node_github_service
node_request_helpers -->|"reads settings"| node_config
node_request_helpers -->|"builds redirects"| node_templates
node_github_service -->|"reads settings"| node_config
node_github_service -->|"uses operations"| node_graphql
node_github_service -->|"reads and creates issues"| node_github
node_clone_handler -->|"redirects result"| node_learner

click node_curriculum_content "https://github.com/codeyourfuture/curriculum/tree/main/common-content/en/module"
click node_activities "https://github.com/codeyourfuture/curriculum/tree/main/common-content/en/blocks"
click node_clone_handler "https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/functions/clone.ts"
click node_request_helpers "https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/util.ts"
click node_github_service "https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/github.ts"
click node_config "https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/config.ts"
click node_graphql "https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/gql.ts"
click node_templates "https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/templates.ts"

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_curriculum_content,node_activities toneBlue
class node_org,node_hugo,node_site_view toneAmber
class node_project_work,node_github toneMint
class node_clone_handler,node_request_helpers,node_github_service,node_config,node_graphql,node_templates toneRose
class node_learner toneIndigo
```

## Components

### Curriculum content

- [Learning content](https://github.com/codeyourfuture/curriculum/tree/main/common-content/en/module): `common-content/en/module`
- [Blocks and activities](https://github.com/codeyourfuture/curriculum/tree/main/common-content/en/blocks): `common-content/en/blocks`

### Hugo viewer

- **Organization site**
- **Hugo platform**
- **Curriculum viewer**

### GitHub workflow

- **Project work**
- **GitHub**

### Issue cloning

- [Clone endpoint](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/functions/clone.ts): `org-cyf/tooling/netlify/functions/clone.ts`
- [OAuth and response helpers](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/util.ts): `org-cyf/tooling/netlify/helpers/util.ts`
- [GitHub issue service](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/github.ts): `org-cyf/tooling/netlify/helpers/github.ts`
- [Runtime configuration](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/config.ts): `org-cyf/tooling/netlify/helpers/config.ts`
- [Project GraphQL operations](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/gql.ts): `org-cyf/tooling/netlify/helpers/gql.ts`
- [Redirect templates](https://github.com/codeyourfuture/curriculum/blob/main/org-cyf/tooling/netlify/helpers/templates.ts): `org-cyf/tooling/netlify/helpers/templates.ts`

### Other components

- **Learner**

## Connections

- Learner → Organization site: opens (evidence: `README.md`)
- Organization site → Hugo platform: configures (evidence: `README.md`)
- Hugo platform → Learning content: renders (evidence: `README.md`)
- Hugo platform → Blocks and activities: renders (evidence: `README.md`)
- Hugo platform → Curriculum viewer: generates (evidence: `README.md`)
- Learner → GitHub: submits work (evidence: `README.md`)
- GitHub → Project work: hosts (evidence: `README.md`)
- Clone endpoint → OAuth and response helpers: validates auth (evidence: `org-cyf/tooling/netlify/functions/clone.ts`)
- Clone endpoint → GitHub issue service: clones issues (evidence: `org-cyf/tooling/netlify/functions/clone.ts`)
- OAuth and response helpers → GitHub issue service: uses OAuth (evidence: `org-cyf/tooling/netlify/helpers/util.ts`)
- OAuth and response helpers → Runtime configuration: reads settings (evidence: `org-cyf/tooling/netlify/helpers/util.ts`)
- OAuth and response helpers → Redirect templates: builds redirects (evidence: `org-cyf/tooling/netlify/helpers/util.ts`)
- GitHub issue service → Runtime configuration: reads settings (evidence: `org-cyf/tooling/netlify/helpers/github.ts`)
- GitHub issue service → Project GraphQL operations: uses operations (evidence: `org-cyf/tooling/netlify/helpers/github.ts`)
- GitHub issue service → GitHub: reads and creates issues (evidence: `org-cyf/tooling/netlify/helpers/github.ts`)
- Clone endpoint → Learner: redirects result (evidence: `org-cyf/tooling/netlify/functions/clone.ts`)
