# modesi/applylog-handshake-job-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/modesi/applylog-handshake-job-tracker
- Repository: https://github.com/modesi/applylog-handshake-job-tracker

## Overview

ApplyLog is a Chrome extension for tracking job applications in a Google Sheet. The main workflow connects a Google account, creates or reuses and styles a spreadsheet, then lets users add entries and review, search, edit, or clear jobs by stage. A separate import flow picks an existing spreadsheet, previews fuzzy column mapping, and imports its rows; form drafts are persisted across popup closures. Edges reflect the excerpts and README; the picker page and some UI details are documented but not sampled.

Main entry points: [`popup.js`](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js) (Popup controller), [`linkSpreadsheet.js`](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/linkSpreadsheet.js) (Import preview and mapping), [`popup.html`](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.html) (Popup UI), [`background.js`](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/background.js) (Auth broker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_popup["Popup experience"]
  node_popupui["Popup UI<br/>[popup.html]"]
  node_popupctrl["Popup controller<br/>[popup.js]"]
  node_auth["Auth broker<br/>[background.js]"]
end

subgraph group_sheets["Sheet tracking"]
  node_sheetsetup["Sheet setup and styling<br/>[popup.js]"]
  node_manual["Manual job entry<br/>[popup.js]"]
  node_jobtabs["Stage job views"]
  node_jobsearch["Search and filtering"]
  node_jobchanges["Edit and clear jobs"]
end

subgraph group_import["Spreadsheet import"]
  node_pickerpage["Hosted file picker<br/>[picker.html]"]
  node_importflow["Import preview and mapping<br/>[linkSpreadsheet.js]"]
  node_importwrite["Import rows<br/>[linkSpreadsheet.js]"]
end

subgraph group_persistence["Extension persistence"]
  node_pickerbridge["Picker result relay<br/>[background.js]"]
  node_drafts["Form draft persistence"]
  node_localstate[("Extension storage")]
end

node_user(("User"))
node_sheet[("Google Sheets")]
node_googleidentity["Chrome identity"]

node_user -->|"uses"| node_popupui
node_popupui -->|"drives"| node_popupctrl
node_popupctrl -->|"requests token"| node_auth
node_auth -->|"gets token"| node_googleidentity
node_popupctrl -->|"checks setup"| node_sheetsetup
node_sheetsetup -->|"creates and styles"| node_sheet
node_popupctrl -->|"submits entry"| node_manual
node_manual -->|"appends row"| node_sheet
node_jobtabs -->|"reads jobs"| node_sheet
node_jobsearch -->|"filters jobs"| node_jobtabs
node_jobchanges -->|"updates and deletes"| node_sheet
node_user -->|"chooses file"| node_pickerpage
node_pickerpage -->|"sends selection"| node_pickerbridge
node_pickerbridge -->|"stores selection"| node_localstate
node_localstate -->|"provides selection"| node_importflow
node_importflow -->|"reads source and destination"| node_sheet
node_importflow -->|"confirms mapping"| node_importwrite
node_importwrite -->|"appends imported rows"| node_sheet
node_user -->|"enters form data"| node_drafts
node_drafts -->|"saves and restores"| node_localstate

click node_popupui "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.html"
click node_popupctrl "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js"
click node_auth "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/background.js"
click node_sheetsetup "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js"
click node_manual "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js"
click node_jobtabs "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/SavedAndAppliedJobs.js"
click node_jobsearch "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/SavedAndAppliedJobs.js"
click node_jobchanges "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/SavedAndAppliedJobs.js"
click node_pickerpage "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/picker.html"
click node_pickerbridge "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/background.js"
click node_importflow "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/linkSpreadsheet.js"
click node_importwrite "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/linkSpreadsheet.js"
click node_drafts "https://github.com/modesi/applylog-handshake-job-tracker/blob/main/formDraftPersistence.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_popupui,node_popupctrl,node_auth,node_user toneBlue
class node_sheetsetup,node_manual,node_jobtabs,node_jobsearch,node_jobchanges,node_sheet toneAmber
class node_pickerpage,node_importflow,node_importwrite toneMint
class node_pickerbridge,node_drafts,node_localstate toneRose
class node_googleidentity toneIndigo
```

## Components

### Popup experience

- [Popup UI](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.html): `popup.html`
- [Popup controller](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js): `popup.js`
- [Auth broker](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/background.js): `background.js`

### Sheet tracking

- [Sheet setup and styling](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js): `popup.js`
- [Manual job entry](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/popup.js): `popup.js`
- [Stage job views](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/SavedAndAppliedJobs.js): `SavedAndAppliedJobs.js`
- [Search and filtering](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/SavedAndAppliedJobs.js): `SavedAndAppliedJobs.js`
- [Edit and clear jobs](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/SavedAndAppliedJobs.js): `SavedAndAppliedJobs.js`

### Spreadsheet import

- [Hosted file picker](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/picker.html): `picker.html`
- [Import preview and mapping](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/linkSpreadsheet.js): `linkSpreadsheet.js`
- [Import rows](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/linkSpreadsheet.js): `linkSpreadsheet.js`

### Extension persistence

- [Picker result relay](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/background.js): `background.js`
- [Form draft persistence](https://github.com/modesi/applylog-handshake-job-tracker/blob/main/formDraftPersistence.js): `formDraftPersistence.js`
- **Extension storage**

### Other components

- **User**
- **Google Sheets**
- **Chrome identity**

## Connections

- User → Popup UI: uses (evidence: `README.md`)
- Popup UI → Popup controller: drives (evidence: `README.md`)
- Popup controller → Auth broker: requests token (evidence: `popup.js`)
- Auth broker → Chrome identity: gets token (evidence: `background.js`)
- Popup controller → Sheet setup and styling: checks setup (evidence: `popup.js`)
- Sheet setup and styling → Google Sheets: creates and styles (evidence: `popup.js`)
- Popup controller → Manual job entry: submits entry (evidence: `popup.js`)
- Manual job entry → Google Sheets: appends row (evidence: `popup.js`)
- Stage job views → Google Sheets: reads jobs (evidence: `SavedAndAppliedJobs.js`)
- Search and filtering → Stage job views: filters jobs (evidence: `SavedAndAppliedJobs.js`)
- Edit and clear jobs → Google Sheets: updates and deletes (evidence: `SavedAndAppliedJobs.js`)
- User → Hosted file picker: chooses file (evidence: `README.md`)
- Hosted file picker → Picker result relay: sends selection (evidence: `README.md`)
- Picker result relay → Extension storage: stores selection (evidence: `background.js`)
- Extension storage → Import preview and mapping: provides selection (evidence: `linkSpreadsheet.js`)
- Import preview and mapping → Google Sheets: reads source and destination (evidence: `linkSpreadsheet.js`)
- Import preview and mapping → Import rows: confirms mapping (evidence: `linkSpreadsheet.js`)
- Import rows → Google Sheets: appends imported rows (evidence: `linkSpreadsheet.js`)
- User → Form draft persistence: enters form data (evidence: `formDraftPersistence.js`)
- Form draft persistence → Extension storage: saves and restores (evidence: `formDraftPersistence.js`)
