# pranavesh-n/marakadhey architecture

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

- Interactive diagram: https://gitdiagram.com/pranavesh-n/marakadhey
- Repository: https://github.com/pranavesh-n/marakadhey

## Overview

Marakadhey is a Chrome productivity extension for capturing webpage opportunities, scheduling recurring deadlines, notifying users, and optionally adding events to external calendars. The main flow is: user opens the popup, scans or enters a deadline, saves a reminder locally, receives an alarm-driven notification, then opens, snoozes, completes, or calendar-syncs it. The sampled files show popup orchestration, local storage and alarm management, background event handling, notification rendering, and calendar-link generation; some UI and scanner wiring remains unsampled.

Main entry points: [`popup.js`](https://github.com/pranavesh-n/marakadhey/blob/main/popup.js) (Popup UI), [`service-worker.js`](https://github.com/pranavesh-n/marakadhey/blob/main/service-worker.js) (Background Worker), [`storage.js`](https://github.com/pranavesh-n/marakadhey/blob/main/storage.js) (Reminder Storage), [`calendar.js`](https://github.com/pranavesh-n/marakadhey/blob/main/calendar.js) (Calendar Link Builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g1["Capture Dashboard"]
  node_popup_ui["Popup UI<br/>[popup.js]"]
  node_page_scanner["Deadline Scanner<br/>[popup.js]"]
  node_dashboard["Productivity Dashboard<br/>[popup.js]"]
end

subgraph group_g2["Reminder Scheduling"]
  node_reminder_logic["Reminder Logic<br/>[storage.js]"]
  node_recurrence_snooze["Recurrence Snooze<br/>[storage.js]"]
  node_reminder_store["Reminder Storage<br/>[storage.js]"]
end

subgraph group_g3["Background Delivery"]
  node_alarm_scheduler["Alarm Scheduler<br/>[storage.js]"]
  node_service_worker["Background Worker<br/>[service-worker.js]"]
  node_notifications["Notification Renderer<br/>[notifications.js]"]
end

subgraph group_g4["Calendar Integrations"]
  node_calendar_links["Calendar Link Builder<br/>[calendar.js]"]
end

node_user(("User"))
node_local_store[("Chrome Local Storage")]
node_chrome_alarms["Chrome Alarms"]
node_system_notifications["System Notifications"]
node_chrome_tabs["Chrome Tabs"]
node_google_calendar["Google Calendar"]
node_outlook_calendar["Microsoft Outlook"]
node_yahoo_calendar["Yahoo Calendar"]

node_user -->|"opens popup"| node_popup_ui
node_popup_ui -->|"scans page"| node_page_scanner
node_page_scanner -->|"suggests deadline"| node_popup_ui
node_popup_ui -->|"validates schedule"| node_reminder_logic
node_popup_ui -->|"saves reminder"| node_reminder_store
node_popup_ui -->|"renders dashboard"| node_dashboard
node_dashboard -->|"reads reminders"| node_reminder_store
node_reminder_logic -->|"calculates dates"| node_recurrence_snooze
node_reminder_store -->|"reads writes"| node_local_store
node_reminder_store -->|"syncs alarms"| node_alarm_scheduler
node_alarm_scheduler -->|"registers alarms"| node_chrome_alarms
node_chrome_alarms -->|"dispatches alarm"| node_service_worker
node_service_worker -->|"updates reminder"| node_reminder_store
node_service_worker -->|"shows reminder"| node_notifications
node_notifications -->|"creates alert"| node_system_notifications
node_user -->|"acts on alert"| node_system_notifications
node_system_notifications -->|"dispatches action"| node_service_worker
node_service_worker -->|"opens reminder"| node_chrome_tabs
node_popup_ui -->|"builds event link"| node_calendar_links
node_calendar_links -.->|"opens event"| node_google_calendar
node_calendar_links -.->|"opens event"| node_outlook_calendar
node_calendar_links -.->|"opens event"| node_yahoo_calendar
node_popup_ui -->|"opens calendar"| node_chrome_tabs
node_chrome_tabs -->|"reports navigation"| node_service_worker
node_service_worker -->|"confirms calendar"| node_reminder_store

click node_popup_ui "https://github.com/pranavesh-n/marakadhey/blob/main/popup.js"
click node_page_scanner "https://github.com/pranavesh-n/marakadhey/blob/main/popup.js"
click node_dashboard "https://github.com/pranavesh-n/marakadhey/blob/main/popup.js"
click node_reminder_logic "https://github.com/pranavesh-n/marakadhey/blob/main/storage.js"
click node_recurrence_snooze "https://github.com/pranavesh-n/marakadhey/blob/main/storage.js"
click node_reminder_store "https://github.com/pranavesh-n/marakadhey/blob/main/storage.js"
click node_alarm_scheduler "https://github.com/pranavesh-n/marakadhey/blob/main/storage.js"
click node_service_worker "https://github.com/pranavesh-n/marakadhey/blob/main/service-worker.js"
click node_notifications "https://github.com/pranavesh-n/marakadhey/blob/main/notifications.js"
click node_calendar_links "https://github.com/pranavesh-n/marakadhey/blob/main/calendar.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_page_scanner,node_dashboard,node_user toneBlue
class node_reminder_logic,node_recurrence_snooze,node_reminder_store,node_local_store toneAmber
class node_alarm_scheduler,node_service_worker,node_notifications toneMint
class node_calendar_links toneRose
class node_chrome_alarms,node_system_notifications,node_chrome_tabs,node_google_calendar,node_outlook_calendar,node_yahoo_calendar toneIndigo
```

## Components

### Capture Dashboard

- [Popup UI](https://github.com/pranavesh-n/marakadhey/blob/main/popup.js): `popup.js`
- [Deadline Scanner](https://github.com/pranavesh-n/marakadhey/blob/main/popup.js): `popup.js`
- [Productivity Dashboard](https://github.com/pranavesh-n/marakadhey/blob/main/popup.js): `popup.js`

### Reminder Scheduling

- [Reminder Logic](https://github.com/pranavesh-n/marakadhey/blob/main/storage.js): `storage.js`
- [Recurrence Snooze](https://github.com/pranavesh-n/marakadhey/blob/main/storage.js): `storage.js`
- [Reminder Storage](https://github.com/pranavesh-n/marakadhey/blob/main/storage.js): `storage.js`

### Background Delivery

- [Alarm Scheduler](https://github.com/pranavesh-n/marakadhey/blob/main/storage.js): `storage.js`
- [Background Worker](https://github.com/pranavesh-n/marakadhey/blob/main/service-worker.js): `service-worker.js`
- [Notification Renderer](https://github.com/pranavesh-n/marakadhey/blob/main/notifications.js): `notifications.js`

### Calendar Integrations

- [Calendar Link Builder](https://github.com/pranavesh-n/marakadhey/blob/main/calendar.js): `calendar.js`

### Other components

- **User**
- **Chrome Local Storage**
- **Chrome Alarms**
- **System Notifications**
- **Chrome Tabs**
- **Google Calendar**
- **Microsoft Outlook**
- **Yahoo Calendar**

## Connections

- User → Popup UI: opens popup
- Popup UI → Deadline Scanner: scans page
- Deadline Scanner → Popup UI: suggests deadline
- Popup UI → Reminder Logic: validates schedule
- Popup UI → Reminder Storage: saves reminder
- Popup UI → Productivity Dashboard: renders dashboard
- Productivity Dashboard → Reminder Storage: reads reminders
- Reminder Logic → Recurrence Snooze: calculates dates
- Reminder Storage → Chrome Local Storage: reads writes
- Reminder Storage → Alarm Scheduler: syncs alarms
- Alarm Scheduler → Chrome Alarms: registers alarms
- Chrome Alarms → Background Worker: dispatches alarm
- Background Worker → Reminder Storage: updates reminder
- Background Worker → Notification Renderer: shows reminder
- Notification Renderer → System Notifications: creates alert
- User → System Notifications: acts on alert
- System Notifications → Background Worker: dispatches action
- Background Worker → Chrome Tabs: opens reminder
- Popup UI → Calendar Link Builder: builds event link
- Calendar Link Builder → Google Calendar: opens event
- Calendar Link Builder → Microsoft Outlook: opens event
- Calendar Link Builder → Yahoo Calendar: opens event
- Popup UI → Chrome Tabs: opens calendar
- Chrome Tabs → Background Worker: reports navigation
- Background Worker → Reminder Storage: confirms calendar
