Skip to content

Contributing

Guide for contributing to Subtide development.


  • Node.js 18+
  • Python 3.9+
  • FFmpeg
  • Git
Terminal window
git clone https://github.com/rennerdo30/subtide.git
cd subtide

Terminal window
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Run development server
./run.sh
Terminal window
# No build step required - extension uses vanilla JS
# Load in Chrome:
# 1. Go to chrome://extensions
# 2. Enable Developer mode
# 3. Load unpacked → select 'extension' folder

graph TD
    Root[subtide/]

    Root --> Backend[backend/<br/><i>Python Flask server</i>]
    Root --> Extension[extension/<br/><i>Chrome Extension</i>]
    Root --> Docs[docs/<br/><i>Documentation</i>]
    Root --> GitHub[.github/<br/><i>CI/CD workflows</i>]

    Backend --> AppPy[app.py<br/><i>Entry point</i>]
    Backend --> ConfigPy[config.py<br/><i>Configuration</i>]
    Backend --> Routes[routes/<br/><i>API endpoints</i>]
    Backend --> Services[services/<br/><i>Business logic</i>]
    Backend --> Utils[utils/<br/><i>Utilities</i>]
    Backend --> Tests[tests/<br/><i>Test suite</i>]

    Extension --> Manifest[manifest.json]
    Extension --> Src[src/]
    Extension --> Locales[_locales/<br/><i>Translations</i>]

    Src --> Background[background/<br/><i>Service worker</i>]
    Src --> Content[content/<br/><i>Content scripts</i>]
    Src --> Popup[popup/<br/><i>Extension popup</i>]
    Src --> Lib[lib/<br/><i>Shared utilities</i>]

    style Root fill:#f97316,stroke:#ea580c,color:#fff
    style Backend fill:#22d3ee,stroke:#0891b2,color:#000
    style Extension fill:#22d3ee,stroke:#0891b2,color:#000
    style Docs fill:#94a3b8,stroke:#64748b,color:#000
    style GitHub fill:#94a3b8,stroke:#64748b,color:#000

Terminal window
cd backend
# Run all tests
pytest
# With coverage
pytest --cov=. --cov-report=term-missing
# Specific test file
pytest tests/test_translation.py
# Verbose output
pytest -v

We aim for close to 100% test coverage. All new features and bug fixes should include tests.


  • Follow PEP 8
  • Use type hints where practical
  • Maximum line length: 100 characters
  • Use ES6+ features
  • No external dependencies (vanilla JS)
  • Use JSDoc comments for complex functions

Terminal window
git checkout -b feature/your-feature-name
  • Write code
  • Add tests
  • Update documentation if needed
Terminal window
cd backend
pytest
Terminal window
git add .
git commit -m "Add feature: description"
Terminal window
git push origin feature/your-feature-name

Then create a Pull Request on GitHub.


  • All tests pass
  • Code follows style guidelines
  • Documentation updated (if applicable)
  • Commit messages are clear

Include:

  • What the PR does
  • Why the change is needed
  • How to test it
  • Screenshots (for UI changes)

Include:

  • Browser and version
  • Operating system
  • Steps to reproduce
  • Expected vs actual behavior
  • Error messages
  • Screenshots if applicable

Include:

  • Clear description of the feature
  • Use case / why it’s needed
  • Any implementation ideas

  • Manifest V3: Required for modern Chrome extensions
  • Vanilla JS: No build step, easier debugging
  • Content Scripts: Separate scripts per platform (YouTube, Twitch, generic)
  • Flask: Simple, well-documented
  • Gunicorn: Production-ready server
  • Multiple Whisper backends: Support different hardware

  • Documentation improvements
  • Bug fixes
  • Test coverage
  • Localization (new languages)
  • Safari extension support
  • Additional video platforms
  • Performance optimizations
  • UI/UX improvements


By contributing, you agree that your contributions will be licensed under the MIT License.