# yazmani/pushpilot architecture

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

- Interactive diagram: https://gitdiagram.com/yazmani/pushpilot
- Repository: https://github.com/yazmani/pushpilot

## Overview

Pushpilot is a browser extension for sending and receiving Pushbullet content, with a dashboard for feeds, Android notification mirroring, and SMS. The main workflow runs from the browser UI through RPC dispatch in the background, into account/API services, and back into extension storage or browser notifications. The graph also preserves the documented feed, phone, SMS, settings, and dashboard capabilities. Some feature implementations were not sampled; those nodes use exact paths from the tree, and their links are shown only where the README or source index supports them.

Main entry points: [`src/background/router.ts`](https://github.com/yazmani/pushpilot/blob/main/src/background/router.ts) (RPC router), [`src/ui/app/App.tsx`](https://github.com/yazmani/pushpilot/blob/main/src/ui/app/App.tsx) (App shell), [`src/core/messaging/rpc.ts`](https://github.com/yazmani/pushpilot/blob/main/src/core/messaging/rpc.ts) (RPC messaging), [`src/core/storage/store.ts`](https://github.com/yazmani/pushpilot/blob/main/src/core/storage/store.ts) (Extension storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser interface"]
  node_app["App shell<br/>[App.tsx]"]
  node_send["Send composer<br/>[SendView.tsx]"]
  node_auth["Sign-in<br/>[SignIn.tsx]"]
  node_feed["Feed and chat<br/>[FeedView.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_phone["Phone mirror<br/>[PhoneView.tsx]"]
  node_sms["SMS conversations<br/>[SmsView.tsx]"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
end

subgraph group_bg["Background services"]
  node_background["Background entry<br/>[index.ts]"]
  node_router["RPC router<br/>[router.ts]"]
  node_account["Account and auth<br/>[account.ts]"]
  node_stream["Live stream<br/>[stream.ts]"]
  node_pushes["Push sync<br/>[pushes.ts]"]
  node_outbox["Send queue<br/>[outbox.ts]"]
  node_mirror["Notification mirror<br/>[mirror.ts]"]
  node_smsservice["SMS service<br/>[sms.ts]"]
  node_previews["Preview fetch<br/>[previews.ts]"]
end

subgraph group_core["Shared core"]
  node_rpc["RPC messaging<br/>[rpc.ts]"]
  node_storage[("Extension storage<br/>[store.ts]")]
  node_links["Link previews<br/>[links.ts]"]
  node_api["Pushbullet client<br/>[client.ts]"]
end

subgraph group_platform["Browser integration"]
  node_notifications["Desktop notifications<br/>[notifications.ts]"]
  node_offscreen["Offscreen media<br/>[offscreen.ts]"]
  node_windows["Browser windows<br/>[windows.ts]"]
end

node_user(("Browser user"))
node_pb{{"Pushbullet service"}}

node_user -->|"opens"| node_app
node_app -->|"renders"| node_send
node_app -->|"renders"| node_auth
node_app -->|"renders"| node_feed
node_app -->|"renders"| node_phone
node_app -->|"renders"| node_sms
node_app -->|"renders"| node_dashboard
node_send -->|"requests"| node_rpc
node_auth -->|"requests"| node_rpc
node_feed -->|"requests"| node_rpc
node_settings -->|"requests"| node_rpc
node_rpc -->|"dispatches"| node_router
node_background -->|"registers"| node_router
node_router -->|"dispatches"| node_account
node_router -->|"dispatches"| node_pushes
node_router -->|"dispatches"| node_outbox
node_router -->|"dispatches"| node_mirror
node_router -->|"dispatches"| node_smsservice
node_router -->|"dispatches"| node_previews
node_account -->|"reads and writes"| node_storage
node_account -->|"uses"| node_api
node_api -->|"calls API"| node_pb
node_stream -->|"opens stream"| node_api
node_stream -->|"dispatches events"| node_pushes
node_stream -->|"dispatches events"| node_mirror
node_stream -->|"dispatches events"| node_smsservice
node_pushes -->|"stores pushes"| node_storage
node_pushes -->|"shows alerts"| node_notifications
node_pushes -->|"opens links"| node_windows
node_outbox -->|"sends pushes"| node_api
node_outbox -->|"persists queue"| node_storage
node_mirror -->|"shows mirror"| node_notifications
node_mirror -->|"uses media"| node_offscreen
node_smsservice -->|"uses"| node_api
node_smsservice -->|"stores SMS"| node_storage
node_previews -->|"caches previews"| node_storage
node_previews -->|"parses links"| node_links
node_notifications -->|"plays sound"| node_offscreen
node_rpc -->|"shared state"| node_storage
node_user -->|"configures"| node_settings

click node_app "https://github.com/yazmani/pushpilot/blob/main/src/ui/app/App.tsx"
click node_send "https://github.com/yazmani/pushpilot/blob/main/src/ui/features/send/SendView.tsx"
click node_auth "https://github.com/yazmani/pushpilot/blob/main/src/ui/features/auth/SignIn.tsx"
click node_feed "https://github.com/yazmani/pushpilot/blob/main/src/ui/features/feed/FeedView.tsx"
click node_dashboard "https://github.com/yazmani/pushpilot/blob/main/src/ui/dashboard/Dashboard.tsx"
click node_phone "https://github.com/yazmani/pushpilot/blob/main/src/ui/features/phone/PhoneView.tsx"
click node_sms "https://github.com/yazmani/pushpilot/blob/main/src/ui/features/sms/SmsView.tsx"
click node_settings "https://github.com/yazmani/pushpilot/blob/main/src/ui/features/settings/SettingsPage.tsx"
click node_rpc "https://github.com/yazmani/pushpilot/blob/main/src/core/messaging/rpc.ts"
click node_storage "https://github.com/yazmani/pushpilot/blob/main/src/core/storage/store.ts"
click node_links "https://github.com/yazmani/pushpilot/blob/main/src/core/utils/links.ts"
click node_api "https://github.com/yazmani/pushpilot/blob/main/src/core/pushbullet/client.ts"
click node_background "https://github.com/yazmani/pushpilot/blob/main/src/background/index.ts"
click node_router "https://github.com/yazmani/pushpilot/blob/main/src/background/router.ts"
click node_account "https://github.com/yazmani/pushpilot/blob/main/src/background/services/account.ts"
click node_stream "https://github.com/yazmani/pushpilot/blob/main/src/background/services/stream.ts"
click node_pushes "https://github.com/yazmani/pushpilot/blob/main/src/background/services/pushes.ts"
click node_outbox "https://github.com/yazmani/pushpilot/blob/main/src/background/services/outbox.ts"
click node_mirror "https://github.com/yazmani/pushpilot/blob/main/src/background/services/mirror.ts"
click node_smsservice "https://github.com/yazmani/pushpilot/blob/main/src/background/services/sms.ts"
click node_previews "https://github.com/yazmani/pushpilot/blob/main/src/background/services/previews.ts"
click node_notifications "https://github.com/yazmani/pushpilot/blob/main/src/background/platform/notifications.ts"
click node_offscreen "https://github.com/yazmani/pushpilot/blob/main/src/background/platform/offscreen.ts"
click node_windows "https://github.com/yazmani/pushpilot/blob/main/src/background/platform/windows.ts"

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_app,node_send,node_auth,node_feed,node_dashboard,node_phone,node_sms,node_settings,node_user toneBlue
class node_background,node_router,node_account,node_stream,node_pushes,node_outbox,node_mirror,node_smsservice,node_previews toneAmber
class node_rpc,node_storage,node_links,node_api toneMint
class node_notifications,node_offscreen,node_windows toneRose
class node_pb toneIndigo
```

## Components

### Browser interface

- [App shell](https://github.com/yazmani/pushpilot/blob/main/src/ui/app/App.tsx): `src/ui/app/App.tsx`
- [Send composer](https://github.com/yazmani/pushpilot/blob/main/src/ui/features/send/SendView.tsx): `src/ui/features/send/SendView.tsx`
- [Sign-in](https://github.com/yazmani/pushpilot/blob/main/src/ui/features/auth/SignIn.tsx): `src/ui/features/auth/SignIn.tsx`
- [Feed and chat](https://github.com/yazmani/pushpilot/blob/main/src/ui/features/feed/FeedView.tsx): `src/ui/features/feed/FeedView.tsx`
- [Dashboard](https://github.com/yazmani/pushpilot/blob/main/src/ui/dashboard/Dashboard.tsx): `src/ui/dashboard/Dashboard.tsx`
- [Phone mirror](https://github.com/yazmani/pushpilot/blob/main/src/ui/features/phone/PhoneView.tsx): `src/ui/features/phone/PhoneView.tsx`
- [SMS conversations](https://github.com/yazmani/pushpilot/blob/main/src/ui/features/sms/SmsView.tsx): `src/ui/features/sms/SmsView.tsx`
- [Settings](https://github.com/yazmani/pushpilot/blob/main/src/ui/features/settings/SettingsPage.tsx): `src/ui/features/settings/SettingsPage.tsx`

### Background services

- [Background entry](https://github.com/yazmani/pushpilot/blob/main/src/background/index.ts): `src/background/index.ts`
- [RPC router](https://github.com/yazmani/pushpilot/blob/main/src/background/router.ts): `src/background/router.ts`
- [Account and auth](https://github.com/yazmani/pushpilot/blob/main/src/background/services/account.ts): `src/background/services/account.ts`
- [Live stream](https://github.com/yazmani/pushpilot/blob/main/src/background/services/stream.ts): `src/background/services/stream.ts`
- [Push sync](https://github.com/yazmani/pushpilot/blob/main/src/background/services/pushes.ts): `src/background/services/pushes.ts`
- [Send queue](https://github.com/yazmani/pushpilot/blob/main/src/background/services/outbox.ts): `src/background/services/outbox.ts`
- [Notification mirror](https://github.com/yazmani/pushpilot/blob/main/src/background/services/mirror.ts): `src/background/services/mirror.ts`
- [SMS service](https://github.com/yazmani/pushpilot/blob/main/src/background/services/sms.ts): `src/background/services/sms.ts`
- [Preview fetch](https://github.com/yazmani/pushpilot/blob/main/src/background/services/previews.ts): `src/background/services/previews.ts`

### Shared core

- [RPC messaging](https://github.com/yazmani/pushpilot/blob/main/src/core/messaging/rpc.ts): `src/core/messaging/rpc.ts`
- [Extension storage](https://github.com/yazmani/pushpilot/blob/main/src/core/storage/store.ts): `src/core/storage/store.ts`
- [Link previews](https://github.com/yazmani/pushpilot/blob/main/src/core/utils/links.ts): `src/core/utils/links.ts`
- [Pushbullet client](https://github.com/yazmani/pushpilot/blob/main/src/core/pushbullet/client.ts): `src/core/pushbullet/client.ts`

### Browser integration

- [Desktop notifications](https://github.com/yazmani/pushpilot/blob/main/src/background/platform/notifications.ts): `src/background/platform/notifications.ts`
- [Offscreen media](https://github.com/yazmani/pushpilot/blob/main/src/background/platform/offscreen.ts): `src/background/platform/offscreen.ts`
- [Browser windows](https://github.com/yazmani/pushpilot/blob/main/src/background/platform/windows.ts): `src/background/platform/windows.ts`

### Other components

- **Browser user**
- **Pushbullet service**

## Connections

- Browser user → App shell: opens
- App shell → Send composer: renders (evidence: `src/ui/app/App.tsx`)
- App shell → Sign-in: renders (evidence: `src/ui/app/App.tsx`)
- App shell → Feed and chat: renders (evidence: `src/ui/app/App.tsx`)
- App shell → Phone mirror: renders (evidence: `src/ui/app/App.tsx`)
- App shell → SMS conversations: renders (evidence: `src/ui/app/App.tsx`)
- App shell → Dashboard: renders (evidence: `src/ui/app/App.tsx`)
- Send composer → RPC messaging: requests (evidence: `src/ui/features/send/SendView.tsx`)
- Sign-in → RPC messaging: requests (evidence: `src/ui/features/auth/SignIn.tsx`)
- Feed and chat → RPC messaging: requests (evidence: `src/ui/features/feed/FeedView.tsx`)
- Settings → RPC messaging: requests (evidence: `src/ui/features/settings/SettingsPage.tsx`)
- RPC messaging → RPC router: dispatches (evidence: `src/background/router.ts`)
- Background entry → RPC router: registers (evidence: `src/background/index.ts`)
- RPC router → Account and auth: dispatches (evidence: `src/background/router.ts`)
- RPC router → Push sync: dispatches (evidence: `src/background/router.ts`)
- RPC router → Send queue: dispatches (evidence: `src/background/router.ts`)
- RPC router → Notification mirror: dispatches (evidence: `src/background/router.ts`)
- RPC router → SMS service: dispatches (evidence: `src/background/router.ts`)
- RPC router → Preview fetch: dispatches (evidence: `src/background/router.ts`)
- Account and auth → Extension storage: reads and writes (evidence: `src/background/services/account.ts`)
- Account and auth → Pushbullet client: uses (evidence: `src/background/services/account.ts`)
- Pushbullet client → Pushbullet service: calls API (evidence: `src/core/pushbullet/client.ts`)
- Live stream → Pushbullet client: opens stream (evidence: `src/background/services/stream.ts`)
- Live stream → Push sync: dispatches events (evidence: `src/background/services/stream.ts`)
- Live stream → Notification mirror: dispatches events (evidence: `src/background/services/stream.ts`)
- Live stream → SMS service: dispatches events (evidence: `src/background/services/stream.ts`)
- Push sync → Extension storage: stores pushes (evidence: `src/background/services/pushes.ts`)
- Push sync → Desktop notifications: shows alerts (evidence: `src/background/services/pushes.ts`)
- Push sync → Browser windows: opens links (evidence: `src/background/services/pushes.ts`)
- Send queue → Pushbullet client: sends pushes (evidence: `src/background/services/outbox.ts`)
- Send queue → Extension storage: persists queue (evidence: `src/background/services/outbox.ts`)
- Notification mirror → Desktop notifications: shows mirror (evidence: `src/background/services/mirror.ts`)
- Notification mirror → Offscreen media: uses media (evidence: `src/background/services/mirror.ts`)
- SMS service → Pushbullet client: uses (evidence: `src/background/services/sms.ts`)
- SMS service → Extension storage: stores SMS (evidence: `src/background/services/sms.ts`)
- Preview fetch → Extension storage: caches previews (evidence: `src/background/services/previews.ts`)
- Preview fetch → Link previews: parses links (evidence: `src/background/services/previews.ts`)
- Desktop notifications → Offscreen media: plays sound (evidence: `src/background/platform/notifications.ts`)
- RPC messaging → Extension storage: shared state (evidence: `src/core/messaging/rpc.ts`)
- Browser user → Settings: configures
