# the-ai-rishi/theairishi architecture

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

- Interactive diagram: https://gitdiagram.com/the-ai-rishi/theairishi
- Repository: https://github.com/the-ai-rishi/theairishi

## Overview

The AI Rishi is a public technology-learning platform centered on a published, 120-day DevOps program. Learners enter through the homepage or `/learn`, choose a published lesson, read its content, and use lesson navigation and progress features to continue. Separate surfaces expose guides, projects, topics, and channel media; search and shared visibility rules support discovery. The README describes content as JSON and Markdown-driven and compiled for production. Several subsystem links below rely on SOURCE INDEX references or README statements; unsampled implementation details are not inferred.

Main entry points: [`lib/catalog.ts`](https://github.com/the-ai-rishi/theairishi/blob/main/lib/catalog.ts) (Live Catalog), [`app/learn/[slug]/page.tsx`](https://github.com/the-ai-rishi/theairishi/blob/main/app/learn/%5Bslug%5D/page.tsx) (Lesson Route), [`lib/content.ts`](https://github.com/the-ai-rishi/theairishi/blob/main/lib/content.ts) (Content Service), [`lib/programs.ts`](https://github.com/the-ai-rishi/theairishi/blob/main/lib/programs.ts) (Program Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery &amp; Shell"]
  node_homepage["Homepage<br/>[page.tsx]"]
  node_product_home["Home Sections<br/>[ProductHome.tsx]"]
  node_page_shell["Page Shell<br/>[PageShell.tsx]"]
  node_header["Navigation Header<br/>[Header.tsx]"]
  node_search_api["Search Endpoint<br/>[route.ts]"]
  node_search["Search Interface<br/>[SearchModal.tsx]"]
end

subgraph group_learning["Learning Journey"]
  node_program_index["Program Catalog<br/>[page.tsx]"]
  node_program_overview["Program Overview"]
  node_lesson_route["Lesson Route<br/>[page.tsx]"]
  node_lesson_content["Lesson Content<br/>[LessonContent.tsx]"]
  node_lesson_controls["Lesson Controls"]
end

subgraph group_content["Content Surfaces"]
  node_guide_pages["Guides<br/>[page.tsx]"]
  node_guide_detail["Guide Detail<br/>[page.tsx]"]
  node_project_pages["Projects<br/>[page.tsx]"]
  node_project_detail["Project Detail<br/>[page.tsx]"]
  node_topic_page["Topic Pages<br/>[page.tsx]"]
  node_channel_page["Channel Media<br/>[page.tsx]"]
end

subgraph group_runtime["Content Runtime"]
  node_content_service["Content Service<br/>[content.ts]"]
  node_guide_service["Guide Service<br/>[guides.ts]"]
  node_lesson_service["Lesson Service<br/>[lessons.ts]"]
  node_program_service["Program Service<br/>[programs.ts]"]
  node_catalog_service["Live Catalog<br/>[catalog.ts]"]
  node_visibility["Visibility Rules<br/>[visibility-core.js]"]
  node_configuration["Platform Config<br/>[config.ts]"]
  node_search_service["Search Service<br/>[search.ts]"]
end

subgraph group_state["Learner State"]
  node_lesson_progress_ui["Progress UI"]
  node_progress_runtime["Progress Runtime"]
  node_progress_repository["Progress Repository"]
end

node_learner(("Learner"))

node_learner -->|"opens"| node_homepage
node_homepage -->|"renders"| node_product_home
node_homepage -->|"wraps"| node_page_shell
node_page_shell -->|"renders"| node_header
node_header -->|"opens"| node_search
node_search -.->|"queries"| node_search_api
node_search_api -->|"calls"| node_search_service
node_learner -->|"browses"| node_program_index
node_program_index -->|"renders"| node_program_overview
node_program_overview -->|"reads program"| node_program_service
node_learner -->|"opens lesson"| node_lesson_route
node_lesson_route -->|"loads lesson"| node_lesson_service
node_lesson_route -->|"renders"| node_lesson_content
node_lesson_route -->|"renders"| node_lesson_controls
node_lesson_route -->|"loads context"| node_program_service
node_lesson_controls -.->|"navigates"| node_lesson_route
node_lesson_progress_ui -->|"uses"| node_progress_runtime
node_progress_repository -->|"wraps"| node_progress_runtime
node_learner -->|"browses"| node_guide_pages
node_guide_pages -->|"loads guides"| node_guide_service
node_guide_detail -->|"loads guide"| node_guide_service
node_learner -.->|"browses"| node_project_pages
node_project_pages -.->|"opens project"| node_project_detail
node_project_pages -->|"loads projects"| node_content_service
node_topic_page -->|"loads topic content"| node_content_service
node_topic_page -->|"checks route"| node_catalog_service
node_channel_page -->|"checks route"| node_catalog_service
node_content_service -->|"uses"| node_guide_service
node_content_service -->|"uses"| node_lesson_service
node_content_service -->|"reads"| node_configuration
node_catalog_service -->|"collects published content"| node_content_service
node_catalog_service -->|"counts courses"| node_lesson_service
node_catalog_service -->|"loads program"| node_program_service
node_catalog_service -->|"reads config"| node_configuration
node_catalog_service -.->|"builds visibility inputs"| node_visibility
node_program_service -->|"hydrates days"| node_lesson_service
node_program_service -->|"normalizes status"| node_visibility
node_search_service -->|"uses catalog"| node_catalog_service
node_search_service -->|"filters results"| node_visibility
node_search_service -->|"reads config"| node_configuration
node_visibility -.->|"evaluates config"| node_configuration

click node_homepage "https://github.com/the-ai-rishi/theairishi/blob/main/app/page.tsx"
click node_product_home "https://github.com/the-ai-rishi/theairishi/blob/main/components/product/ProductHome.tsx"
click node_page_shell "https://github.com/the-ai-rishi/theairishi/blob/main/components/brand/PageShell.tsx"
click node_header "https://github.com/the-ai-rishi/theairishi/blob/main/components/layout/Header.tsx"
click node_search_api "https://github.com/the-ai-rishi/theairishi/blob/main/app/api/search/route.ts"
click node_search "https://github.com/the-ai-rishi/theairishi/blob/main/components/search/SearchModal.tsx"
click node_program_index "https://github.com/the-ai-rishi/theairishi/blob/main/app/learn/page.tsx"
click node_program_overview "https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/ProgramOverview.tsx"
click node_lesson_route "https://github.com/the-ai-rishi/theairishi/blob/main/app/learn/%5Bslug%5D/page.tsx"
click node_lesson_content "https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/LessonContent.tsx"
click node_lesson_controls "https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/LessonNavigation.tsx"
click node_lesson_progress_ui "https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/useLessonProgress.ts"
click node_progress_runtime "https://github.com/the-ai-rishi/theairishi/blob/main/lib/learner-progress.js"
click node_progress_repository "https://github.com/the-ai-rishi/theairishi/blob/main/lib/progress-repository.ts"
click node_guide_pages "https://github.com/the-ai-rishi/theairishi/blob/main/app/guides/page.tsx"
click node_guide_detail "https://github.com/the-ai-rishi/theairishi/blob/main/app/guides/%5Bslug%5D/page.tsx"
click node_project_pages "https://github.com/the-ai-rishi/theairishi/blob/main/app/projects/page.tsx"
click node_project_detail "https://github.com/the-ai-rishi/theairishi/blob/main/app/projects/%5Bslug%5D/page.tsx"
click node_topic_page "https://github.com/the-ai-rishi/theairishi/blob/main/app/topics/%5Btopic%5D/page.tsx"
click node_channel_page "https://github.com/the-ai-rishi/theairishi/blob/main/app/%5Bchannel%5D/page.tsx"
click node_content_service "https://github.com/the-ai-rishi/theairishi/blob/main/lib/content.ts"
click node_guide_service "https://github.com/the-ai-rishi/theairishi/blob/main/lib/guides.ts"
click node_lesson_service "https://github.com/the-ai-rishi/theairishi/blob/main/lib/lessons.ts"
click node_program_service "https://github.com/the-ai-rishi/theairishi/blob/main/lib/programs.ts"
click node_catalog_service "https://github.com/the-ai-rishi/theairishi/blob/main/lib/catalog.ts"
click node_visibility "https://github.com/the-ai-rishi/theairishi/blob/main/lib/visibility-core.js"
click node_configuration "https://github.com/the-ai-rishi/theairishi/blob/main/lib/config.ts"
click node_search_service "https://github.com/the-ai-rishi/theairishi/blob/main/lib/search.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_homepage,node_product_home,node_page_shell,node_header,node_search_api,node_search toneBlue
class node_program_index,node_program_overview,node_lesson_route,node_lesson_content,node_lesson_controls toneAmber
class node_guide_pages,node_guide_detail,node_project_pages,node_project_detail,node_topic_page,node_channel_page toneMint
class node_content_service,node_guide_service,node_lesson_service,node_program_service,node_catalog_service,node_visibility,node_configuration,node_search_service toneRose
class node_lesson_progress_ui,node_progress_runtime,node_progress_repository,node_learner toneIndigo
```

## Components

### Discovery & Shell

- [Homepage](https://github.com/the-ai-rishi/theairishi/blob/main/app/page.tsx): `app/page.tsx`
- [Home Sections](https://github.com/the-ai-rishi/theairishi/blob/main/components/product/ProductHome.tsx): `components/product/ProductHome.tsx`
- [Page Shell](https://github.com/the-ai-rishi/theairishi/blob/main/components/brand/PageShell.tsx): `components/brand/PageShell.tsx`
- [Navigation Header](https://github.com/the-ai-rishi/theairishi/blob/main/components/layout/Header.tsx): `components/layout/Header.tsx`
- [Search Endpoint](https://github.com/the-ai-rishi/theairishi/blob/main/app/api/search/route.ts): `app/api/search/route.ts`
- [Search Interface](https://github.com/the-ai-rishi/theairishi/blob/main/components/search/SearchModal.tsx): `components/search/SearchModal.tsx`

### Learning Journey

- [Program Catalog](https://github.com/the-ai-rishi/theairishi/blob/main/app/learn/page.tsx): `app/learn/page.tsx`
- [Program Overview](https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/ProgramOverview.tsx): `components/learning/ProgramOverview.tsx`
- [Lesson Route](https://github.com/the-ai-rishi/theairishi/blob/main/app/learn/%5Bslug%5D/page.tsx): `app/learn/[slug]/page.tsx`
- [Lesson Content](https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/LessonContent.tsx): `components/learning/LessonContent.tsx`
- [Lesson Controls](https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/LessonNavigation.tsx): `components/learning/LessonNavigation.tsx`

### Content Surfaces

- [Guides](https://github.com/the-ai-rishi/theairishi/blob/main/app/guides/page.tsx): `app/guides/page.tsx`
- [Guide Detail](https://github.com/the-ai-rishi/theairishi/blob/main/app/guides/%5Bslug%5D/page.tsx): `app/guides/[slug]/page.tsx`
- [Projects](https://github.com/the-ai-rishi/theairishi/blob/main/app/projects/page.tsx): `app/projects/page.tsx`
- [Project Detail](https://github.com/the-ai-rishi/theairishi/blob/main/app/projects/%5Bslug%5D/page.tsx): `app/projects/[slug]/page.tsx`
- [Topic Pages](https://github.com/the-ai-rishi/theairishi/blob/main/app/topics/%5Btopic%5D/page.tsx): `app/topics/[topic]/page.tsx`
- [Channel Media](https://github.com/the-ai-rishi/theairishi/blob/main/app/%5Bchannel%5D/page.tsx): `app/[channel]/page.tsx`

### Content Runtime

- [Content Service](https://github.com/the-ai-rishi/theairishi/blob/main/lib/content.ts): `lib/content.ts`
- [Guide Service](https://github.com/the-ai-rishi/theairishi/blob/main/lib/guides.ts): `lib/guides.ts`
- [Lesson Service](https://github.com/the-ai-rishi/theairishi/blob/main/lib/lessons.ts): `lib/lessons.ts`
- [Program Service](https://github.com/the-ai-rishi/theairishi/blob/main/lib/programs.ts): `lib/programs.ts`
- [Live Catalog](https://github.com/the-ai-rishi/theairishi/blob/main/lib/catalog.ts): `lib/catalog.ts`
- [Visibility Rules](https://github.com/the-ai-rishi/theairishi/blob/main/lib/visibility-core.js): `lib/visibility-core.js`
- [Platform Config](https://github.com/the-ai-rishi/theairishi/blob/main/lib/config.ts): `lib/config.ts`
- [Search Service](https://github.com/the-ai-rishi/theairishi/blob/main/lib/search.ts): `lib/search.ts`

### Learner State

- [Progress UI](https://github.com/the-ai-rishi/theairishi/blob/main/components/learning/useLessonProgress.ts): `components/learning/useLessonProgress.ts`
- [Progress Runtime](https://github.com/the-ai-rishi/theairishi/blob/main/lib/learner-progress.js): `lib/learner-progress.js`
- [Progress Repository](https://github.com/the-ai-rishi/theairishi/blob/main/lib/progress-repository.ts): `lib/progress-repository.ts`

### Other components

- **Learner**

## Connections

- Learner → Homepage: opens (evidence: `README.md`)
- Homepage → Home Sections: renders (evidence: `app/page.tsx`)
- Homepage → Page Shell: wraps (evidence: `app/page.tsx`)
- Page Shell → Navigation Header: renders (evidence: `components/brand/PageShell.tsx`)
- Navigation Header → Search Interface: opens (evidence: `components/layout/Header.tsx`)
- Search Interface → Search Endpoint: queries
- Search Endpoint → Search Service: calls (evidence: `app/api/search/route.ts`)
- Learner → Program Catalog: browses (evidence: `README.md`)
- Program Catalog → Program Overview: renders (evidence: `app/learn/page.tsx`)
- Program Overview → Program Service: reads program (evidence: `components/learning/ProgramOverview.tsx`)
- Learner → Lesson Route: opens lesson (evidence: `README.md`)
- Lesson Route → Lesson Service: loads lesson (evidence: `app/learn/[slug]/page.tsx`)
- Lesson Route → Lesson Content: renders (evidence: `app/learn/[slug]/page.tsx`)
- Lesson Route → Lesson Controls: renders (evidence: `app/learn/[slug]/page.tsx`)
- Lesson Route → Program Service: loads context (evidence: `app/learn/[slug]/page.tsx`)
- Lesson Controls → Lesson Route: navigates (evidence: `app/learn/[slug]/page.tsx`)
- Progress UI → Progress Runtime: uses (evidence: `components/learning/useLessonProgress.ts`)
- Progress Repository → Progress Runtime: wraps (evidence: `lib/progress-repository.ts`)
- Learner → Guides: browses (evidence: `README.md`)
- Guides → Guide Service: loads guides (evidence: `app/guides/page.tsx`)
- Guide Detail → Guide Service: loads guide (evidence: `app/guides/[slug]/page.tsx`)
- Learner → Projects: browses
- Projects → Project Detail: opens project
- Projects → Content Service: loads projects (evidence: `lib/content.ts`)
- Topic Pages → Content Service: loads topic content (evidence: `app/topics/[topic]/page.tsx`)
- Topic Pages → Live Catalog: checks route (evidence: `app/topics/[topic]/page.tsx`)
- Channel Media → Live Catalog: checks route (evidence: `app/[channel]/page.tsx`)
- Content Service → Guide Service: uses (evidence: `lib/content.ts`)
- Content Service → Lesson Service: uses (evidence: `lib/content.ts`)
- Content Service → Platform Config: reads (evidence: `lib/content.ts`)
- Live Catalog → Content Service: collects published content (evidence: `lib/catalog.ts`)
- Live Catalog → Lesson Service: counts courses (evidence: `lib/catalog.ts`)
- Live Catalog → Program Service: loads program (evidence: `lib/catalog.ts`)
- Live Catalog → Platform Config: reads config (evidence: `lib/catalog.ts`)
- Live Catalog → Visibility Rules: builds visibility inputs (evidence: `lib/catalog.ts`)
- Program Service → Lesson Service: hydrates days (evidence: `lib/programs.ts`)
- Program Service → Visibility Rules: normalizes status (evidence: `lib/programs.ts`)
- Search Service → Live Catalog: uses catalog (evidence: `lib/search.ts`)
- Search Service → Visibility Rules: filters results (evidence: `lib/search.ts`)
- Search Service → Platform Config: reads config (evidence: `lib/search.ts`)
- Visibility Rules → Platform Config: evaluates config (evidence: `lib/config.ts`)
