# alexfdez1010/mental-models architecture

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

- Interactive diagram: https://gitdiagram.com/alexfdez1010/mental-models
- Repository: https://github.com/alexfdez1010/mental-models

## Overview

Mental Models is a bilingual, zero-to-expert learning site. Learners browse a dependency-ordered catalog and curated learning paths, open lessons with interactive exercises, then track or transfer completion progress. The map emphasizes the documented content, catalog, and learning experience; the tree does not include page routes or MDX files, so their runtime wiring is not shown. Individual island behavior is represented as a reusable capability rather than enumerating every exercise.

Main entry points: [`src/lib/catalog.ts`](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/catalog.ts) (Course catalog), [`src/lib/content.ts`](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/content.ts) (Content helpers), [`src/components/react/CourseGraph.tsx`](https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/CourseGraph.tsx) (Dependency graph), [`src/lib/roadmaps.ts`](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/roadmaps.ts) (Learning paths)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning content"]
  node_content["Content helpers<br/>[content.ts]"]
  node_collections[("Content collections<br/>[content.config.ts]")]
end

subgraph group_discovery["Catalog and paths"]
  node_catalog["Course catalog<br/>[catalog.ts]"]
  node_coursegraph["Dependency graph<br/>[CourseGraph.tsx]"]
  node_filters["Catalog filters<br/>[catalog-filter.ts]"]
  node_roadmaps["Learning paths<br/>[roadmaps.ts]"]
  node_roadmapmeta["Path metadata<br/>[roadmap-meta.ts]"]
end

subgraph group_experience["Interactive learning"]
  node_islands["Lesson interactions"]
  node_assessments["Exercises and quizzes"]
  node_progressui["Completion controls<br/>[CourseComplete.tsx]"]
  node_progress[("Progress tracking<br/>[progress.ts]")]
  node_transfer["Progress transfer"]
end

subgraph group_platform["Shared platform"]
  node_i18n["Locale utilities<br/>[utils.ts]"]
  node_uiwords["Translated interface<br/>[ui.ts]"]
  node_og["Share images<br/>[og.ts]"]
end

node_learner(("Learner"))

node_learner -->|"browses courses"| node_catalog
node_catalog -->|"loads topics"| node_content
node_catalog -->|"loads paths"| node_roadmaps
node_catalog -->|"filters courses"| node_filters
node_catalog -->|"uses graph"| node_coursegraph
node_coursegraph -->|"applies filters"| node_filters
node_coursegraph -->|"reads progress"| node_progress
node_roadmaps -->|"summarizes topics"| node_content
node_roadmaps -->|"uses metadata"| node_roadmapmeta
node_content -->|"queries collections"| node_collections
node_content -->|"localizes routes"| node_i18n
node_roadmapmeta -->|"defines learning paths"| node_learner
node_learner -->|"uses lesson tools"| node_islands
node_islands -->|"includes assessments"| node_assessments
node_learner -->|"marks completion"| node_progressui
node_progressui -->|"updates progress"| node_progress
node_learner -->|"imports or exports"| node_transfer
node_transfer -.->|"transfers records"| node_progress
node_i18n -->|"reads translations"| node_uiwords
node_learner -.->|"views share cards"| node_og

click node_content "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/content.ts"
click node_collections "https://github.com/alexfdez1010/mental-models/blob/main/src/content.config.ts"
click node_catalog "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/catalog.ts"
click node_coursegraph "https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/CourseGraph.tsx"
click node_filters "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/catalog-filter.ts"
click node_roadmaps "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/roadmaps.ts"
click node_roadmapmeta "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/roadmap-meta.ts"
click node_islands "https://github.com/alexfdez1010/mental-models/tree/main/src/components/react"
click node_assessments "https://github.com/alexfdez1010/mental-models/tree/main/src/components/react"
click node_progressui "https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/CourseComplete.tsx"
click node_progress "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/progress.ts"
click node_transfer "https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/ProgressTransfer.tsx"
click node_i18n "https://github.com/alexfdez1010/mental-models/blob/main/src/i18n/utils.ts"
click node_uiwords "https://github.com/alexfdez1010/mental-models/blob/main/src/i18n/ui.ts"
click node_og "https://github.com/alexfdez1010/mental-models/blob/main/src/lib/og.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_content,node_collections toneBlue
class node_catalog,node_coursegraph,node_filters,node_roadmaps,node_roadmapmeta toneAmber
class node_islands,node_assessments,node_progressui,node_progress,node_transfer toneMint
class node_i18n,node_uiwords,node_og toneRose
class node_learner toneIndigo
```

## Components

### Learning content

- [Content helpers](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/content.ts): `src/lib/content.ts`
- [Content collections](https://github.com/alexfdez1010/mental-models/blob/main/src/content.config.ts): `src/content.config.ts`

### Catalog and paths

- [Course catalog](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/catalog.ts): `src/lib/catalog.ts`
- [Dependency graph](https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/CourseGraph.tsx): `src/components/react/CourseGraph.tsx`
- [Catalog filters](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/catalog-filter.ts): `src/lib/catalog-filter.ts`
- [Learning paths](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/roadmaps.ts): `src/lib/roadmaps.ts`
- [Path metadata](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/roadmap-meta.ts): `src/lib/roadmap-meta.ts`

### Interactive learning

- [Lesson interactions](https://github.com/alexfdez1010/mental-models/tree/main/src/components/react): `src/components/react`
- [Exercises and quizzes](https://github.com/alexfdez1010/mental-models/tree/main/src/components/react): `src/components/react`
- [Completion controls](https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/CourseComplete.tsx): `src/components/react/CourseComplete.tsx`
- [Progress tracking](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/progress.ts): `src/lib/progress.ts`
- [Progress transfer](https://github.com/alexfdez1010/mental-models/blob/main/src/components/react/ProgressTransfer.tsx): `src/components/react/ProgressTransfer.tsx`

### Shared platform

- [Locale utilities](https://github.com/alexfdez1010/mental-models/blob/main/src/i18n/utils.ts): `src/i18n/utils.ts`
- [Translated interface](https://github.com/alexfdez1010/mental-models/blob/main/src/i18n/ui.ts): `src/i18n/ui.ts`
- [Share images](https://github.com/alexfdez1010/mental-models/blob/main/src/lib/og.ts): `src/lib/og.ts`

### Other components

- **Learner**

## Connections

- Learner → Course catalog: browses courses (evidence: `README.md`)
- Course catalog → Content helpers: loads topics (evidence: `src/lib/catalog.ts`)
- Course catalog → Learning paths: loads paths (evidence: `src/lib/catalog.ts`)
- Course catalog → Catalog filters: filters courses (evidence: `src/lib/catalog.ts`)
- Course catalog → Dependency graph: uses graph (evidence: `src/lib/catalog.ts`)
- Dependency graph → Catalog filters: applies filters (evidence: `src/components/react/CourseGraph.tsx`)
- Dependency graph → Progress tracking: reads progress (evidence: `src/components/react/CourseGraph.tsx`)
- Learning paths → Content helpers: summarizes topics (evidence: `src/lib/roadmaps.ts`)
- Learning paths → Path metadata: uses metadata (evidence: `src/lib/roadmaps.ts`)
- Content helpers → Content collections: queries collections (evidence: `src/lib/content.ts`)
- Content helpers → Locale utilities: localizes routes (evidence: `src/lib/content.ts`)
- Path metadata → Learner: defines learning paths (evidence: `README.md`)
- Learner → Lesson interactions: uses lesson tools (evidence: `README.md`)
- Lesson interactions → Exercises and quizzes: includes assessments (evidence: `src/components/react/index.ts`)
- Learner → Completion controls: marks completion (evidence: `README.md`)
- Completion controls → Progress tracking: updates progress (evidence: `src/components/react/CourseComplete.tsx`)
- Learner → Progress transfer: imports or exports
- Progress transfer → Progress tracking: transfers records
- Locale utilities → Translated interface: reads translations (evidence: `src/i18n/utils.ts`)
- Learner → Share images: views share cards
