# mitlibraries/thing architecture

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

- Interactive diagram: https://gitdiagram.com/mitlibraries/thing
- Repository: https://github.com/mitlibraries/thing

## Overview

ETD is a Rails application for electronic thesis deposit, processing, publication, and preservation. Students submit thesis metadata and files; registrar imports and department transfers support batch intake; library staff review and process records before publication and downstream exports. The README documents the major integration workflows, while the excerpts show the thesis controller’s publication-queue dispatch and route mappings. Several subsystem implementations were not sampled, so documented capability links use the README as evidence rather than implying inspected call details.

Main entry points: [`app/controllers/thesis_controller.rb`](https://github.com/mitlibraries/thing/blob/main/app/controllers/thesis_controller.rb) (Thesis metadata), [`config/routes.rb`](https://github.com/mitlibraries/thing/blob/main/config/routes.rb) (Web routes), [`app/dashboards/thesis_dashboard.rb`](https://github.com/mitlibraries/thing/blob/main/app/dashboards/thesis_dashboard.rb) (Processing dashboard), [`app/controllers/transfer_controller.rb`](https://github.com/mitlibraries/thing/blob/main/app/controllers/transfer_controller.rb) (Batch file transfer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Deposit and intake"]
  node_thesis_submit["Thesis metadata"]
  node_transfer_upload["Batch file transfer"]
  node_registrar_import["Registrar import"]
  node_thesis_records[("Thesis records<br/>[thesis.rb]")]
  node_file_store[("File attachments")]
end

subgraph group_operations["Staff operations"]
  node_staff_review["Processing dashboard"]
  node_holds["Thesis holds<br/>[hold_dashboard.rb]"]
  node_reports["Staff reporting"]
  node_admin["Admin management"]
end

subgraph group_delivery["Publication and preservation"]
  node_dspace_prep["Publication preparation"]
  node_dspace_publish["DSpace publication"]
  node_publication_results["Publication results"]
  node_preservation["Archivematica preparation"]
  node_catalog_export["MARC catalog export<br/>[marc_export_job.rb]"]
  node_proquest_export["ProQuest export"]
  node_sqs["AWS SQS"]
end

subgraph group_platform["Application platform"]
  node_auth["Authentication"]
  node_routes["Web routes<br/>[routes.rb]"]
end

node_student(("Student"))
node_registrar(("Registrar staff"))
node_department(("Department admin"))
node_library(("Library staff"))

node_student -->|"submits metadata"| node_thesis_submit
node_department -->|"uploads files"| node_transfer_upload
node_registrar -->|"starts batch import"| node_registrar_import
node_thesis_submit -->|"saves metadata"| node_thesis_records
node_transfer_upload -->|"transfers files"| node_file_store
node_registrar_import -->|"loads thesis metadata"| node_thesis_records
node_library -->|"reviews records"| node_staff_review
node_staff_review -->|"processes theses"| node_thesis_records
node_library -->|"manages holds"| node_holds
node_library -->|"requests reports"| node_reports
node_library -.->|"administers records"| node_admin
node_thesis_submit -->|"queues publication"| node_dspace_prep
node_dspace_prep -.->|"prepares publication"| node_dspace_publish
node_dspace_publish -->|"publishes through"| node_sqs
node_sqs -->|"delivers results"| node_publication_results
node_staff_review -.->|"starts preservation"| node_preservation
node_staff_review -.->|"exports metadata"| node_catalog_export
node_thesis_submit -->|"queues export"| node_proquest_export
node_student -->|"authenticates"| node_auth
node_routes -->|"routes requests"| node_thesis_submit
node_routes -->|"routes requests"| node_transfer_upload
node_routes -->|"routes registrar requests"| node_registrar_import
node_routes -->|"routes reports"| node_reports

click node_thesis_submit "https://github.com/mitlibraries/thing/blob/main/app/controllers/thesis_controller.rb"
click node_transfer_upload "https://github.com/mitlibraries/thing/blob/main/app/controllers/transfer_controller.rb"
click node_registrar_import "https://github.com/mitlibraries/thing/blob/main/app/jobs/registrar_import_job.rb"
click node_thesis_records "https://github.com/mitlibraries/thing/blob/main/app/models/thesis.rb"
click node_file_store "https://github.com/mitlibraries/thing/blob/main/app/models/active_storage_attachment_extension.rb"
click node_staff_review "https://github.com/mitlibraries/thing/blob/main/app/dashboards/thesis_dashboard.rb"
click node_holds "https://github.com/mitlibraries/thing/blob/main/app/dashboards/hold_dashboard.rb"
click node_reports "https://github.com/mitlibraries/thing/blob/main/app/controllers/report_controller.rb"
click node_admin "https://github.com/mitlibraries/thing/blob/main/app/controllers/admin/application_controller.rb"
click node_dspace_prep "https://github.com/mitlibraries/thing/blob/main/app/jobs/dspace_publication_prep_job.rb"
click node_dspace_publish "https://github.com/mitlibraries/thing/blob/main/app/jobs/dspace_publication_job.rb"
click node_publication_results "https://github.com/mitlibraries/thing/blob/main/app/jobs/dspace_publication_results_job.rb"
click node_preservation "https://github.com/mitlibraries/thing/blob/main/app/jobs/preservation_submission_job.rb"
click node_catalog_export "https://github.com/mitlibraries/thing/blob/main/app/jobs/marc_export_job.rb"
click node_proquest_export "https://github.com/mitlibraries/thing/blob/main/app/jobs/proquest_export_job.rb"
click node_auth "https://github.com/mitlibraries/thing/blob/main/app/controllers/users/omniauth_callbacks_controller.rb"
click node_routes "https://github.com/mitlibraries/thing/blob/main/config/routes.rb"

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_thesis_submit,node_transfer_upload,node_registrar_import,node_thesis_records,node_file_store toneBlue
class node_staff_review,node_holds,node_reports,node_admin toneAmber
class node_dspace_prep,node_dspace_publish,node_publication_results,node_preservation,node_catalog_export,node_proquest_export,node_sqs toneMint
class node_auth,node_routes toneRose
class node_student,node_registrar,node_department,node_library toneIndigo
```

## Components

### Deposit and intake

- [Thesis metadata](https://github.com/mitlibraries/thing/blob/main/app/controllers/thesis_controller.rb): `app/controllers/thesis_controller.rb`
- [Batch file transfer](https://github.com/mitlibraries/thing/blob/main/app/controllers/transfer_controller.rb): `app/controllers/transfer_controller.rb`
- [Registrar import](https://github.com/mitlibraries/thing/blob/main/app/jobs/registrar_import_job.rb): `app/jobs/registrar_import_job.rb`
- [Thesis records](https://github.com/mitlibraries/thing/blob/main/app/models/thesis.rb): `app/models/thesis.rb`
- [File attachments](https://github.com/mitlibraries/thing/blob/main/app/models/active_storage_attachment_extension.rb): `app/models/active_storage_attachment_extension.rb`

### Staff operations

- [Processing dashboard](https://github.com/mitlibraries/thing/blob/main/app/dashboards/thesis_dashboard.rb): `app/dashboards/thesis_dashboard.rb`
- [Thesis holds](https://github.com/mitlibraries/thing/blob/main/app/dashboards/hold_dashboard.rb): `app/dashboards/hold_dashboard.rb`
- [Staff reporting](https://github.com/mitlibraries/thing/blob/main/app/controllers/report_controller.rb): `app/controllers/report_controller.rb`
- [Admin management](https://github.com/mitlibraries/thing/blob/main/app/controllers/admin/application_controller.rb): `app/controllers/admin/application_controller.rb`

### Publication and preservation

- [Publication preparation](https://github.com/mitlibraries/thing/blob/main/app/jobs/dspace_publication_prep_job.rb): `app/jobs/dspace_publication_prep_job.rb`
- [DSpace publication](https://github.com/mitlibraries/thing/blob/main/app/jobs/dspace_publication_job.rb): `app/jobs/dspace_publication_job.rb`
- [Publication results](https://github.com/mitlibraries/thing/blob/main/app/jobs/dspace_publication_results_job.rb): `app/jobs/dspace_publication_results_job.rb`
- [Archivematica preparation](https://github.com/mitlibraries/thing/blob/main/app/jobs/preservation_submission_job.rb): `app/jobs/preservation_submission_job.rb`
- [MARC catalog export](https://github.com/mitlibraries/thing/blob/main/app/jobs/marc_export_job.rb): `app/jobs/marc_export_job.rb`
- [ProQuest export](https://github.com/mitlibraries/thing/blob/main/app/jobs/proquest_export_job.rb): `app/jobs/proquest_export_job.rb`
- **AWS SQS**

### Application platform

- [Authentication](https://github.com/mitlibraries/thing/blob/main/app/controllers/users/omniauth_callbacks_controller.rb): `app/controllers/users/omniauth_callbacks_controller.rb`
- [Web routes](https://github.com/mitlibraries/thing/blob/main/config/routes.rb): `config/routes.rb`

### Other components

- **Student**
- **Registrar staff**
- **Department admin**
- **Library staff**

## Connections

- Student → Thesis metadata: submits metadata
- Department admin → Batch file transfer: uploads files
- Registrar staff → Registrar import: starts batch import
- Thesis metadata → Thesis records: saves metadata (evidence: `app/controllers/thesis_controller.rb`)
- Batch file transfer → File attachments: transfers files
- Registrar import → Thesis records: loads thesis metadata
- Library staff → Processing dashboard: reviews records
- Processing dashboard → Thesis records: processes theses
- Library staff → Thesis holds: manages holds
- Library staff → Staff reporting: requests reports
- Library staff → Admin management: administers records
- Thesis metadata → Publication preparation: queues publication (evidence: `app/controllers/thesis_controller.rb`)
- Publication preparation → DSpace publication: prepares publication
- DSpace publication → AWS SQS: publishes through
- AWS SQS → Publication results: delivers results
- Processing dashboard → Archivematica preparation: starts preservation
- Processing dashboard → MARC catalog export: exports metadata
- Thesis metadata → ProQuest export: queues export (evidence: `app/controllers/thesis_controller.rb`)
- Student → Authentication: authenticates (evidence: `app/controllers/users/omniauth_callbacks_controller.rb`)
- Web routes → Thesis metadata: routes requests (evidence: `config/routes.rb`)
- Web routes → Batch file transfer: routes requests (evidence: `config/routes.rb`)
- Web routes → Registrar import: routes registrar requests (evidence: `config/routes.rb`)
- Web routes → Staff reporting: routes reports (evidence: `config/routes.rb`)
