# 18f/checklistomania architecture

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

- Interactive diagram: https://gitdiagram.com/18f/checklistomania
- Repository: https://github.com/18f/checklistomania

## Overview

Checklistomania is a Node.js and AngularJS checklist manager. A member signs in through GitHub, views actionable tasks or team status, and can preview and assign a centrally defined checklist; checklist responses can determine which items are included. The sampled frontend shows requests for checklist, item, user, completion, and assignment operations, while app.js shows protected API and private-page routing. The API implementation and middleware were not excerpted, so their internal calls and persistence details are not asserted; the MongoDB and GitHub integration boundaries reflect README configuration and the sampled authentication setup.

Main entry points: [`private/js/app.js`](https://github.com/18f/checklistomania/blob/develop/private/js/app.js) (Angular application), [`api/api.js`](https://github.com/18f/checklistomania/blob/develop/api/api.js) (Checklist API), [`app.js`](https://github.com/18f/checklistomania/blob/develop/app.js) (Express server), [`lib/middleware.js`](https://github.com/18f/checklistomania/blob/develop/lib/middleware.js) (Access middleware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_server["Express server<br/>[app.js]"]
  node_browser["Angular application<br/>[app.js]"]
  node_public["Public landing page<br/>[index.html]"]
  node_privateview["Private views<br/>[index.html]"]
end

subgraph group_identity["Identity and access"]
  node_access["Access middleware<br/>[middleware.js]"]
  node_githubauth["GitHub sign-in<br/>[app.js]"]
  node_githubapi["GitHub API client<br/>[github.js]"]
  node_environment["Environment configuration<br/>[env.js]"]
end

subgraph group_checklist["Checklist workflow"]
  node_api["Checklist API<br/>[api.js]"]
  node_catalog["Checklist catalog"]
  node_assignment["Checklist assignment<br/>[app.js]"]
  node_preview["Checklist preview<br/>[app.js]"]
  node_tasks["Actionable tasks<br/>[app.js]"]
  node_completion["Item completion<br/>[app.js]"]
  node_deadlines["Relative deadlines"]
end

subgraph group_team["Team visibility"]
  node_userdirectory["Team user directory<br/>[app.js]"]
  node_teamstatus["Team checklist status<br/>[app.js]"]
  node_adduser["Add team member<br/>[app.js]"]
end

node_member(("Team member"))
node_github{{"GitHub"}}
node_mongo[("MongoDB")]

node_member -->|"visits"| node_public
node_member -->|"uses"| node_browser
node_browser -->|"requests data"| node_api
node_server -->|"routes API"| node_api
node_server -->|"applies guards"| node_access
node_server -->|"renders"| node_privateview
node_server -->|"configures sign-in"| node_githubauth
node_githubauth -->|"authenticates"| node_github
node_githubapi -->|"loads credentials"| node_environment
node_access -.->|"checks organization"| node_githubapi
node_server -->|"loads settings"| node_environment
node_browser -->|"requests checklists"| node_catalog
node_browser -->|"loads and formats"| node_tasks
node_browser -->|"assigns checklist"| node_assignment
node_assignment -->|"posts assignment"| node_api
node_browser -->|"opens preview"| node_preview
node_browser -->|"marks complete"| node_completion
node_completion -->|"requests completion"| node_api
node_browser -->|"loads users"| node_userdirectory
node_browser -->|"loads member items"| node_teamstatus
node_browser -->|"opens add-user flow"| node_adduser
node_adduser -->|"checks username"| node_api
node_api -.->|"reads and writes"| node_mongo
node_catalog -.->|"defines timing rules"| node_deadlines

click node_server "https://github.com/18f/checklistomania/blob/develop/app.js"
click node_browser "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_public "https://github.com/18f/checklistomania/blob/develop/public/index.html"
click node_privateview "https://github.com/18f/checklistomania/blob/develop/views/index.html"
click node_access "https://github.com/18f/checklistomania/blob/develop/lib/middleware.js"
click node_githubauth "https://github.com/18f/checklistomania/blob/develop/app.js"
click node_githubapi "https://github.com/18f/checklistomania/blob/develop/api/github.js"
click node_environment "https://github.com/18f/checklistomania/blob/develop/lib/env.js"
click node_api "https://github.com/18f/checklistomania/blob/develop/api/api.js"
click node_catalog "https://github.com/18f/checklistomania/tree/develop/checklists"
click node_assignment "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_preview "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_tasks "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_completion "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_deadlines "https://github.com/18f/checklistomania/tree/develop/checklists"
click node_userdirectory "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_teamstatus "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"
click node_adduser "https://github.com/18f/checklistomania/blob/develop/private/js/app.js"

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_server,node_browser,node_public,node_privateview toneBlue
class node_access,node_githubauth,node_githubapi,node_environment,node_mongo toneAmber
class node_api,node_catalog,node_assignment,node_preview,node_tasks,node_completion,node_deadlines toneMint
class node_userdirectory,node_teamstatus,node_adduser toneRose
class node_member,node_github toneIndigo
```

## Components

### Web application

- [Express server](https://github.com/18f/checklistomania/blob/develop/app.js): `app.js`
- [Angular application](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Public landing page](https://github.com/18f/checklistomania/blob/develop/public/index.html): `public/index.html`
- [Private views](https://github.com/18f/checklistomania/blob/develop/views/index.html): `views/index.html`

### Identity and access

- [Access middleware](https://github.com/18f/checklistomania/blob/develop/lib/middleware.js): `lib/middleware.js`
- [GitHub sign-in](https://github.com/18f/checklistomania/blob/develop/app.js): `app.js`
- [GitHub API client](https://github.com/18f/checklistomania/blob/develop/api/github.js): `api/github.js`
- [Environment configuration](https://github.com/18f/checklistomania/blob/develop/lib/env.js): `lib/env.js`

### Checklist workflow

- [Checklist API](https://github.com/18f/checklistomania/blob/develop/api/api.js): `api/api.js`
- [Checklist catalog](https://github.com/18f/checklistomania/tree/develop/checklists): `checklists`
- [Checklist assignment](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Checklist preview](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Actionable tasks](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Item completion](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Relative deadlines](https://github.com/18f/checklistomania/tree/develop/checklists): `checklists`

### Team visibility

- [Team user directory](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Team checklist status](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`
- [Add team member](https://github.com/18f/checklistomania/blob/develop/private/js/app.js): `private/js/app.js`

### Other components

- **Team member**
- **GitHub**
- **MongoDB**

## Connections

- Team member → Public landing page: visits (evidence: `README.md`)
- Team member → Angular application: uses (evidence: `README.md`)
- Angular application → Checklist API: requests data (evidence: `private/js/app.js`)
- Express server → Checklist API: routes API (evidence: `app.js`)
- Express server → Access middleware: applies guards (evidence: `app.js`)
- Express server → Private views: renders (evidence: `app.js`)
- Express server → GitHub sign-in: configures sign-in (evidence: `app.js`)
- GitHub sign-in → GitHub: authenticates (evidence: `app.js`)
- GitHub API client → Environment configuration: loads credentials (evidence: `api/github.js`)
- Access middleware → GitHub API client: checks organization
- Express server → Environment configuration: loads settings (evidence: `app.js`)
- Angular application → Checklist catalog: requests checklists (evidence: `private/js/app.js`)
- Angular application → Actionable tasks: loads and formats (evidence: `private/js/app.js`)
- Angular application → Checklist assignment: assigns checklist (evidence: `private/js/app.js`)
- Checklist assignment → Checklist API: posts assignment (evidence: `private/js/app.js`)
- Angular application → Checklist preview: opens preview (evidence: `private/js/app.js`)
- Angular application → Item completion: marks complete (evidence: `private/js/app.js`)
- Item completion → Checklist API: requests completion (evidence: `private/js/app.js`)
- Angular application → Team user directory: loads users (evidence: `private/js/app.js`)
- Angular application → Team checklist status: loads member items (evidence: `private/js/app.js`)
- Angular application → Add team member: opens add-user flow (evidence: `private/js/app.js`)
- Add team member → Checklist API: checks username (evidence: `private/js/app.js`)
- Checklist API → MongoDB: reads and writes
- Checklist catalog → Relative deadlines: defines timing rules (evidence: `README.md`)
