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
MQTTapp/mqtt/MQTT broker integration for status publishingREADME, 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
Incoming Call Toastapp/incomingCallToast/Call notification toastsREADME
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 mailResearch

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
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
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