# davekats/canvas-student-data-export architecture

> Architecture diagram of the GitHub repository davekats/canvas-student-data-export, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/davekats/canvas-student-data-export
- Repository: https://github.com/davekats/canvas-student-data-export

## Overview

This is a command-line Canvas student-data exporter. A student supplies Canvas credentials and an output location; the exporter retrieves course content, organizes it by term and course, and writes JSON plus downloaded files. Optional SingleFile capture adds HTML snapshots using authenticated browser cookies. The sampled source is partial, so the feature branches are grounded in the README; detailed call wiring beyond the visible attachment download and SingleFile helper is not asserted.

Main entry points: [`export.py`](https://github.com/davekats/canvas-student-data-export/blob/master/export.py) (Export runner), [`singlefile.py`](https://github.com/davekats/canvas-student-data-export/blob/master/singlefile.py) (SingleFile helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Export setup"]
  node_runner["Export runner<br/>[export.py]"]
  node_credentials["Credentials"]
end

subgraph group_content["Course content"]
  node_assignments["Assignments<br/>[export.py]"]
  node_announcements["Announcements<br/>[export.py]"]
  node_discussions["Discussions<br/>[export.py]"]
  node_pages["Course pages<br/>[export.py]"]
  node_modules["Course modules<br/>[export.py]"]
  node_files["Course files<br/>[export.py]"]
  node_attachments["Attachments<br/>[export.py]"]
end

subgraph group_output["Export artifacts"]
  node_json["JSON exports<br/>[export.py]"]
  node_organized["Term/course folders<br/>[export.py]"]
  node_snapshot_files["HTML snapshots<br/>[export.py]"]
end

subgraph group_capture["HTML snapshots"]
  node_snapshots["Snapshot capture<br/>[export.py]"]
  node_singlefile["SingleFile helper<br/>[singlefile.py]"]
end

node_student(("Student"))
node_canvas["Canvas LMS"]

node_student -->|"runs export"| node_runner
node_student -->|"provides credentials"| node_credentials
node_runner -->|"reads config"| node_credentials
node_runner -->|"requests course data"| node_canvas
node_canvas -->|"returns course data"| node_runner
node_runner -->|"processes"| node_assignments
node_runner -->|"processes"| node_announcements
node_runner -->|"processes"| node_discussions
node_runner -->|"processes"| node_pages
node_runner -->|"processes"| node_modules
node_runner -->|"downloads"| node_files
node_runner -->|"downloads"| node_attachments
node_runner -->|"writes JSON"| node_json
node_runner -->|"organizes output"| node_organized
node_runner -.->|"optionally captures"| node_snapshots
node_snapshots -.->|"calls helper"| node_singlefile
node_singlefile -.->|"writes HTML"| node_snapshot_files
node_runner -.->|"writes snapshots"| node_snapshot_files

click node_runner "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_assignments "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_announcements "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_discussions "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_pages "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_modules "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_files "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_attachments "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_json "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_organized "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_snapshots "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"
click node_singlefile "https://github.com/davekats/canvas-student-data-export/blob/master/singlefile.py"
click node_snapshot_files "https://github.com/davekats/canvas-student-data-export/blob/master/export.py"

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_runner,node_credentials toneBlue
class node_assignments,node_announcements,node_discussions,node_pages,node_modules,node_files,node_attachments toneAmber
class node_json,node_organized,node_snapshot_files toneMint
class node_snapshots,node_singlefile toneRose
class node_student,node_canvas toneIndigo
```

## Components

### Export setup

- [Export runner](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- **Credentials**

### Course content

- [Assignments](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Announcements](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Discussions](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Course pages](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Course modules](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Course files](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Attachments](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`

### Export artifacts

- [JSON exports](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [Term/course folders](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [HTML snapshots](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`

### HTML snapshots

- [Snapshot capture](https://github.com/davekats/canvas-student-data-export/blob/master/export.py): `export.py`
- [SingleFile helper](https://github.com/davekats/canvas-student-data-export/blob/master/singlefile.py): `singlefile.py`

### Other components

- **Student**
- **Canvas LMS**

## Connections

- Student → Export runner: runs export
- Student → Credentials: provides credentials
- Export runner → Credentials: reads config
- Export runner → Canvas LMS: requests course data
- Canvas LMS → Export runner: returns course data
- Export runner → Assignments: processes
- Export runner → Announcements: processes
- Export runner → Discussions: processes
- Export runner → Course pages: processes
- Export runner → Course modules: processes
- Export runner → Course files: downloads
- Export runner → Attachments: downloads
- Export runner → JSON exports: writes JSON
- Export runner → Term/course folders: organizes output
- Export runner → Snapshot capture: optionally captures
- Snapshot capture → SingleFile helper: calls helper
- SingleFile helper → HTML snapshots: writes HTML
- Export runner → HTML snapshots: writes snapshots
