Files
MyTube/CONTRIBUTING.md

2.5 KiB

Contributing to MyTube

First off, thanks for taking the time to contribute! 🎉

The following is a set of guidelines for contributing to MyTube. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v14 or higher)
  • npm (v6 or higher)
  • Docker (optional, for containerized development)

Installation

  1. Fork the repository on GitHub.
  2. Clone your fork locally:
    git clone https://github.com/your-username/mytube.git
    cd mytube
    
  3. Install dependencies for both frontend and backend:
    npm run install:all
    
    Alternatively, you can install them manually:
    npm install
    cd frontend && npm install
    cd ../backend && npm install
    

Running Locally

To start the development environment (both frontend and backend):

npm run dev

Project Structure

  • frontend/: React application (Vite + TypeScript).
  • backend/: Express.js API (TypeScript).
  • docker-compose.yml: Docker configuration for running the full stack.

Development Workflow

  1. Create a Branch: Always work on a new branch for your changes.
    git checkout -b feature/my-awesome-feature
    # or
    git checkout -b fix/annoying-bug
    
  2. Make Changes: Implement your feature or fix.
  3. Commit: Write clear, descriptive commit messages.
    git commit -m "feat: add new video player controls"
    
    We recommend following Conventional Commits convention.

Code Quality

Frontend

  • Run linting to ensure code style consistency:
    cd frontend
    npm run lint
    

Backend

  • Run tests to ensure nothing is broken:
    cd backend
    npm run test
    

Pull Request Process

  1. Ensure your code builds and runs locally.
  2. Update the README.md if you are adding new features or changing configuration.
  3. Push your branch to your fork on GitHub.
  4. Open a Pull Request against the main branch of the original repository.
  5. Provide a clear description of the problem and solution.
  6. Link to any related issues.

License

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