Overview and Architecture
Explore the philosophy, layered architecture, and security principles of the Mr. Tick ecosystem.
Overview and Architecture
Mr. Tick was designed with a decentralized, decoupled, provider-agnostic architecture.
The main application (Core Desktop) contains no business rules tied to specific tools such as Jira, Redmine, YouTrack, Discord, Google, or Microsoft. Extensibility, task synchronization, activity monitoring, and visual themes are exposed through standardized extensions using @mr-tick/sdk.
ποΈ Layered Architecture
The Mr. Tick ecosystem separates layers with clearly defined responsibilities:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mr-tick Core Desktop β
β (Windows, Native Timers , Keytar Vault, AddonLoader) β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ
β Application & Domain Engine β
β (@mr-tick/domain & @mr-tick/application) β
β (Workspaces, TimeEntries, Tasks, HTTP Sync Engine) β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ
β Official Mr-tick SDK β
β (@mr-tick/sdk) β
β (IAddon, AddonContext, IAddonOAuthAPI, Vault, Events) β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββ
β β β
ββββββββΌβββββββ ββββββββΌβββββββ ββββββββΌβββββββ
β DataSources β β Watchers β β Calendars β ...
βββββββββββββββ βββββββββββββββ βββββββββββββββ1. Core Desktop (Electron / Node.js)
Manages application lifecycle, windows, global shortcuts, encrypted persistence in the native operating system keychain (Windows Credential Manager / macOS Keychain through Keytar), and isolated addon initialization through AddonLoader.
2. Domain & Application Layer (@mr-tick/domain / @mr-tick/application)
Contains pure business rules:
- Rich Entities:
Workspace,Task, andTimeEntryensure data integrity with Zod and functional error handling (Either/Result). - Use Cases: Workspace creation, DataSource connection and disconnection, and the HTTP Synchronization Engine (Pull & Push of deltas).
3. Mr. Tick SDK (@mr-tick/sdk)
The entry point for developers. It provides strict TypeScript types, cryptographic utilities (PKCE RFC 7636 and State generation), and safe abstractions for storage, real-time events, timers, and notifications.
4. Deep Link Bridge (mr-tick-app://)
A universal bridge for web flows such as OAuth 2.0. The intermediate landing page receives external-provider callbacks and securely returns their parameters to the desktop application through mr-tick-app://oauth/callback.
π‘οΈ Fundamental Security Principles
- Zero Secrets: Addons run as public clients on the desktop. No secret key (
CLIENT_SECRET) is embedded or required in addon code. Authentication uses OAuth 2.0 with PKCE. - Workspace Isolation (Multi-Tenant): Credentials, access tokens, and settings persisted through
context.host.vaultare isolated by addon and the explicit scope passed to each call, independently of the active workspace. - Immutability and Conflict Prevention: The synchronization engine uses Optimistic Concurrency Control with
assumedMasterStateto detect concurrent changes without silently overwriting data. - Safe Event Communication: Addons react asynchronously to operating system and timer events (
onTimerStart,onTimerStop,onIdleDetected) without blocking.