# acreom/app architecture

> Architecture diagram of the GitHub repository acreom/app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/acreom/app
- Repository: https://github.com/acreom/app

## Overview

- An Electron-based desktop application
- A web/mobile frontend built with Nuxt/Vue
- A Quick Capture module for fast input
All three share core business logic, storage, encryption, and synchronization capabilities, while also interacting with external services (calendars, issue trackers, etc.) via dedicated integration modules and worker processes.

##### Main Components
– UI Layers:
- Desktop UI (Electron): Contains the “electron” folder with its own app, window management, tray handling, drivers (for AI, calendar sync, attachments, etc.), and native integrations.
- Quick Capture: A specialized lightweight module (folder “quick-capture”) with its own components and support for fast note and task insertion.
– Core Business Logic & Data Management:
- Common data models for Pages, Tasks, Projects, Vaults, etc. These are shared between the Electron and Frontend modules.
- Local storage and syncing modules (including an IndexedDB-based layer found in “workers/database/indexeddb”).
- End-to-end encryption support and versioning.
– Integration & Sync Services:
- For external APIs: Apple/Google Calendar sync, Jira, GitHub, and Linear integrations (found in both “electron/driver” and “frontend/plugins/entities”, and further worker-based integrations under “workers/integrations”).
– Background Processes:
- Dedicated worker threads that handle tasks such as encryption, cloud syncing, markdown parsing (in “workers”), and AI assistant communications.
– Plugin & Service Layers:
- A structured plugin system exists in both the frontend (plugins folder) and electron (driver and helpers folders) that help in modularizing services such as notifications, shortcuts, service registry, context menus, etc.

##### Relationships and Data Flow
– The UI components communicate with local storage mechanisms (whether file system or IndexedDB) and invoke services (via plugins or drivers) to both process data and manage sync.
– Indicate the role of worker threads or processes (e.g. “workers/encryption”, “workers/database”, “workers/integrations”) in executing background tasks such as encryption, data synchronization, and processing markdown.

##### Architectural Patterns and Technologies
– Emphasize the separation between presentation (UI), business logic (data models, services, plugins), and data persistence (local stores like IndexedDB and file system integrations).
– Note the use of Electron as a hybrid container with its main and renderer processes, and the utilization of Nuxt/Vue for the web/mobile frontend.
– Mark the plugin architecture which allows for extensibility into integrations and background services.
– Identify use of TypeScript across modules, Node.js for backend scripts, and Yarn for package management.
– Indicate that many of the UI components are modularized (organized under “components”, “plugins”, “store”, etc.) to allow for reusability.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "UI Layers"
        ED["Electron Desktop App"]:::ui
        WF["Web Frontend (Nuxt/Vue)"]:::ui
        QC["Quick Capture Module"]:::ui
    end

    subgraph "Core and Service Layers"
        CORE["Core Business Logic & Data Management"]:::core
        PLUGIN["Plugin & Service Layers"]:::plugin
    end

    subgraph "Background Processes"
        WORKER["Worker Processes (Encryption, DB, Integrations)"]:::worker
    end

    subgraph "External Interfaces"
        EXT["External Integrations (Calendar, Jira, GitHub, Linear)"]:::external
    end

    %% Data Flow Connections
    ED -->|"triggers"| CORE
    WF -->|"triggers"| CORE
    QC -->|"triggers"| CORE

    CORE -->|"uses"| PLUGIN
    CORE -->|"delegates"| WORKER
    PLUGIN -->|"extends"| WORKER
    WORKER -->|"syncs with"| EXT

    %% Click Events
    click ED "https://github.com/acreom/app/tree/main/electron"
    click WF "https://github.com/acreom/app/tree/main/frontend"
    click QC "https://github.com/acreom/app/tree/main/quick-capture"
    click CORE "https://github.com/acreom/app/tree/main/workers/database/indexeddb"
    click PLUGIN "https://github.com/acreom/app/tree/main/electron/driver"
    click WORKER "https://github.com/acreom/app/tree/main/workers/encryption"
    click EXT "https://github.com/acreom/app/tree/main/workers/integrations"

    %% Styles
    classDef ui fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef core fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
    classDef plugin fill:#D2B4DE,stroke:#6C3483,stroke-width:2px;
    classDef worker fill:#A9DFBF,stroke:#1E8449,stroke-width:2px;
    classDef external fill:#F5B7B1,stroke:#943126,stroke-width:2px;
```
