# deriandev17/asistenteqa-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/deriandev17/asistenteqa-desktop
- Repository: https://github.com/deriandev17/asistenteqa-desktop

## Overview

QA Assistant Desktop is a local-first Windows project and task workspace, with optional Microsoft 365 mail and calendar integrations. The main workflow runs from the React dashboard through the preload/IPC boundary into workspace use cases and local repositories, then returns snapshots for planning and follow-up. Separate branches cover email-to-task review, calendar synchronization and meeting preparation, plus reminders and automation. The README documents these capabilities; some renderer, repository and reminder internals were not sampled, so only supported wiring is shown.

Main entry points: [`src/main/main.ts`](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/main.ts) (Electron main), [`src/application/email/service.ts`](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/email/service.ts) (Mail sync service), [`src/application/calendar/service.ts`](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/calendar/service.ts) (Calendar service), [`src/application/workspace.ts`](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/workspace.ts) (Workspace use cases)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop boundary"]
  node_preload["Preload API<br/>[preload.ts]"]
  node_api_contract["Typed API<br/>[api.ts]"]
  node_main["Electron main<br/>[main.ts]"]
  node_workspace_ipc["Workspace IPC<br/>[handlers.ts]"]
  node_mail_ipc["Mail IPC<br/>[mail.ipc.ts]"]
  node_email_task_ipc["Email-task IPC<br/>[email-tasks.ipc.ts]"]
  node_calendar_ipc["Calendar IPC<br/>[calendar.ipc.ts]"]
  node_reminders["Reminder delivery<br/>[reminders.ts]"]
  node_receipt_store[("Reminder receipts")]
end

subgraph group_workspace["Local workspace"]
  node_workspace_usecases["Workspace use cases<br/>[workspace.ts]"]
  node_domain_rules["Domain rules<br/>[validation.ts]"]
  node_workspace_repos["Project and task repositories<br/>[repositories.ts]"]
  node_sqlite[("SQLite workspace<br/>[client.ts]")]
end

subgraph group_m365["Microsoft 365"]
  node_email_tasks["Email task review<br/>[tasks.ts]"]
  node_mail_service["Mail sync service<br/>[service.ts]"]
  node_mail_storage[("Encrypted mail storage<br/>[mail-repository.ts]")]
  node_mail_vault[("Credential vault<br/>[mail-vault.ts]")]
  node_microsoft_auth["Microsoft sign-in<br/>[microsoft-auth.ts]"]
  node_graph_mail["Microsoft Graph mail<br/>[microsoft-graph.ts]"]
  node_email_task_source["Mail task source<br/>[task-source.ts]"]
  node_calendar_service["Calendar service<br/>[service.ts]"]
  node_calendar_provider["Microsoft calendar provider"]
  node_calendar_storage[("Calendar cache")]
end

subgraph group_planning["Planning experience"]
  node_renderer["React interface<br/>[App.tsx]"]
  node_workspace_hook["Workspace hook<br/>[useWorkspace.ts]"]
  node_agenda_views["Agenda and meetings<br/>[Agenda.tsx]"]
  node_dashboard["Dashboard planning<br/>[Dashboard.tsx]"]
end

node_user(("User"))
node_microsoft(("Microsoft 365"))

node_user -->|"uses"| node_renderer
node_renderer -->|"loads workspace"| node_workspace_hook
node_workspace_hook -->|"requests snapshot"| node_preload
node_preload -->|"exposes API"| node_api_contract
node_main -->|"registers handlers"| node_workspace_ipc
node_main -->|"registers handlers"| node_mail_ipc
node_main -->|"registers handlers"| node_email_task_ipc
node_main -->|"registers handlers"| node_calendar_ipc
node_workspace_ipc -->|"dispatches requests"| node_workspace_usecases
node_workspace_usecases -->|"validates inputs"| node_domain_rules
node_workspace_usecases -->|"reads and writes"| node_workspace_repos
node_main -->|"opens database"| node_sqlite
node_email_task_ipc -->|"dispatches task actions"| node_email_tasks
node_email_tasks -->|"creates email tasks"| node_workspace_repos
node_email_tasks -->|"resolves messages"| node_email_task_source
node_mail_ipc -->|"dispatches mail actions"| node_mail_service
node_mail_service -->|"loads credentials"| node_mail_vault
node_mail_service -->|"applies and lists mail"| node_mail_storage
node_mail_service -->|"obtains tokens"| node_microsoft_auth
node_mail_service -.->|"fetches mail pages"| node_graph_mail
node_email_task_source -.->|"resolves messages"| node_mail_storage
node_microsoft_auth -->|"authorizes"| node_microsoft
node_graph_mail -.->|"reads inbox"| node_microsoft
node_calendar_ipc -->|"dispatches calendar actions"| node_calendar_service
node_calendar_service -->|"uses account session"| node_mail_service
node_calendar_service -->|"fetches events"| node_calendar_provider
node_calendar_service -->|"reads and saves cache"| node_calendar_storage
node_calendar_provider -.->|"reads calendar"| node_microsoft
node_renderer -->|"shows planning"| node_dashboard
node_dashboard -->|"renders agenda"| node_agenda_views
node_main -->|"delivers notices"| node_reminders
node_main -->|"deduplicates notices"| node_receipt_store

click node_renderer "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/app/App.tsx"
click node_workspace_hook "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/hooks/useWorkspace.ts"
click node_preload "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/preload.ts"
click node_api_contract "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/shared/api.ts"
click node_main "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/main.ts"
click node_workspace_ipc "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/handlers.ts"
click node_mail_ipc "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/mail.ipc.ts"
click node_email_task_ipc "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/email-tasks.ipc.ts"
click node_calendar_ipc "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/calendar.ipc.ts"
click node_workspace_usecases "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/workspace.ts"
click node_domain_rules "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/domain/validation.ts"
click node_workspace_repos "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/repositories.ts"
click node_sqlite "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/client.ts"
click node_email_tasks "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/email/tasks.ts"
click node_mail_service "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/email/service.ts"
click node_mail_storage "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/mail-repository.ts"
click node_mail_vault "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/security/mail-vault.ts"
click node_microsoft_auth "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/email/microsoft-auth.ts"
click node_graph_mail "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/email/microsoft-graph.ts"
click node_email_task_source "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/email/task-source.ts"
click node_calendar_service "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/calendar/service.ts"
click node_calendar_provider "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/calendar/microsoft-calendar.ts"
click node_calendar_storage "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/calendar-repository.ts"
click node_agenda_views "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/components/Agenda.tsx"
click node_dashboard "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/pages/Dashboard.tsx"
click node_reminders "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/reminders.ts"
click node_receipt_store "https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/reminder-receipts.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_preload,node_api_contract,node_main,node_workspace_ipc,node_mail_ipc,node_email_task_ipc,node_calendar_ipc,node_reminders,node_receipt_store,node_user toneBlue
class node_workspace_usecases,node_domain_rules,node_workspace_repos,node_sqlite toneAmber
class node_email_tasks,node_mail_service,node_mail_storage,node_mail_vault,node_microsoft_auth,node_graph_mail,node_email_task_source,node_calendar_service,node_calendar_provider,node_calendar_storage toneMint
class node_renderer,node_workspace_hook,node_agenda_views,node_dashboard toneRose
class node_microsoft toneIndigo
```

## Components

### Desktop boundary

- [Preload API](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/preload.ts): `src/main/preload.ts`
- [Typed API](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/shared/api.ts): `src/shared/api.ts`
- [Electron main](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/main.ts): `src/main/main.ts`
- [Workspace IPC](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/handlers.ts): `src/main/ipc/handlers.ts`
- [Mail IPC](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/mail.ipc.ts): `src/main/ipc/mail.ipc.ts`
- [Email-task IPC](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/email-tasks.ipc.ts): `src/main/ipc/email-tasks.ipc.ts`
- [Calendar IPC](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/main/ipc/calendar.ipc.ts): `src/main/ipc/calendar.ipc.ts`
- [Reminder delivery](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/reminders.ts): `src/application/reminders.ts`
- [Reminder receipts](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/reminder-receipts.ts): `src/infrastructure/database/reminder-receipts.ts`

### Local workspace

- [Workspace use cases](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/workspace.ts): `src/application/workspace.ts`
- [Domain rules](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/domain/validation.ts): `src/domain/validation.ts`
- [Project and task repositories](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/repositories.ts): `src/infrastructure/database/repositories.ts`
- [SQLite workspace](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/client.ts): `src/infrastructure/database/client.ts`

### Microsoft 365

- [Email task review](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/email/tasks.ts): `src/application/email/tasks.ts`
- [Mail sync service](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/email/service.ts): `src/application/email/service.ts`
- [Encrypted mail storage](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/mail-repository.ts): `src/infrastructure/database/mail-repository.ts`
- [Credential vault](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/security/mail-vault.ts): `src/infrastructure/security/mail-vault.ts`
- [Microsoft sign-in](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/email/microsoft-auth.ts): `src/infrastructure/email/microsoft-auth.ts`
- [Microsoft Graph mail](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/email/microsoft-graph.ts): `src/infrastructure/email/microsoft-graph.ts`
- [Mail task source](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/email/task-source.ts): `src/infrastructure/email/task-source.ts`
- [Calendar service](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/application/calendar/service.ts): `src/application/calendar/service.ts`
- [Microsoft calendar provider](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/calendar/microsoft-calendar.ts): `src/infrastructure/calendar/microsoft-calendar.ts`
- [Calendar cache](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/infrastructure/database/calendar-repository.ts): `src/infrastructure/database/calendar-repository.ts`

### Planning experience

- [React interface](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/app/App.tsx): `src/renderer/app/App.tsx`
- [Workspace hook](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/hooks/useWorkspace.ts): `src/renderer/hooks/useWorkspace.ts`
- [Agenda and meetings](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/components/Agenda.tsx): `src/renderer/components/Agenda.tsx`
- [Dashboard planning](https://github.com/deriandev17/asistenteqa-desktop/blob/main/src/renderer/pages/Dashboard.tsx): `src/renderer/pages/Dashboard.tsx`

### Other components

- **User**
- **Microsoft 365**

## Connections

- User → React interface: uses
- React interface → Workspace hook: loads workspace (evidence: `src/renderer/app/App.tsx`)
- Workspace hook → Preload API: requests snapshot (evidence: `src/renderer/hooks/useWorkspace.ts`)
- Preload API → Typed API: exposes API (evidence: `src/shared/api.ts`)
- Electron main → Workspace IPC: registers handlers (evidence: `src/main/main.ts`)
- Electron main → Mail IPC: registers handlers (evidence: `src/main/main.ts`)
- Electron main → Email-task IPC: registers handlers (evidence: `src/main/main.ts`)
- Electron main → Calendar IPC: registers handlers (evidence: `src/main/main.ts`)
- Workspace IPC → Workspace use cases: dispatches requests (evidence: `src/main/ipc/handlers.ts`)
- Workspace use cases → Domain rules: validates inputs (evidence: `src/application/workspace.ts`)
- Workspace use cases → Project and task repositories: reads and writes (evidence: `src/application/workspace.ts`)
- Electron main → SQLite workspace: opens database (evidence: `src/main/main.ts`)
- Email-task IPC → Email task review: dispatches task actions (evidence: `src/main/ipc/email-tasks.ipc.ts`)
- Email task review → Project and task repositories: creates email tasks (evidence: `src/application/email/tasks.ts`)
- Email task review → Mail task source: resolves messages (evidence: `src/application/email/tasks.ts`)
- Mail IPC → Mail sync service: dispatches mail actions (evidence: `src/main/main.ts`)
- Mail sync service → Credential vault: loads credentials (evidence: `src/application/email/service.ts`)
- Mail sync service → Encrypted mail storage: applies and lists mail (evidence: `src/application/email/service.ts`)
- Mail sync service → Microsoft sign-in: obtains tokens (evidence: `src/main/main.ts`)
- Mail sync service → Microsoft Graph mail: fetches mail pages
- Mail task source → Encrypted mail storage: resolves messages
- Microsoft sign-in → Microsoft 365: authorizes
- Microsoft Graph mail → Microsoft 365: reads inbox
- Calendar IPC → Calendar service: dispatches calendar actions (evidence: `src/main/ipc/calendar.ipc.ts`)
- Calendar service → Mail sync service: uses account session (evidence: `src/application/calendar/service.ts`)
- Calendar service → Microsoft calendar provider: fetches events (evidence: `src/application/calendar/service.ts`)
- Calendar service → Calendar cache: reads and saves cache (evidence: `src/application/calendar/service.ts`)
- Microsoft calendar provider → Microsoft 365: reads calendar
- React interface → Dashboard planning: shows planning (evidence: `src/renderer/app/App.tsx`)
- Dashboard planning → Agenda and meetings: renders agenda (evidence: `src/renderer/pages/Dashboard.tsx`)
- Electron main → Reminder delivery: delivers notices (evidence: `src/main/main.ts`)
- Electron main → Reminder receipts: deduplicates notices (evidence: `src/main/main.ts`)
