Development Documentation
This directory contains technical documentation for Teams for Linux developers and contributors.
Structure
Active Development Docs
- token-cache-architecture.md - Token cache implementation, secure storage architecture, and authentication persistence
- dom-access-investigation.md - Research and findings on DOM access requirements, React breaking changes, and API feasibility
- security-architecture.md - Security architecture, threat model, and compensating controls documentation
- ADR-002: Token Cache Secure Storage - Architecture decision for secure token storage implementation
- ADR-003: Token Refresh Implementation - Architecture decision for authentication persistence
For Contributors
When working on Teams for Linux:
- Review token cache architecture for authentication and secure storage patterns
- Read the security architecture to understand security trade-offs and requirements
- Review DOM access investigation (research) for context on current implementation choices
- Check ADR documents for architecture decisions and rationale
- Check planning documents for background on feature decisions and research
- Run E2E tests before submitting PRs with
npm run test:e2e
Key Development Patterns
Token Cache Integration
When working with authentication-related features:
- Use the existing
tokenCachesingleton fromapp/browser/tools/tokenCache.js - Follow the established async/await patterns for storage operations
- Implement graceful fallback mechanisms for storage failures
- Maintain PII-safe logging practices
Secure Storage Guidelines
- Prefer the unified token cache over direct localStorage access
- Let the system handle storage backend selection automatically
- Don't assume secure storage availability - always implement fallbacks
- Use the
getStorageInfo()method for debugging and diagnostics
Documentation Standards
Follow the project's Copilot Instructions (.github/copilot-instructions.md) for documentation standards, including:
- Use GitHub's alert syntax for callouts (
> [!NOTE],> [!WARNING]) - Include table of contents with
<!-- toc --> - Use proper markdown standards and syntax highlighting
Related Documentation
- Configuration Options - User-facing configuration documentation
- IPC API - Inter-process communication reference
- Contributing Guidelines - General contribution guidelines
- Architecture Decision Records - Technical decisions and rationale
Testing
Teams for Linux uses automated end-to-end testing with Playwright to ensure application stability and prevent regressions.
Running Tests
# Run all E2E tests
npm run test:e2e
# Run in debug mode
npx playwright test --debug
Testing Strategy
The project uses a multi-layered testing approach:
- E2E Tests (Playwright): Full application testing with real Electron runtime
- Clean State Testing: Each test runs with isolated temporary userData directory
- Microsoft Authentication: Tests validate redirect to login without requiring credentials
For comprehensive testing documentation, see:
ADR Index
- ADR-001: DesktopCapturer Source ID Format - Decision on screen sharing source identification format
- ADR-002: Token Cache Secure Storage - Decision to implement OS-level secure storage for authentication tokens
- ADR-003: Token Refresh Implementation - Decision on token refresh strategy and implementation