Thank you for your interest in contributing to GO Train Tracker Android! This document provides guidelines and instructions for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/MyGOTrainTracker.git
- Create a new branch for your feature:
git checkout -b feat/your-feature-name
- Set up your development environment:
- Install Android Studio
- Install the required plugins:
- Kotlin
- Jetpack Compose
- KSP
- Configure your local.properties with your API key
- Open the project in Android Studio
- Let Gradle sync complete (this will automatically install git hooks)
Note: Git hooks for conventional commits are automatically installed when you sync the project in Android Studio. No manual setup is required.
- Follow the Kotlin Coding Conventions
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Use appropriate access modifiers
- Follow Clean Architecture principles
- Keep the layers separate and maintain their boundaries
- Use dependency injection (Koin)
- Implement proper error handling
- Write unit tests for business logic
- Follow Material Design 3 guidelines
- Ensure accessibility compliance
- Support both light and dark themes
- Handle different screen sizes
- Implement proper error states
- Write unit tests for all business logic
- Write UI tests for critical user flows
- Ensure test coverage for new features
- Run all tests before submitting PRs
-
Update your branch with the latest changes from main:
git fetch origin git rebase origin/main
-
Run the following checks:
- Run all tests
- Check code formatting
- Verify no lint errors
- Build the project
-
Create a Pull Request:
- Use the provided PR template
- Include screenshots for UI changes
- Link related issues
- Provide clear description of changes
-
Address review comments and make necessary changes
We strictly follow the Conventional Commits specification with a simplified format. This is enforced through a pre-commit hook.
type: description
[optional body]
[optional footer]
feat
: A new featurefix
: A bug fixdocs
: Documentation only changesstyle
: Changes that do not affect the meaning of the code (white-space, formatting, etc.)refactor
: A code change that neither fixes a bug nor adds a featureperf
: A code change that improves performancetest
: Adding missing tests or correcting existing testsbuild
: Changes that affect the build system or external dependenciesci
: Changes to CI configuration files and scriptschore
: Other changes that don't modify source or test files
- Use imperative, present tense: "change" not "changed" nor "changes"
- Don't capitalize first letter
- No dot (.) at the end
feat: add biometric authentication
fix: handle network timeout gracefully
docs: update installation instructions
style: align buttons consistently
refactor: optimize database queries
perf: implement response caching
test: add unit tests for login flow
build: update kotlin to 1.9.0
ci: add sonar analysis
chore: update gradle wrapper
A pre-commit hook is installed to enforce this convention. If your commit message doesn't follow the convention, the commit will be rejected with an error message explaining the expected format.
To bypass the hook (not recommended):
git commit -m "your message" --no-verify
- All PRs require at least one review
- Address all review comments
- Ensure CI checks pass
- Merge only after approval
- Update README.md for significant changes
- Add inline documentation for complex code
- Update API documentation if needed
- Document any new dependencies
- Update version numbers
- Update changelog
- Create release branch
- Run release tests
- Create release tag
- Deploy to Play Store
- Open an issue for bugs
- Use discussions for questions
- Join our community chat
- Contact maintainers
By contributing, you agree that your contributions will be licensed under the project's license with the same restrictions.
Thank you for contributing to GO Train Tracker Android!