Skip to main content
Thank you for your interest in contributing to Musika! This guide provides comprehensive information to help you contribute effectively to the project.

Code of Conduct

By participating in this project, you agree to abide by our Code of Conduct.

Our Pledge

We are committed to providing a welcoming and inspiring community for all. We pledge to:
  • Be respectful and inclusive
  • Use welcoming and inclusive language
  • Be respectful of differing viewpoints and experiences
  • Accept constructive criticism gracefully
  • Focus on what’s best for the community
  • Show empathy towards other community members

Unacceptable Behavior

  • The use of sexualized language or imagery
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others’ private information without explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Getting Started

Prerequisites

Before you begin contributing, ensure you have:
  • Android Studio Hedgehog or later
  • JDK 17 or later
  • Android SDK 26 or later
  • Git
  • Basic knowledge of Kotlin and Android development
  • Understanding of Jetpack Compose (preferred)
  • Familiarity with MVVM architecture pattern

Fork and Clone

1

Fork the repository

Fork the repository on GitHub to your account
2

Clone your fork

git clone https://github.com/YOUR_USERNAME/Musika.git
cd Musika
3

Add upstream repository

git remote add upstream https://github.com/jed1boy/Musika.git

Development Setup

Environment Setup

1

Install Android Studio

Install Android Studio with the latest Android SDK
2

Set up local.properties

cp local.properties.template local.properties
Edit local.properties and add your Android SDK path:
sdk.dir=/path/to/your/Android/sdk
Never commit your local.properties file to the repository as it contains local configuration specific to your development environment. The .gitignore file is configured to exclude this file.

Firebase Setup (Optional)

If you want to test Firebase features:
1

Create a Firebase project

Create a new project in the Firebase Console
2

Add Android apps

Add Android apps with package names:
  • com.musika.app (release)
  • com.musika.app.debug (debug)
3

Configure google-services.json

Copy the template and configure it with your Firebase credentials:
cp app/google-services.json.template app/google-services.json
Edit app/google-services.json with your Firebase project details.
Never commit your actual google-services.json file to the repository as it contains sensitive API keys. The .gitignore file is configured to exclude this file.

Build the Project

./gradlew assembleDebug

Handling Sensitive Information

When contributing to Musika, it’s crucial to handle sensitive information properly.

Files That Should Never Be Committed

The following files contain sensitive information and must never be committed:
  1. local.properties - Contains your local SDK path
  2. google-services.json - Contains Firebase API keys and project credentials
  3. Build outputs - Never commit .apk, .aab, .class, or other build artifacts
  4. IDE-specific files - Most .idea/ directory contents should not be committed
  5. Signing keys - *.keystore / *.jks files
  6. Secrets - secrets.properties or any file with API keys
  7. Authentication tokens - **/assets/po_token.html or similar

Best Practices

  • API Keys: Never hardcode API keys in the source code
  • Credentials: Never include usernames, passwords, or tokens in commits
  • Personal Information: Remove any personal information before committing
  • Before Committing: Always review your changes to ensure no sensitive information is included
  • If Accidentally Committed: If you accidentally commit sensitive information, contact a project maintainer immediately

Types of Contributions

We welcome various types of contributions:
  • Bug Fixes: Fix existing issues and improve stability
  • New Features: Add new functionality and capabilities
  • Documentation: Improve documentation and guides
  • UI/UX Improvements: Enhance user interface and experience
  • Performance: Optimize app performance and memory usage
  • Testing: Add or improve tests and test coverage
  • Translations: Add new language support and improve existing translations
  • Code Quality: Refactor code, improve architecture, and fix code smells
  • Security: Identify and fix security vulnerabilities

Before You Start

  1. Check existing issues to see if your idea is already being discussed
  2. Create an issue for significant changes to discuss the approach
  3. Fork the repository and create a feature branch
  4. Follow the coding standards outlined below

Pull Request Process

Create a Branch

git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-number-description

Make Your Changes

  • Write clean, readable code
  • Follow the existing code style
  • Add comments for complex logic
  • Update documentation if needed
  • Add tests for new features

Test Your Changes

./gradlew test

Commit Your Changes

Use clear, descriptive commit messages following Conventional Commits:
git add .
git commit -m "feat: add dark mode toggle to settings

- Add dark mode preference in settings
- Update theme switching logic
- Add corresponding UI tests

Fixes #123"

Commit Message Prefixes

  • feat: for new features
  • fix: for bug fixes
  • docs: for documentation changes
  • style: for formatting changes
  • refactor: for code refactoring
  • test: for adding tests
  • chore: for maintenance tasks

Push and Create PR

git push origin feature/your-feature-name
Then create a Pull Request on GitHub with:
  • Clear title and description
  • Reference to related issues
  • Screenshots for UI changes
  • Testing instructions

Issue Guidelines

Bug Reports

When reporting bugs, please include:
  1. Clear title describing the issue
  2. Steps to reproduce the bug
  3. Expected behavior vs actual behavior
  4. Screenshots or videos if applicable
  5. Device information (Android version, device model)
  6. App version and build type
  7. Logs if available
  8. Environment details (build variant, configuration)

Feature Requests

When requesting features, please include:
  1. Clear title describing the feature
  2. Detailed description of the feature
  3. Use case and why it would be useful
  4. Mockups or examples if applicable
  5. Alternative solutions you’ve considered
  6. Impact assessment (user experience, performance, etc.)

Coding Standards

Kotlin Style

  • Follow Kotlin Coding Conventions
  • Use meaningful variable and function names
  • Prefer val over var when possible
  • Use data classes for simple data holders
  • Use sealed classes for state management

Android Best Practices

  • Follow Android Code Style Guidelines
  • Use Jetpack Compose for UI
  • Implement MVVM architecture
  • Use Repository pattern for data access
  • Handle lifecycle properly

Code Organization

app/src/main/kotlin/com/musika/app/
├── ui/                    # UI components and screens
│   ├── components/        # Reusable UI components
│   ├── screens/          # Screen-specific UI
│   └── theme/            # Theme and styling
├── data/                 # Data layer
│   ├── repository/       # Repository implementations
│   ├── local/           # Local data sources
│   └── remote/          # Remote data sources
├── domain/              # Domain layer
│   ├── model/           # Domain models
│   ├── repository/      # Repository interfaces
│   └── usecase/         # Use cases
└── common/              # Common utilities
    ├── utils/           # Utility functions
    └── extensions/      # Extension functions

Naming Conventions

  • Classes: PascalCase (MusicPlayer)
  • Functions: camelCase (playMusic())
  • Variables: camelCase (currentSong)
  • Constants: UPPER_SNAKE_CASE (MAX_VOLUME)
  • Packages: lowercase (com.musika.app.ui)

Testing

Unit Tests

  • Write unit tests for business logic
  • Test repository implementations
  • Test use cases and utilities
  • Aim for high code coverage

UI Tests

  • Write UI tests for critical user flows
  • Test different screen sizes and orientations
  • Test accessibility features

Running Tests

./gradlew test

Documentation

Code Documentation

  • Document public APIs with KDoc
  • Add inline comments for complex logic
  • Keep README files updated
  • Document configuration changes

Release Process

Version Numbering

We follow Semantic Versioning:
  • MAJOR: Incompatible API changes
  • MINOR: New functionality (backward compatible)
  • PATCH: Bug fixes (backward compatible)

Release Checklist

  • All tests pass
  • Documentation is updated
  • Changelog is updated
  • Version numbers are bumped
  • Release notes are prepared

Community Guidelines

Communication Channels

  • GitHub Discussions: For general questions and discussions
  • GitHub Issues: For bug reports and feature requests
  • Pull Requests: For code contributions and reviews

Getting Help

If you have questions about contributing:
  1. Check the GitHub Discussions
  2. Create a new discussion
  3. Contact maintainers directly through GitHub

Recognition

Contributors will be recognized in:
  • README.md contributors section
  • Release notes
  • GitHub contributors page
  • App credits (if applicable)

Questions?

If you have questions about contributing:
  1. Check the GitHub Discussions
  2. Create a new discussion
  3. Contact maintainers directly
Thank you for contributing to Musika!

Build docs developers (and LLMs) love