Skip to content

Commit Guidelines

This project uses Conventional Commits for consistent commit messages.

Use the interactive commit tool:

Terminal window
pnpm commit

This will guide you through creating a properly formatted commit message.

<type>(<scope>): <subject>
[optional body]
[optional footer]

The type must be one of the following:

TypeDescriptionExample
feat✨ A new featurefeat(api): add user search endpoint
fix🐛 A bug fixfix(auth): resolve JWT validation error
docs📝 Documentation changesdocs: update installation guide
style💄 Code style changesstyle(api): format with prettier
refactor♻️ Code refactoringrefactor(db): simplify query logic
perf⚡ Performance improvementsperf(stream): optimize video buffering
test✅ Adding or updating teststest(api): add auth integration tests
build📦 Build system changesbuild: update dependencies
ci👷 CI/CD changesci: add automated release workflow
chore🔧 Other changeschore: update gitignore
revert⏪ Revert a commitrevert: revert "feat: add feature"

The scope is optional and represents the area of the codebase affected:

Available scopes:

  • api - Backend API
  • database - Database changes
  • websocket - WebSocket functionality
  • stream - Streaming features
  • library - Library management
  • movies - Movie-related features
  • tvshows - TV show features
  • scan - Media scanning
  • settings - Settings functionality
  • auth - Authentication
  • middleware - Middleware
  • config - Configuration
  • deps - Dependencies
  • docker - Docker configuration
  • ci - CI/CD
  • docs - Documentation
  • release - Release management

You can also use custom scopes when needed.

The subject contains a succinct description of the change:

  • Use the imperative, present tense: “change” not “changed” nor “changes”
  • Don’t capitalize the first letter
  • No period (.) at the end
  • Keep it under 100 characters

Good examples:

add user authentication
fix memory leak in stream handler
update API documentation

Bad examples:

Added user authentication (past tense)
Fix Memory Leak (capitalized)
updated API documentation. (period at end)

The body is optional and should include:

  • Motivation for the change
  • Contrast with previous behavior
  • Implementation details (if complex)

Use | to break lines in the interactive commit tool.

The footer is optional and should include:

  • Breaking changes (prefixed with BREAKING CHANGE:)
  • Issue references (e.g., Closes #123)

Breaking changes must be indicated in two ways:

  1. Add ! after the type/scope:

    feat(api)!: redesign authentication API
  2. Add BREAKING CHANGE: in the footer:

    feat(api)!: redesign authentication API
    Replace REST authentication with OAuth2 flow
    BREAKING CHANGE: The /auth/login endpoint has been removed.
    Use OAuth2 flow instead. See migration guide for details.
feat(api): add user search endpoint
Implement search functionality for users with filters:
- Search by username
- Search by email
- Pagination support
Closes #42
fix(auth): resolve JWT validation error
Fix issue where expired tokens were not properly rejected,
causing 401 errors on valid requests.
Fixes #123
feat(api)!: redesign authentication API
Replace REST authentication endpoints with OAuth2 flow
for improved security and standards compliance.
BREAKING CHANGE: The following endpoints have been removed:
- POST /auth/login
- POST /auth/register
Use the new OAuth2 flow instead. See docs/migration.md for
migration guide.
Closes #56
docs: update versioning guide
Add examples for breaking changes and clarify
when to create changesets.
perf(stream): optimize video buffering
Reduce initial buffering time by 50% through:
- Implement adaptive bitrate streaming
- Optimize chunk size
- Add memory caching layer
refactor(database): simplify query logic
Extract common query patterns into reusable functions
to reduce code duplication and improve maintainability.

If you have multiple logical changes, make separate commits:

Terminal window
# Commit 1
git add src/auth/
pnpm commit
# feat(auth): add OAuth2 support
# Commit 2
git add src/api/
pnpm commit
# docs(api): update authentication examples

Commits are automatically validated using commitlint. If your commit message doesn’t follow the convention, you’ll see an error:

⧗ input: Added new feature
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
  1. Atomic commits - One logical change per commit
  2. Clear subjects - Describe what changed, not how
  3. Add context - Use the body for complex changes
  4. Reference issues - Link to relevant issues
  5. Break changes properly - Always document breaking changes
  6. Test before committing - Ensure tests pass
  7. Use the interactive tool - pnpm commit helps you follow the format