# fastai/course22 architecture

> Architecture diagram of the GitHub repository fastai/course22, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fastai/course22
- Repository: https://github.com/fastai/course22

## Overview

##### Project type and purpose
- This is not a traditional “application” or microservice-based system: it’s a **content repository** for the 2022 edition of the “Practical Deep Learning for Coders” course (course.fast.ai).
- It bundles **Jupyter notebooks**, **slide decks**, **Excel spreadsheets**, and a small set of **tooling scripts** to assemble/clean the content.
- It includes a **.devcontainer** configuration to provide a reproducible environment (Docker + Codespaces) for running the notebooks.

##### File structure
Top-level directories and their roles:
- `/` (root): the _working copies_ of the notebooks (`00-… .ipynb` through `10-… .ipynb`).
- `/clean`: a **cleaned** version of each notebook (no outputs or prose) – used for distribution or automated testing.
- `/slides`: pre-built slide decks in PDF/PPTX and some notebook-based slides.
- `/xl`: Excel files used as teaching datasets or worked examples.
- `/tools`: Python scripts (`clean.py`, `download.py`) and metadata (`kaggles.txt`) that automate cleaning/notebook preparation or data fetch.
- `/.devcontainer`: Dockerfile, environment spec (`requirements.txt`), and Codespaces configuration.
Key files:
- `.gitignore`
- `getting-started-with-codespaces.md` – instructions for launching this repo in GitHub Codespaces.
- `README.md` – high-level overview.

##### README for additional insights
- Confirms that the repo root holds notebooks, with a parallel clean folder.
- `tools` are for building/maintaining the repo (not directly lesson content).
- There is a companion website (`course.fast.ai`) that actually hosts the interactive lessons.

a. Main components:
- Developer Environment (DevContainer + Codespaces)
- Raw Notebooks (root folder)
- Clean Notebooks (clean folder)
- Slide Decks (`/slides`)
- Data Spreadsheets (`/xl`)
- Tooling Scripts (`/tools`)
- External Hosting/Delivery (GitHub, course.fast.ai, Binder/Colab)
b. Relationships & interactions:
- DevContainer spins up a Jupyter server with the dependencies from `.devcontainer/requirements.txt`.
- `/tools/download.py` fetches or updates raw data (e.g., Kaggle files listed in `kaggles.txt`) into `/xl` if needed.
- `/tools/clean.py` reads the raw notebooks in `/` → strips outputs & text → writes cleaned copies into `/clean`.
- Authors iterate on raw notebooks in the DevContainer; commit changes to GitHub.
- GitHub Actions or CI (implied) could run `tools/clean.py` automatically, validate that `/clean` is up to date, and upload notebooks to the public site.
- Slide decks are maintained separately in `/slides`; they may be generated from notebooks or hand-edited, then stored in Git.
- End users can pull the repo and launch it via Codespaces or Binder, or view the course materials on `course.fast.ai`.
c. Architectural patterns/design principles:
- **Separation of concerns**: content (notebooks/slides/data) vs. build tooling vs. environment config.
- **Reproducible dev environment**: containerized dev via Docker / Codespaces.
- **Content pipeline**: raw → cleaned → published.
d. Key technologies/frameworks:
- Python & Jupyter notebooks (FastAI framework within notebooks)
- Docker / DevContainer / GitHub Codespaces
- Git/GitHub for version control & hosting
- Optional CI (e.g., GitHub Actions) for automated validation/cleaning
- Excel (.xlsx) as static data source
- Slide formats: PDF, PPTX, Jupyter-based slides

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Authoring Environment"
        DevContainer["DevContainer"]:::blue
    end

    subgraph "Tooling"
        Tools["Tooling Scripts"]:::blue
    end

    subgraph "Content Artifacts"
        Raw["Raw Notebooks"]:::green
        Clean["Clean Notebooks"]:::green
        Slides["Slide Decks"]:::green
        Data["XLS Data"]:::green
    end

    subgraph "Hosting & Delivery"
        Hosting["GitHub & Hosting<br/>(course.fast.ai, Pages)"]:::orange
    end

    Users["End Users"]:::orange

    DevContainer -->|"edit notebooks"| Raw
    Raw -->|"input to clean.py"| Clean
    Tools -->|"clean.py strips outputs"| Clean
    Tools -->|"download.py fetches data"| Data
    Clean -->|"publish artifacts"| Hosting
    Slides -->|"publish decks"| Hosting
    Users -->|"clone & start Codespaces"| DevContainer
    Users -->|"access materials"| Hosting

    click DevContainer "https://github.com/fastai/course22/tree/master/.devcontainer/"
    click Tools "https://github.com/fastai/course22/tree/master/tools/"
    click Clean "https://github.com/fastai/course22/tree/master/clean/"
    click Slides "https://github.com/fastai/course22/tree/master/slides/"
    click Data "https://github.com/fastai/course22/tree/master/xl/"

    classDef blue fill:#a3cef1,stroke:#0366d6,color:#000;
    classDef green fill:#c6f5c6,stroke:#28a745,color:#000;
    classDef orange fill:#ffe5b4,stroke:#d73a49,color:#000;
```
