Thank you for your interest in contributing to Streamlink Dashboard! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Setup
- Contributing Guidelines
- Pull Request Process
- Coding Standards
- Testing
- Documentation
By participating in this project, you are expected to uphold our Code of Conduct. Please be respectful and constructive in all interactions.
- Backend: Python 3.10+, pip
- Frontend: Node.js 20+, npm
- Database: SQLite (included)
- Recording: streamlink, ffmpeg
- Container: Docker & Docker Compose (optional)
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/streamlink-dashboard.git cd streamlink-dashboard
cd backend
# Create virtual environment (recommended)
python3.10 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run development server
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
# Install dependencies
npm install
# Run development server
npm run dev# Build and run with Docker Compose
docker-compose up --buildWe follow a Git Flow branching strategy:
master- Production-ready codedevelop- Integration branch for next releasefeature/*- New features (branch from develop)bugfix/*- Bug fixes (branch from develop)hotfix/*- Critical fixes (branch from master)
feature/issue-number-short-descriptionbugfix/issue-number-short-descriptionhotfix/critical-issue-description
Examples:
feature/14-youtube-platform-integrationbugfix/15-database-file-sync-issuehotfix/security-vulnerability-auth
- Create Issue: Always create an issue before starting work
- Create Branch: Create a feature/bugfix branch from
develop - Development: Make your changes following coding standards
- Testing: Ensure all tests pass and add new tests if needed
- Documentation: Update documentation if necessary
- Pull Request: Submit PR to
developbranch (notmaster) - Code Review: Address review feedback
- Merge: Maintainer will merge after approval
- Create or update tests for your changes
- Run the full test suite and ensure all tests pass
- Update documentation if needed
- Follow the coding standards
- Write clear, descriptive commit messages
- Target Branch: Submit PRs to
developbranch - Description: Use the PR template to describe your changes
- Scope: Keep PRs focused on a single feature/fix
- Size: Avoid large PRs (>500 lines changed)
- Tests: Include relevant tests
- Breaking Changes: Clearly mark breaking changes
- Automated checks (CI/CD) must pass
- Code review by maintainer(s)
- Address feedback and update PR
- Final approval and merge by maintainer
- Formatter: Use Black for code formatting
- Linting: Follow flake8 guidelines
- Type Hints: Use type hints where appropriate
- Docstrings: Follow Google-style docstrings
- Imports: Organize imports (stdlib, third-party, local)
# Example code style
from typing import Optional, List
import hashlib
from fastapi import HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from app.database.models import User
async def get_user_by_id(db: AsyncSession, user_id: int) -> Optional[User]:
\"\"\"
Retrieve a user by their ID.
Args:
db: Database session
user_id: User ID to lookup
Returns:
User object if found, None otherwise
\"\"\"
result = await db.execute(select(User).where(User.id == user_id))
return result.scalar_one_or_none()- Formatter: Use Prettier for code formatting
- Linting: Follow ESLint configuration
- Components: Use functional components with hooks
- Props: Define TypeScript interfaces for props
- State: Use Zustand for global state, useState for local state
// Example component
interface RecordingCardProps {
recording: Recording;
onDelete: (id: number) => void;
}
export const RecordingCard: React.FC<RecordingCardProps> = ({
recording,
onDelete,
}) => {
const [isLoading, setIsLoading] = useState(false);
// Component logic here
return (
<div className="recording-card">
{/* Component JSX */}
</div>
);
};Follow Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(auth): implement JSON login endpoint
fix(ui): resolve dashboard layout issues
docs: update installation instructions
test: add unit tests for recording service
cd backend
# Run all tests
pytest
# Run with coverage
pytest --cov=app --cov-report=html
# Run specific test file
pytest tests/test_auth.pycd frontend
# Run unit tests
npm test
# Run tests in watch mode
npm run test:watch
# Run E2E tests (if available)
npm run test:e2e- Test both frontend and backend together
- Verify API endpoints work correctly
- Test authentication flow end-to-end
- Validate recording functionality
- Backend: Use docstrings for functions and classes
- Frontend: Use JSDoc comments for complex functions
- API: Document API endpoints in code
- README: Keep README.md up to date
- Adding new features
- Changing existing functionality
- Updating configuration options
- Modifying API endpoints
- Adding new dependencies
- Questions: Use GitHub Discussions or create a Question issue
- Bugs: Create a Bug Report issue
- Features: Create a Feature Request issue
- Chat: (Add Discord/Slack link if available)
All contributors will be recognized in our README.md file. Thank you for helping make Streamlink Dashboard better!
By contributing to this project, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).