Contributing to Teams for Linux
Thank you for considering contributing! This guide will help you get started with development.
This project is a great starting point for learning Electron development!
Quick Start
- Fork the repository
- Clone your fork and create a feature branch
- Make changes (entry point:
app/index.js
) - Test your changes with
npm start
- Submit a pull request to
main
branch
Each app/
subfolder contains a README explaining its purpose.
Development Setup
Prerequisites
- Node.js and npm - Installation guide
- Git for version control
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
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
- Useconst
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
- Create
.md
or.mdx
files indocs-site/docs/
- Update
docs-site/sidebars.ts
to include new pages - Test locally with
npm run start
- 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
- Target branch: Always target
main
branch - Description: Clearly describe changes and motivation
- Testing: Include testing instructions
- Screenshots: For UI changes, include before/after screenshots
- 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
-
Update version in
package.json
:- Patches:
1.0.0
→1.0.1
- Features:
1.0.0
→1.1.0
- Major: Reserved
- Patches:
-
Update dependencies:
npm install
-
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> -
Commit and push changes, then create a pull request
See Release Automation for technical details.
Getting Help
Development Questions
- IPC API Documentation - Inter-process communication reference
- Configuration Guide - Understanding the config system
- Architecture Documentation - System overview
Community Support
- Matrix Chat: #teams-for-linux_community:gitter.im
- GitHub Discussions: Project discussions
- GitHub Issues: Bug reports and feature requests
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.
Related Documentation
- Configuration Options - Application configuration reference
- IPC API - Developer integration documentation
- Release Automation - Release process details