# hdasilva59/i-learn-arch-btw architecture

> Architecture diagram of the GitHub repository hdasilva59/i-learn-arch-btw, 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/hdasilva59/i-learn-arch-btw
- Repository: https://github.com/hdasilva59/i-learn-arch-btw

## Overview

This is an interactive Linux command-learning web app. Learners explore command guides, submit shell syntax for a plain-language explanation, and work through lessons with practice tasks and progress tracking. The explanation path parses shell syntax, identifies commands and options, and adds specialized interpretations such as `find` expressions. A simulated terminal supports lesson practice. Source excerpts and the index establish the main wiring; the README is only a generic Next.js starter, so specific product capabilities are inferred from the sampled application modules.

Main entry points: [`app/page.tsx`](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/page.tsx) (Learning interface), [`app/command-explainer.ts`](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-explainer.ts) (Command explainer), [`app/command-analyzer.ts`](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-analyzer.ts) (Command analyzer), [`app/command-knowledge.ts`](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-knowledge.ts) (Command knowledge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learning experience"]
  node_app["Learning interface<br/>[page.tsx]"]
  node_terminal["Practice terminal<br/>[terminal.ts]"]
  node_progress["Learning progress<br/>[learning.ts]"]
end

subgraph group_explanation["Command explanation"]
  node_explainer["Command explainer"]
  node_analyzer["Command analyzer"]
  node_knowledge["Command knowledge"]
  node_manpages["Guide matching<br/>[manpage-matcher.ts]"]
  node_find["Find expressions<br/>[find-expression.ts]"]
end

subgraph group_content["Learning content"]
  node_guidecatalog["Guide catalog<br/>[catalog.ts]"]
  node_guidedata["Command guide domains"]
  node_metadata["Command metadata<br/>[metadata.ts]"]
  node_courses["Lesson catalog<br/>[catalog.ts]"]
  node_coursetypes["Course validation<br/>[types.ts]"]
  node_commandindex["Guide exports<br/>[index.ts]"]
  node_courseindex["Course exports<br/>[index.ts]"]
end

subgraph group_syntax["Shell analysis"]
  node_shellast["Shell syntax parser<br/>[shell-ast.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"requests explanations"| node_explainer
node_app -->|"runs practice"| node_terminal
node_app -->|"updates progress"| node_progress
node_app -->|"loads guides"| node_commandindex
node_app -->|"loads lessons"| node_courseindex
node_explainer -->|"parses syntax"| node_shellast
node_explainer -->|"identifies commands"| node_manpages
node_explainer -->|"parses find"| node_find
node_explainer -->|"analyzes commands"| node_analyzer
node_explainer -->|"uses command knowledge"| node_knowledge
node_analyzer -->|"parses syntax"| node_shellast
node_analyzer -->|"parses find"| node_find
node_analyzer -->|"matches guides"| node_manpages
node_analyzer -->|"uses knowledge"| node_knowledge
node_knowledge -->|"resolves guide"| node_manpages
node_knowledge -->|"uses metadata"| node_metadata
node_manpages -->|"reads parsed words"| node_shellast
node_find -->|"parses nested shell"| node_shellast
node_guidecatalog -->|"assembles domains"| node_guidedata
node_courses -->|"validates task guides"| node_guidecatalog
node_courses -->|"validates lessons"| node_coursetypes
node_commandindex -->|"exports guides"| node_guidecatalog
node_courseindex -->|"exports lessons"| node_courses

click node_app "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/page.tsx"
click node_terminal "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/terminal.ts"
click node_progress "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/learning.ts"
click node_explainer "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-explainer.ts"
click node_analyzer "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-analyzer.ts"
click node_knowledge "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-knowledge.ts"
click node_manpages "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/manpage-matcher.ts"
click node_find "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/find-expression.ts"
click node_shellast "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/shell-ast.ts"
click node_guidecatalog "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/commands/catalog.ts"
click node_guidedata "https://github.com/hdasilva59/i-learn-arch-btw/tree/main/app/commands/domains"
click node_metadata "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/commands/metadata.ts"
click node_courses "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/courses/catalog.ts"
click node_coursetypes "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/courses/types.ts"
click node_commandindex "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/commands/index.ts"
click node_courseindex "https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/courses/index.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_app,node_terminal,node_progress toneBlue
class node_explainer,node_analyzer,node_knowledge,node_manpages,node_find toneAmber
class node_guidecatalog,node_guidedata,node_metadata,node_courses,node_coursetypes,node_commandindex,node_courseindex toneMint
class node_shellast toneRose
class node_learner toneIndigo
```

## Components

### Learning experience

- [Learning interface](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/page.tsx): `app/page.tsx`
- [Practice terminal](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/terminal.ts): `app/terminal.ts`
- [Learning progress](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/learning.ts): `app/learning.ts`

### Command explanation

- [Command explainer](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-explainer.ts): `app/command-explainer.ts`
- [Command analyzer](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-analyzer.ts): `app/command-analyzer.ts`
- [Command knowledge](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/command-knowledge.ts): `app/command-knowledge.ts`
- [Guide matching](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/manpage-matcher.ts): `app/manpage-matcher.ts`
- [Find expressions](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/find-expression.ts): `app/find-expression.ts`

### Learning content

- [Guide catalog](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/commands/catalog.ts): `app/commands/catalog.ts`
- [Command guide domains](https://github.com/hdasilva59/i-learn-arch-btw/tree/main/app/commands/domains): `app/commands/domains`
- [Command metadata](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/commands/metadata.ts): `app/commands/metadata.ts`
- [Lesson catalog](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/courses/catalog.ts): `app/courses/catalog.ts`
- [Course validation](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/courses/types.ts): `app/courses/types.ts`
- [Guide exports](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/commands/index.ts): `app/commands/index.ts`
- [Course exports](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/courses/index.ts): `app/courses/index.ts`

### Shell analysis

- [Shell syntax parser](https://github.com/hdasilva59/i-learn-arch-btw/blob/main/app/shell-ast.ts): `app/shell-ast.ts`

### Other components

- **Learner**

## Connections

- Learner → Learning interface: uses
- Learning interface → Command explainer: requests explanations (evidence: `app/page.tsx`)
- Learning interface → Practice terminal: runs practice (evidence: `app/page.tsx`)
- Learning interface → Learning progress: updates progress (evidence: `app/page.tsx`)
- Learning interface → Guide exports: loads guides (evidence: `app/page.tsx`)
- Learning interface → Course exports: loads lessons (evidence: `app/page.tsx`)
- Command explainer → Shell syntax parser: parses syntax (evidence: `app/command-explainer.ts`)
- Command explainer → Guide matching: identifies commands (evidence: `app/command-explainer.ts`)
- Command explainer → Find expressions: parses find (evidence: `app/command-explainer.ts`)
- Command explainer → Command analyzer: analyzes commands (evidence: `app/command-explainer.ts`)
- Command explainer → Command knowledge: uses command knowledge (evidence: `app/command-explainer.ts`)
- Command analyzer → Shell syntax parser: parses syntax (evidence: `app/command-analyzer.ts`)
- Command analyzer → Find expressions: parses find (evidence: `app/command-analyzer.ts`)
- Command analyzer → Guide matching: matches guides (evidence: `app/command-analyzer.ts`)
- Command analyzer → Command knowledge: uses knowledge (evidence: `app/command-analyzer.ts`)
- Command knowledge → Guide matching: resolves guide (evidence: `app/command-knowledge.ts`)
- Command knowledge → Command metadata: uses metadata (evidence: `app/command-knowledge.ts`)
- Guide matching → Shell syntax parser: reads parsed words (evidence: `app/manpage-matcher.ts`)
- Find expressions → Shell syntax parser: parses nested shell (evidence: `app/find-expression.ts`)
- Guide catalog → Command guide domains: assembles domains (evidence: `app/commands/catalog.ts`)
- Lesson catalog → Guide catalog: validates task guides (evidence: `app/courses/catalog.ts`)
- Lesson catalog → Course validation: validates lessons (evidence: `app/courses/catalog.ts`)
- Guide exports → Guide catalog: exports guides (evidence: `app/commands/index.ts`)
- Course exports → Lesson catalog: exports lessons (evidence: `app/courses/index.ts`)
