Skip to main content

Contributing to Teams for Linux

Thank you for considering contributing! This guide will help you get started with development.

New to Electron?

This project is a great starting point for learning Electron development!

Quick Start

  1. Fork the repository
  2. Clone your fork and create a feature branch
  3. Make changes (entry point: app/index.js)
  4. Test your changes with npm start
  5. Submit a pull request to main branch

Each app/ subfolder contains a README explaining its purpose.

Development Setup

Prerequisites

Getting Started

# Clone your fork
git clone https://github.com/your-username/teams-for-linux.git
cd teams-for-linux

# Install dependencies
npm install

# Run from source
npm start

# Lint code (required before commits)
npm run lint
Code Quality

Always run npm run lint before committing. Pull requests with linting errors will not be accepted.

Building

Local Linux Build

# Create all Linux packages (deb, rpm, snap, AppImage, tar.gz)
npm run dist:linux

# Development build without packaging
npm run pack

Docker/Podman Build

For consistent builds across environments:

podman run -it --rm --volume .:/var/mnt:z -w /var/mnt/ node:20 /bin/bash -c \
"apt update && apt install -y rpm && npm ci && npm run dist:linux"

Snap-specific Build

npm run dist:linux:snap
cd dist && sudo snap install teams-for-linux_*.snap --dangerous

Architecture Overview

Key Components

  • Main Process (app/index.js) - Application entry point
  • Configuration (app/appConfiguration/) - Settings management
  • IPC System (app/ + browser scripts) - Process communication
  • Browser Integration (app/browser/) - Teams web app enhancements
  • System Features (notifications, tray, screen sharing)

Code Standards

Style Guidelines

  • ES6+ JavaScript - Use modern JavaScript features
  • No var - Use const by default, let for reassignment
  • async/await - Prefer over promise chains
  • Private fields - Use #property syntax for class private members
  • Arrow functions - For concise callbacks

Example Code Style

class ExampleModule {
#privateField = 'value';

constructor(config) {
this.config = config;
}

async performAction() {
try {
const result = await this.#processData();
return result;
} catch (error) {
console.error('Error in performAction:', error);
throw error;
}
}

#processData() {
// Private method implementation
return Promise.resolve(this.#privateField);
}
}

Error Handling

  • Use try-catch blocks for async operations
  • Log errors with context
  • Provide graceful degradation
  • Use electron-log for structured logging

Documentation

Contributing to Documentation

The documentation is built with Docusaurus and automatically deployed to GitHub Pages.

Local Documentation Development

# Navigate to docs site
cd docs-site

# Install dependencies
npm install

# Start development server
npm run start

# Build for production
npm run build

Adding New Documentation

  1. Create .md or .mdx files in docs-site/docs/
  2. Update docs-site/sidebars.ts to include new pages
  3. Test locally with npm run start
  4. Commit and push changes

Documentation Standards

  • Use Docusaurus admonitions for callouts (:::note, :::tip, :::warning)
  • Include code examples for technical documentation
  • Add cross-references to related documentation
  • Use Mermaid diagrams for architecture visualization

Testing

Manual Testing

# Run application in development mode
npm start

# Test specific features
npm start -- --user-data-dir=/tmp/test-profile

Build Testing

# Test production build
npm run pack
./dist/linux-unpacked/teams-for-linux

# Test package installation
sudo dpkg -i dist/teams-for-linux_*.deb
teams-for-linux

Pull Request Guidelines

Before Submitting

  • Code follows style guidelines
  • npm run lint passes without errors
  • Manual testing completed
  • Documentation updated if needed
  • Commit messages are descriptive

PR Requirements

  1. Target branch: Always target main branch
  2. Description: Clearly describe changes and motivation
  3. Testing: Include testing instructions
  4. Screenshots: For UI changes, include before/after screenshots
  5. Breaking changes: Clearly mark and document

Commit Message Format

type(scope): description

Longer explanation if needed

Fixes #123

Examples:

  • feat(config): add support for custom proxy settings
  • fix(notifications): resolve notification sound not playing
  • docs(api): update IPC channel documentation

Release Process

  1. Update version in package.json:

    • Patches: 1.0.01.0.1
    • Features: 1.0.01.1.0
    • Major: Reserved
  2. Update dependencies: npm install

  3. Add release notes in com.github.IsmaelMartinez.teams_for_linux.appdata.xml:

    <release version="2.0.17" date="2025-06-15">
    <description>
    <ul>
    <li>New feature description</li>
    <li>Bug fix description</li>
    </ul>
    </description>
    </release>
  4. Commit and push changes, then create a pull request

See Release Automation for technical details.

Getting Help

Development Questions

Community Support

Code of Conduct

We are committed to providing a welcoming and inspiring community for all. Please be respectful and constructive in all interactions.

License

By contributing to Teams for Linux, you agree that your contributions will be licensed under the GPL-3.0 license.