# shravancreddy/ttdformsfiller architecture

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

- Interactive diagram: https://gitdiagram.com/shravancreddy/ttdformsfiller
- Repository: https://github.com/shravancreddy/ttdformsfiller

## Overview

TTD Form Helper is a cross-browser extension that stores pilgrim and booking details, validates them, and fills supported Tirumala Tirupati Devasthanams booking forms. The main workflow starts in the popup: users manage pilgrim, seva, group, senior, or Srivani details, then request autofill on the active supported page. Shared modules provide persistence, optional encryption, validation, localization, and messaging; the content script performs page filling. The README was empty, so capabilities and relationships are based on the tree and indexed source references; links to unsampled runtime behavior are omitted or marked unverified.

Main entry points: [`ttd-form-helper/shared/secureStore.js`](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/secureStore.js) (Secure storage), [`ttd-form-helper/popup/popup.js`](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/popup.js) (Popup shell), [`ttd-form-helper/popup/tabs/pilgrimTab.js`](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/pilgrimTab.js) (Pilgrim booking), [`ttd-form-helper/popup/tabs/groupTab.js`](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/groupTab.js) (Group seva)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_popup["Popup workflows"]
  node_popup_ui["Popup shell<br/>[popup.js]"]
  node_pilgrim["Pilgrim booking<br/>[pilgrimTab.js]"]
  node_group_seva["Group seva<br/>[groupTab.js]"]
  node_seva["Seva booking<br/>[sevaTab.js]"]
  node_senior["Senior booking<br/>[seniorTab.js]"]
  node_srivani["Srivani booking<br/>[srivaniTab.js]"]
  node_vault_picker["Vault picker<br/>[vaultPicker.js]"]
  node_toast["Toast feedback<br/>[toast.js]"]
  node_options["Settings<br/>[options.js]"]
end

subgraph group_forms["Form and validation"]
  node_seva_fields["Seva fields<br/>[sevaFields.js]"]
  node_pilgrim_form["Pilgrim form<br/>[pilgrimForm.js]"]
  node_form_data["Form reference data<br/>[formData.js]"]
  node_validation["Field validation<br/>[validation.js]"]
  node_form_validation["Validation feedback<br/>[formValidation.js]"]
end

subgraph group_shared["Shared services"]
  node_storage[("Local storage<br/>[storage.js]")]
  node_secure_store["Secure storage<br/>[secureStore.js]"]
  node_crypto["Encryption<br/>[crypto.js]"]
  node_i18n["Localization<br/>[i18n.js]"]
  node_browser["Browser API shim<br/>[browser.js]"]
end

subgraph group_extension["Browser integration"]
  node_messaging["Tab messaging<br/>[messaging.js]"]
  node_background["Background worker<br/>[background.js]"]
  node_autofill["Page autofill<br/>[autofill.js]"]
  node_page_bridge["Page bridge<br/>[page-bridge.js]"]
end

node_user(("Extension user"))
node_booking_page(("TTD booking page"))

node_user -->|"opens"| node_popup_ui
node_popup_ui -->|"renders"| node_pilgrim
node_popup_ui -->|"renders"| node_group_seva
node_popup_ui -->|"renders"| node_seva
node_popup_ui -->|"renders"| node_senior
node_popup_ui -->|"renders"| node_srivani
node_pilgrim -->|"sends fill"| node_messaging
node_pilgrim -->|"uses form"| node_pilgrim_form
node_pilgrim -->|"checks records"| node_validation
node_pilgrim -->|"shows results"| node_toast
node_group_seva -->|"renders fields"| node_seva_fields
node_group_seva -->|"uses lists"| node_form_data
node_group_seva -->|"checks entries"| node_validation
node_seva -->|"renders fields"| node_seva_fields
node_seva -->|"uses lists"| node_form_data
node_senior -->|"checks records"| node_validation
node_srivani -->|"uses picker"| node_vault_picker
node_pilgrim_form -->|"validates live"| node_form_validation
node_pilgrim_form -->|"checks record"| node_validation
node_form_validation -->|"paints results"| node_validation
node_form_validation -->|"translates feedback"| node_i18n
node_seva_fields -->|"translates labels"| node_i18n
node_pilgrim -->|"reads and writes"| node_secure_store
node_group_seva -->|"reads and writes"| node_secure_store
node_seva -->|"reads and writes"| node_secure_store
node_vault_picker -->|"reads vault"| node_secure_store
node_options -->|"configures vault"| node_secure_store
node_options -->|"reads settings"| node_storage
node_secure_store -->|"reads and writes"| node_storage
node_secure_store -->|"encrypts values"| node_crypto
node_storage -->|"uses API"| node_browser
node_i18n -->|"loads preference"| node_storage
node_i18n -->|"loads messages"| node_browser
node_messaging -->|"queries tabs"| node_browser
node_messaging -->|"sends fill request"| node_booking_page
node_autofill -.->|"fills forms"| node_booking_page
node_page_bridge -.->|"bridges page"| node_booking_page
node_background -->|"uses vault"| node_secure_store
node_messaging -.->|"dispatches request"| node_autofill

click node_popup_ui "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/popup.js"
click node_pilgrim "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/pilgrimTab.js"
click node_group_seva "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/groupTab.js"
click node_seva "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/sevaTab.js"
click node_senior "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/seniorTab.js"
click node_srivani "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/srivaniTab.js"
click node_vault_picker "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/vaultPicker.js"
click node_seva_fields "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/sevaFields.js"
click node_pilgrim_form "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/pilgrimForm.js"
click node_form_data "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/formData.js"
click node_validation "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/validation.js"
click node_form_validation "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/formValidation.js"
click node_toast "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/toast.js"
click node_options "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/options/options.js"
click node_storage "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/storage.js"
click node_secure_store "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/secureStore.js"
click node_crypto "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/crypto.js"
click node_i18n "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/i18n.js"
click node_browser "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/browser.js"
click node_messaging "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/messaging.js"
click node_background "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/background.js"
click node_autofill "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/content/autofill.js"
click node_page_bridge "https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/content/page-bridge.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_popup_ui,node_pilgrim,node_group_seva,node_seva,node_senior,node_srivani,node_vault_picker,node_toast,node_options,node_user toneBlue
class node_seva_fields,node_pilgrim_form,node_form_data,node_validation,node_form_validation toneAmber
class node_storage,node_secure_store,node_crypto,node_i18n,node_browser toneMint
class node_messaging,node_background,node_autofill,node_page_bridge toneRose
class node_booking_page toneIndigo
```

## Components

### Popup workflows

- [Popup shell](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/popup.js): `ttd-form-helper/popup/popup.js`
- [Pilgrim booking](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/pilgrimTab.js): `ttd-form-helper/popup/tabs/pilgrimTab.js`
- [Group seva](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/groupTab.js): `ttd-form-helper/popup/tabs/groupTab.js`
- [Seva booking](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/sevaTab.js): `ttd-form-helper/popup/tabs/sevaTab.js`
- [Senior booking](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/seniorTab.js): `ttd-form-helper/popup/tabs/seniorTab.js`
- [Srivani booking](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/srivaniTab.js): `ttd-form-helper/popup/tabs/srivaniTab.js`
- [Vault picker](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/vaultPicker.js): `ttd-form-helper/popup/tabs/vaultPicker.js`
- [Toast feedback](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/toast.js): `ttd-form-helper/popup/toast.js`
- [Settings](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/options/options.js): `ttd-form-helper/options/options.js`

### Form and validation

- [Seva fields](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/popup/tabs/sevaFields.js): `ttd-form-helper/popup/tabs/sevaFields.js`
- [Pilgrim form](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/pilgrimForm.js): `ttd-form-helper/shared/pilgrimForm.js`
- [Form reference data](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/formData.js): `ttd-form-helper/shared/formData.js`
- [Field validation](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/validation.js): `ttd-form-helper/shared/validation.js`
- [Validation feedback](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/formValidation.js): `ttd-form-helper/shared/formValidation.js`

### Shared services

- [Local storage](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/storage.js): `ttd-form-helper/shared/storage.js`
- [Secure storage](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/secureStore.js): `ttd-form-helper/shared/secureStore.js`
- [Encryption](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/crypto.js): `ttd-form-helper/shared/crypto.js`
- [Localization](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/i18n.js): `ttd-form-helper/shared/i18n.js`
- [Browser API shim](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/browser.js): `ttd-form-helper/shared/browser.js`

### Browser integration

- [Tab messaging](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/shared/messaging.js): `ttd-form-helper/shared/messaging.js`
- [Background worker](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/background.js): `ttd-form-helper/background.js`
- [Page autofill](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/content/autofill.js): `ttd-form-helper/content/autofill.js`
- [Page bridge](https://github.com/shravancreddy/ttdformsfiller/blob/main/ttd-form-helper/content/page-bridge.js): `ttd-form-helper/content/page-bridge.js`

### Other components

- **Extension user**
- **TTD booking page**

## Connections

- Extension user → Popup shell: opens
- Popup shell → Pilgrim booking: renders (evidence: `ttd-form-helper/popup/popup.js`)
- Popup shell → Group seva: renders (evidence: `ttd-form-helper/popup/popup.js`)
- Popup shell → Seva booking: renders (evidence: `ttd-form-helper/popup/popup.js`)
- Popup shell → Senior booking: renders (evidence: `ttd-form-helper/popup/popup.js`)
- Popup shell → Srivani booking: renders (evidence: `ttd-form-helper/popup/popup.js`)
- Pilgrim booking → Tab messaging: sends fill (evidence: `ttd-form-helper/popup/tabs/pilgrimTab.js`)
- Pilgrim booking → Pilgrim form: uses form (evidence: `ttd-form-helper/popup/tabs/pilgrimTab.js`)
- Pilgrim booking → Field validation: checks records (evidence: `ttd-form-helper/popup/tabs/pilgrimTab.js`)
- Pilgrim booking → Toast feedback: shows results (evidence: `ttd-form-helper/popup/tabs/pilgrimTab.js`)
- Group seva → Seva fields: renders fields (evidence: `ttd-form-helper/popup/tabs/groupTab.js`)
- Group seva → Form reference data: uses lists (evidence: `ttd-form-helper/popup/tabs/groupTab.js`)
- Group seva → Field validation: checks entries (evidence: `ttd-form-helper/popup/tabs/groupTab.js`)
- Seva booking → Seva fields: renders fields (evidence: `ttd-form-helper/popup/tabs/sevaTab.js`)
- Seva booking → Form reference data: uses lists (evidence: `ttd-form-helper/popup/tabs/sevaTab.js`)
- Senior booking → Field validation: checks records (evidence: `ttd-form-helper/popup/tabs/seniorTab.js`)
- Srivani booking → Vault picker: uses picker (evidence: `ttd-form-helper/popup/tabs/srivaniTab.js`)
- Pilgrim form → Validation feedback: validates live (evidence: `ttd-form-helper/shared/pilgrimForm.js`)
- Pilgrim form → Field validation: checks record (evidence: `ttd-form-helper/shared/pilgrimForm.js`)
- Validation feedback → Field validation: paints results (evidence: `ttd-form-helper/shared/formValidation.js`)
- Validation feedback → Localization: translates feedback (evidence: `ttd-form-helper/shared/formValidation.js`)
- Seva fields → Localization: translates labels (evidence: `ttd-form-helper/popup/tabs/sevaFields.js`)
- Pilgrim booking → Secure storage: reads and writes (evidence: `ttd-form-helper/popup/tabs/pilgrimTab.js`)
- Group seva → Secure storage: reads and writes (evidence: `ttd-form-helper/popup/tabs/groupTab.js`)
- Seva booking → Secure storage: reads and writes (evidence: `ttd-form-helper/popup/tabs/sevaTab.js`)
- Vault picker → Secure storage: reads vault (evidence: `ttd-form-helper/popup/tabs/vaultPicker.js`)
- Settings → Secure storage: configures vault (evidence: `ttd-form-helper/options/options.js`)
- Settings → Local storage: reads settings (evidence: `ttd-form-helper/options/options.js`)
- Secure storage → Local storage: reads and writes (evidence: `ttd-form-helper/shared/secureStore.js`)
- Secure storage → Encryption: encrypts values (evidence: `ttd-form-helper/shared/secureStore.js`)
- Local storage → Browser API shim: uses API (evidence: `ttd-form-helper/shared/storage.js`)
- Localization → Local storage: loads preference (evidence: `ttd-form-helper/shared/i18n.js`)
- Localization → Browser API shim: loads messages (evidence: `ttd-form-helper/shared/i18n.js`)
- Tab messaging → Browser API shim: queries tabs (evidence: `ttd-form-helper/shared/messaging.js`)
- Tab messaging → TTD booking page: sends fill request (evidence: `ttd-form-helper/shared/messaging.js`)
- Page autofill → TTD booking page: fills forms
- Page bridge → TTD booking page: bridges page
- Background worker → Secure storage: uses vault (evidence: `ttd-form-helper/background.js`)
- Tab messaging → Page autofill: dispatches request
