Skip to main content

Module Architecture Index

Comprehensive index of all application modules in the app/ directory. Teams for Linux follows a modular architecture where functionality is organized into focused, single-responsibility modules.

tip

All module READMEs are available in the GitHub repository. Click the documentation links to view detailed information about each module.

Core Modules​

These modules form the foundation of the application and are essential for basic operation.

ModulePathPurposeDocumentation
Startupapp/startup/Command line switches & initialization flagsREADME
Main App Windowapp/mainAppWindow/Primary BrowserWindow that hosts Teams web interfaceREADME
App Configurationapp/appConfiguration/Application-wide configuration managementREADME
Browserapp/browser/Preload scripts & client-side injected scriptsREADME

Feature Modules​

User-facing features and integrations.

ModulePathPurposeDocumentation
Auto Updaterapp/autoUpdater/In-app auto-update for AppImage distributionsREADME
MQTTapp/mqtt/MQTT broker integration for status publishing, media state (microphone, camera, in-call, screen-sharing), and Home Assistant auto-discoveryREADME, User Guide
Screen Sharingapp/screenSharing/Native screen/window selection and previewREADME, User Guide
Custom Backgroundapp/customBackground/Virtual background managementREADME, User Guide
Custom CSSapp/customCSS/Custom styling and themesREADME
Notificationsapp/notifications/Native desktop notifications & sound playbackREADME
Notification Systemapp/notificationSystem/Custom in-app toast notificationsREADME
Incoming Call Toastapp/incomingCallToast/Call notification toastsREADME
Download Managerapp/downloadManager/Surfaces file download lifecycle as system notifications (#2512)README
InTune SSOapp/intune/Microsoft InTune single sign-on integrationREADME, User Guide
Global Shortcutsapp/globalShortcuts/System-wide keyboard shortcutsNo README yet
Graph APIapp/graphApi/Microsoft Graph API integration for calendar and mailADR-030, README
Speaking Indicatorapp/browser/tools/speakingIndicator.jsVisual overlay showing microphone state during calls (speaking/silent/muted) via RTCPeerConnection.getStats(). Also provides WebRTC-based call state fallback for reliable MQTT in-call detection (#2358).PR #2299
Quick Chatapp/quickChat/Quick Chat modal with People API search and inline messaging via Graph APIADR-014, ADR-015
WebAuthn / FIDO2app/webauthn/Hardware security key support for Linux via fido2-tools interception of navigator.credentialsADR-021
Client Certificate PINapp/clientCertificate/Linux smartcard/NSS client-certificate PIN dialog built on the shared secure prompt (#2639)README
Profiles Managerapp/profilesManager/Multi-account profile storage, switching, and lifecycle managementADR-020
Profile Dialogsapp/profileDialogs/Add-profile, manage-profiles, and switch-profile UI dialogsADR-020
Join Meeting Dialogapp/joinMeetingDialog/Join Meeting dialog for deep-link navigation handling—

System Integration Modules​

OS-level integrations and platform-specific functionality.

ModulePathPurposeDocumentation
Idle Monitorapp/idle/System idle state monitoring & status correlationREADME
Loginapp/login/Authentication and login flow managementREADME
SSO Password Pre-fillapp/ssoPasswordPrefill/Opt-in pre-fill of the Microsoft/federated web sign-in form: account, password from a command, optional auto-advance and MFA method (#2794). Distinct from app/login/, which drives the native HTTP Basic/NTLM dialog.README
Menusapp/menus/Application menu bar and context menusREADME
Spell Check Providerapp/spellCheckProvider/Text spelling correction integrationREADME

Utility & Infrastructure Modules​

Supporting infrastructure, utilities, and cross-cutting concerns.

ModulePathPurposeDocumentation
Sharedapp/_shared/Cross-module shared utilities and constants—
Audioapp/audio/Sound playback via system audio commands (paplay, aplay, afplay)—
Utilsapp/utils/Shared utilities (window positioning, log sanitization)—
Helpersapp/helpers/Shared utility functions and common logicREADME
Cache Managerapp/cacheManager/Application cache handlingREADME
Configapp/config/Configuration file loading and parsingREADME
Connection Managerapp/connectionManager/Network connectivity and connection stateREADME
Partitionsapp/partitions/Electron partition management for sessionsREADME
Securityapp/security/Security controls and validationNo README yet
Certificateapp/certificate/Custom certificate handlingUser Guide

UI Components​

Special-purpose windows and UI elements.

ModulePathPurposeDocumentation
Documentation Windowapp/documentationWindow/In-app documentation viewerREADME
GPU Info Windowapp/gpuInfoWindow/GPU information display windowREADME
Screen Pickerapp/screenPicker/Screen/window selection interfaceNo README yet

Assets​

PathPurpose
app/assets/Icons, sounds, and static resources (README)

Module Development Guidelines​

Creating New Modules​

When adding a new module to the application:

  1. Create a dedicated directory under app/ with a descriptive name
  2. Add a README.md documenting:
    • Module purpose and responsibilities
    • Public API and IPC channels (if any)
    • Dependencies on other modules
    • Usage examples
  3. Follow single responsibility principle - one module, one clear purpose
  4. Use dependency injection - accept dependencies as constructor/function parameters
  5. Document IPC channels - add descriptive comments above IPC registrations
  6. Update IPC allowlist - add new channels to app/security/ipcValidator.js
  7. Generate IPC docs - run npm run generate-ipc-docs after adding IPC channels
  8. Add to this index - update the appropriate category in this document

Module Structure Best Practices​

app/myModule/
├── README.md # Module documentation
├── index.js # Public interface / entry point
├── service.js # Service class (if applicable)
├── preload.js # Preload script (if needs IPC)
└── tests/ # Unit tests (future)
└── myModule.spec.js

IPC Channel Guidelines​

  • Naming convention: module-name:action (e.g., screen-sharing:get-sources)
  • Add descriptive comments above ipcMain.handle() or ipcMain.on() calls
  • Register in allowlist: Add to app/security/ipcValidator.js
  • Generate documentation: Run npm run generate-ipc-docs
  • Document in module README: List all IPC channels with descriptions

See IPC API Documentation for all available IPC channels.

Architecture Patterns​

Module Dependencies​

Modules are organized in a hierarchical dependency structure:

Communication Patterns​

  • IPC (Inter-Process Communication): Main process ↔ Renderer process
  • Event Emitters: Within main process for loose coupling
  • Dependency Injection: Pass dependencies explicitly, avoid global state
  • Configuration-First: Modules read from centralized config object

Questions?​

  • "Where should I add new functionality?" → Check if an existing module fits, otherwise create a new focused module
  • "How do I communicate between modules?" → Use dependency injection and IPC for renderer↔main communication
  • "Which modules are most important to understand?" → Start with Core Modules, then explore Feature Modules
  • "How do I add a new IPC channel?" → See Module Development Guidelines above