Getting Started & Architecture
End-to-end onboarding from creating an organization workspace and inviting employees to installing the Electron 42 desktop agent and understanding real-time Socket.io synchronization.
Workspace Setup & User Onboarding
Owners register a workspace at /authenticate/signup, configure organization defaults, and invite employees individually or via CSV upload under Dashboard → User Management. Invited team members complete onboarding through a single-use invite token without needing admin intervention.
- 1Register an organization at /authenticate/signup (or accept a workspace invitation link at /accept-invite).
- 2Sign in via email/password or Google, Microsoft, or Apple OAuth at /authenticate/login (with optional 2FA verification under Settings → Account → Security).
- 3Configure your canonical Report Timezone under Settings → Profile (or Organization defaults) so daily attendance and analytics align across distributed teams.
- 4Assign employee teams, roles, and multiple managers under Dashboard → User Management.
- Public routes (/, /docs, /authenticate/*, /accept-invite, /verify-email-change/*) render without an authenticated dashboard session.
- Dashboard routes (/dashboard/*) validate sessions via /api/auth/me with CSRF protection and automatic access-token refresh.
Windows Desktop Agent Installation (v1.0.0)
Download WorkComposer-Desktop-Setup-v1.0.0.exe (NSIS 64-bit Windows installer, customizable install path, optional Desktop and Start Menu shortcuts). On first launch, sign in once inside the desktop client — sessions, role permissions, and organization tracking rules sync automatically.
- Local Electron runtime state, queued offline payloads, and diagnostics (`workcomposer-error.log`) live under `app.getPath("userData")` (typically `%APPDATA%\WorkComposer` in packaged Windows builds).
- Single-instance enforcement (`app.requestSingleInstanceLock()`) prevents duplicate background trackers from running simultaneously.
How It Works — Four-Layer Platform Architecture
WorkComposer separates lightweight desktop telemetry capture from real-time web analytics and multi-tenant data enforcement so tracking uses <1% CPU at idle while dashboards stay responsive.
| Component | Stack & Key Modules | Primary Responsibilities |
|---|---|---|
| Workcomposer Dashboard | Next.js 16 (App Router) · React 19 · Tailwind CSS v4 | Web analytics portal (/dashboard/*), role-scoped reports, settings console, plus embedded Desktop views (/desktop, /tracking-bar, /idle). |
| WorkComposer Desktop | Electron 42.3 · electron-store · uiohook-napi · active-win · screenshot-desktop · sharp | System-tray timer agent, global input activity counting, always-on-top 410×42 Floating Bar, shift scheduler, and offline retry queues. |
| BrowserUrlReader & LocationReader | .NET 8 Native Helpers (Windows UIAutomation / macOS MacBrowserReader) | Extracts active browser tab domains without browser extensions and provides opt-in Windows device location coordinates. |
| WorkComposer Backend | Express 5 · Socket.io 4.8 · PostgreSQL (Prisma 6.19) & MongoDB (Mongoose 9) | Multi-tenant RBAC & CSRF middleware, /api/* & /api/v1/* endpoints, overlap/zoned-day reporting, Cloudinary/Stripe/email services, and Socket.io rooms. |
Whenever an administrator updates tracking settings, capture rules, roles, or user profiles in the web dashboard, the backend broadcasts events (such as `tracking-settings-updated`) to the organization's Socket.io room so connected Desktop clients and open web tabs enforce the new configuration immediately.
Desktop Tracker, Modes & Floating Bar
Detailed reference for Automatic, Manual, and Silent tracking modes, the compact 410×42 Floating Bar, inactivity detection (/idle), shift enforcement, and durable offline queues.
Time Tracking Modes Explained
Configure organization defaults under Settings → Time Tracking → Tracking, or override individual users via the per-user Configure modal:
- Automatic: Starts tracking automatically on desktop login or system startup (when `startTrackingOnBoot` is enabled) and honors assigned shift start/break/end windows.
- Manual: Employees explicitly start/stop sessions, take breaks, and switch active project tasks from `/desktop` or the Floating Tracking Bar.
- Silent: Records authorized work telemetry unobtrusively from the system tray without interrupting focus workflows.
Floating Tracking Bar (/tracking-bar)
The always-on-top 410×42 Floating Bar keeps current session state visible without cluttering your workspace:
- Displays live elapsed timer (`00:00:00`), active state indicator (`Working 💻`, `Break ☕`, `Idle 🌙`, `Stopped ⏸️` with `prefers-reduced-motion` support), quick Stop control, and Expand button to open `/desktop`.
- Position is persisted via `electron-store` (`trackingBarPosition`) and clamped strictly inside the active display's workArea above the Windows taskbar using `setPosition` on drag end and display-metric changes (`Resizable: false`, `useContentSize: true`).
Idle Time Detection & Allow Work Away From Computer
Using `uiohook-napi` mouse and keyboard activity hooks (event timing only, never keystroke content), WorkComposer Desktop checks inactivity against `inactivityMinutes` (configurable from 1 to 60 minutes under `pauseTrackingWhenInactive`).
- When `pauseTrackingWhenInactive` is enabled and idle exceeds the threshold, `/idle` opens showing exact idle duration so the employee can keep or discard the idle interval.
- Enabling `allowWorkAwayFromComputer` permits authorized offline/meeting time to remain counted without automatically pausing sessions.
Shift Schedules & Durable Offline Queues
WorkComposer Desktop enforces daytime and overnight shifts (evaluated in the shift's IANA timezone across DST transitions) and protects telemetry during disconnects using two dedicated persistent queues under `app.getPath("userData")`:
# Durable Telemetry Queue (durableTelemetryQueue.js)
- Partitioned per user slug: u_<userId>
- Max queue size: 500 records / user with idempotency keys
- Retry backoff: 5s base -> 2m cap (up to 10 retries before quarantine)
# Offline Screenshot Queue (offlineScreenshotQueue.js)
- Encrypted/archived local safe-retain buffer with free disk-space checks
- Baseline capacity: 50 captures / 24h retention (30s -> 10m backoff, 5 retries)
- Rescue & Dead-Letter safety partitions prevent data loss on flaky Wi-Fi| Tracking Mode | Session Start Trigger | Floating Bar / User Controls | Best Fit |
|---|---|---|---|
| Automatic | Desktop sign-in / boot (`startTrackingOnBoot`) / shift start | Live status display; follows shift windows & idle rules | Standardized 9-to-5 or scheduled shift teams |
| Manual | User clicks Start in `/desktop` or task row | Full Start / Break / Stop / Switch Task controls | Consultants, flexible schedules & project billing |
| Silent | Automatic background agent on active OS session | Tray-managed telemetry synced with organization policy | Managed enterprise workstations |
Closing the Desktop window hides it to the system tray rather than aborting active timers. All Electron BrowserWindows enforce `windowPolicy.js` navigation allowlists, blocking arbitrary external popups while permitting OAuth sign-in flows.
Time Tracking, Attendance & Reporting
How Home, Overview, Attendance, and My Report compute timezone-accurate work/break hours, merge overlapping sessions, handle manual time approvals, and persist calendar filters.
Home, Overview, Attendance & My Report Views
Time Tracking modules roll session intervals into consistent metrics across Web and Desktop:
- Team & Personal Home (`/dashboard/time-tracking/home`): Real-time status indicators (Working, On Break, Stopped/Offline), daily/weekly trend cards, and team timeline bars.
- Overview (`/dashboard/time-tracking/overview`): Team-wide or self-scoped summary table with Work Time, Break Time, Idle Time, Activity %, and Work Details modal inspection.
- Attendance (`/dashboard/time-tracking/attendance`): Exact first clock-in, last clock-out, session timelines, and printable daily attendance summaries.
- Scheduled Exports & Email Reports: Trigger CSV/background export jobs via Reports modals or automate daily/weekly digests under Settings → Time Tracking → Email Reports.
Zoned Day Bounds & Overlap Merging Engine
To prevent cross-midnight drift across global teams, backend controllers compute half-open zoned day intervals (`[startUtc, nextDayStartUtc)` via `getZonedDayRange`) in the caller's Report Timezone, merge overlapping work or break segments via `calculateIntervalOverlap`, and reconcile any currently running Timer up to evaluation time.
Calendar Persistence & Date Range Controls
All Time Tracking reports share `OverviewHeader` + `DateControls` + `DateRangeModalPreview`. Selecting `Last month`, `This month`, `Last week`, `Yesterday`, `Last 7/14/30 days`, `Year`, or `Custom` range persists the committed range across tab navigation and re-hydrates the exact Quick Select, mode tab, and calendar month/year in your organization timezone on reopen.
Manual Time Entries & Approval Controls
Under Settings → Time Tracking → Manual Time, admins configure `allowManualTime`, `requireApproval`, `managerApproval` (allowing managers to approve requests for assigned team members), and backdating limits (`1–366` days). Approved manual adjustments flow straight into Overview and Attendance totals.
Screenshots & Work Details Activity
Interval/randomized screenshot cadence, workspace-wide blur modes, Cloudinary TLS media pipeline, upcoming S3/GCS/Azure integration, and 1-minute Work Details activity buckets.
Screen Capture & Blur Privacy
Configure organization and per-user screenshot rules under Settings → Time Tracking → Screen Capture:
- Toggle capture enabled/disabled globally or per user.
- Select frequency intervals (`1`, `2`, `3`, `5`, `10`, `15`, `20`, `30`, or `60` minutes) and optionally enable `Randomize screenshot frequency` so capture times vary organically within each window.
- Set blur intensity globally: `Disabled` (`disabled`), `Slightly Blurred` (`slightly_blurred`), or `Maximum Blurring` (`maximum_blurring`).
Screenshot Storage & Cloud Integrations
Captured screenshots are processed with `sharp` according to workspace blur settings, uploaded over authenticated HTTPS requests (or queued in `offlineScreenshotQueue.js` if offline), and stored on Cloudinary media storage by default. Under Settings → Account → Integrations → External Cloud Storage, direct connectors for custom Amazon Web Services (AWS S3), Google Cloud Storage, and Microsoft Azure Blob are scheduled as Coming Soon.
Work Details Modal & 1-Minute Activity Buckets
Opening Work Details from Screenshots or Overview reveals a chronological, newest-first gallery paired with 1-minute activity buckets formatted in the active Report Timezone.
- Each 1-minute bucket records aggregate keyboard and mouse activity presence (`activeSeconds / 60`) via `uiohook-napi` — zero keystroke text, window text input, or clipboard contents are ever captured.
- Daily `Activity %` and `Idle Time` cards reconcile identically between the timeline strip, Work Details header, and Overview table.
Blur strength is configured at the workspace level and visible to tracked team members. Screenshot visibility in reports is strictly gated by each role's `screenshotAccess` privilege (`none`, `own`, `assigned`, `all`).
Web & App Usage & Productivity
Zero-extension native browser URL detection via BrowserUrlReader, case-insensitive domain normalization, Top-N bar charts, Detailed Logs, and Productive/Neutral/Unproductive classification.
Native Foreground App & Browser URL Detection
WorkComposer avoids brittle browser plugins by combining `active-win` with compiled .NET 8 native readers bundled in `extraResources`:
- Windows: `BrowserUrlReader.exe` uses Microsoft `Interop.UIAutomationClient` to inspect only the active browser address bar domain when a supported browser window has focus.
- macOS: `MacBrowserReader` extracts the foreground browser tab URL cleanly when Accessibility permission is granted.
- Only domain/application context and duration are logged — never form data, page content, or incognito/keystroke text.
Per-Org Domain Normalization & Drill-Down Modals
Backend usage aggregation normalizes domain hostnames case-insensitively scoped per organization so `GitHub.com` and `github.com` merge into a single clean usage entry. Inside `/dashboard/time-tracking/usage`, inspect the Top-N horizontal bar chart or open `Full list` and `Detailed log` modals to filter, search, and audit minute-level app/website durations.
Productivity Classification Rules
Admins classify apps and websites into `Productive`, `Neutral`, or `Unproductive` buckets under Settings → Time Tracking → Productivity or directly from the live `/dashboard/time-tracking/productivity` board via portaled context menus, recalculating productivity scores instantaneously.
Live Location Tracking
Privacy-first opt-in team geolocation displayed on interactive OpenStreetMap Street & Esri Satellite tiles with clustered markers and date-range synced Work/Break popups.
Opt-In Permission & Telemetry Sources
Location tracking starts disabled for new organizations. When enabled in workspace settings, Desktop agents enrich active sessions with Windows `LocationReader` coordinates or IP geolocation metadata (`IPINFO_TOKEN` / ISP & city resolution).
Interactive Map, Clustering & Employee Cards
In `/dashboard/time-tracking/location`, switch seamlessly between Street (OpenStreetMap) and Satellite (Esri) layers powered by Leaflet and `MarkerClusterGroup`. Clicking a marker opens a dark/light themed, scroll-stable popup showing employee city, ISP/network, recent location timestamps, and exact `WORK TIME` and `BREAK TIME` metrics aligned to the selected Date Range filter.
Projects & Task Management
Team- and user-scoped projects, task statuses & priorities, comments with unread counts, Recently Deleted recovery, Desktop task timers, and Jira/Asana sync.
Project Scoping & Task Workflows
Projects are managed from the Task Management sidebar (`/dashboard/task-management`) with two access layers: Team-Based Access (auto-granting access to team members) and Individual User Access. Tasks support `Todo`, `In progress`, and `Done` statuses, `Low` / `Medium` / `High` priorities, due-date overdue highlighting, multi-assignee tagging, and multi-select bulk deletion.
Task Details, Comments & Soft-Delete Recovery
Open any task to inspect or edit fields (automatically rendered in read-only banner mode if the viewer lacks `manage_tasks` permission), post/edit/delete threaded comments tracked by unread comment badges, or restore deleted tasks from `More → Recently Deleted`.
Desktop Task Timers & External Sync
Employees running WorkComposer Desktop can click `Start` / `Done` directly on assigned task rows to attribute tracked session minutes to that project and task. Managers analyze logged project/task hours in Time Tracking → Project Tracking and synchronize external issues via Jira & Asana integrations.
Organization Settings, Roles (RBAC) & API Documentation
Role-based privileges (`Owner`, `Admin`, `Manager`, `User`, custom roles), multi-manager team scoping, security/audit logs, third-party integrations, and REST `/api/v1` reference.
Multi-Manager Scoping & Team Synchronization
Under Dashboard → User Management, admins can assign multiple managers to any user and edit team memberships from either the Edit User modal or the Manager modal. When assigned, managers gain scoped visibility over their direct reports' Attendance, Overview, Screenshots, Usage, and Manual Time approvals without exposing unrelated teams.
Security, Billing & Ecosystem Integrations
Configure Two-Factor Authentication (`/settings/account/security/two-factor`), inspect Security Audit Logs (`/audit-log`), monitor Desktop client updates (`/app-update`), manage Stripe billing plans (`/billings`), and connect Slack, Jira, Asana, BambooHR, Keka, and Email Reports.
REST API Documentation & API Keys (/api/v1)
Admins with `manage_settings` can create, revoke, and audit scoped API keys under Settings → Account → API Access (`API Keys` and `API Logs` tabs). Backend `apiKeyAuth` middleware verifies active/non-expired `wc_<64-hex>` keys via `Authorization: Bearer <YOUR_API_KEY>`, active non-archived key owners, and strict organization tenant isolation.
# Authenticate API v1 requests using your organization API key
Authorization: Bearer <YOUR_API_KEY>
# Public API v1 endpoint (requires active API key + manage_settings permission)
GET /api/v1/projects
# Response: { "success": true, "data": [{ "_id", "name", "description", "createdAt", "updatedAt" }] }
# Core organization endpoints documented in Settings -> API Access:
GET /api/users # List organization users
GET /api/projects # List organization projects and tasks
GET /api/reports # Fetch tracking and productivity reports
GET /api/attendance # Fetch attendance and daily time summaries| Role / Flag | Access Scope | Capabilities & Guards |
|---|---|---|
| Owner / Admin | Organization-wide (`callerOrgId`) | Unrestricted workspace administration: billing, roles, API keys, integrations, audit logs, users, projects, and all reports. |
| Manager | Assigned users & managed teams | Scoped access to direct reports' Attendance, Overview, Screenshots, Usage, Location, and optional Manual Time approval. |
| User (Employee) | Self only | Runs Desktop tracker, views personal Home / My Report data, submits manual time requests, and updates assigned tasks/comments. |
| Custom Role Privileges | Granular role matrix | Configurable booleans (`manage_billing`, `manage_settings`, `manage_users`, `manage_projects`, `manage_tasks`) + scoped `reportAccess` & `screenshotAccess`. |
Privacy Transparency & Troubleshooting FAQ
Plain-view employee privacy guarantees, timezone diagnostics, offline queue verification, and Windows/macOS desktop permission troubleshooting.
Employee Privacy & Zero Hidden Monitoring
WorkComposer keeps all tracking rules visible inside the workspace rather than buried in hidden config files. Every employee can see whether screenshot capture, blurring, inactivity pause, or location telemetry is active.
- No keystroke content, clipboard, or password capture — only 1-minute activity counters (`uiohook-napi`).
- Location tracking is opt-in and off by default per organization.
- Cross-tenant isolation (`callerOrgId`) returns `404` non-disclosure responses on unauthorized resource lookups.
Why do dashboard report timestamps differ from my laptop clock?
All Time Tracking reports evaluate day bounds and timestamps using your configured Report Timezone (displayed beside `Last synced` in the report header and inside the Date Range modal), rather than whatever temporary browser offset you travel through. Update your preference in Settings → Profile.
What happens if Wi-Fi disconnects or my token expires mid-shift?
WorkComposer Desktop refreshes JWT access tokens cleanly in the background and persists pending heartbeats/screenshots in `durableTelemetryQueue` and `offlineScreenshotQueue` under `app.getPath("userData")`. Once connectivity resumes, queued events flush automatically in chronological order.
Troubleshooting: Browser URLs, Tray Launch, & macOS Permissions
Use this checklist if telemetry looks incomplete on a workstation:
- 1Windows URLs missing: Confirm `BrowserUrlReader.exe` exists in the Electron app `resources/` folder and the browser window has foreground focus.
- 2macOS URLs missing: Open macOS System Settings → Privacy & Security → Accessibility and enable WorkComposer so `MacBrowserReader` can read the active browser tab.
- 3Desktop app won't open a second window: WorkComposer enforces a single background instance (`requestSingleInstanceLock`); check the Windows system tray icon to restore the active window.