First off, thank you for considering contributing to Pushpin Missing Toolbox! It's people like you that make this project such a great tool.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Process
- Style Guidelines
- Testing
- Pull Request Process
- Project Structure
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on what is best for the community
- Show empathy towards other community members
- Java 17 or higher
- Docker and Docker Compose
- Git
- Your favorite IDE (IntelliJ IDEA recommended for Kotlin development)
-
Fork the repository
# Click the 'Fork' button on GitHub -
Clone your fork
git clone https://github.com/YOUR_USERNAME/pushpin-missing-toolbox.git cd pushpin-missing-toolbox -
Add the upstream repository
git remote add upstream https://github.com/mpecan/pushpin-missing-toolbox.git
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Start the development environment
docker-compose up -d ./gradlew build
Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples
- Describe the behavior you observed and what you expected
- Include logs and stack traces
- Note your environment (OS, Java version, Docker version)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the proposed functionality
- Explain why this enhancement would be useful
- List any alternatives you've considered
Unsure where to begin? Look for issues labeled:
good first issue- Good for newcomershelp wanted- Extra attention neededdocumentation- Documentation improvements
- Follow the style guidelines
- Write tests for new functionality
- Update documentation as needed
- Ensure all tests pass
- Write a clear commit message
# Build all modules
./gradlew build
# Build a specific module
./gradlew :server:build
# Run tests
./gradlew test
# Run integration tests
./gradlew integrationTest# Start Pushpin servers
docker-compose up -d
# Run the application
./gradlew bootRun
# Or run with specific profile
./gradlew bootRun --args='--spring.profiles.active=dev'server/- Main Spring Boot applicationpushpin-api/- GRIP protocol implementationpushpin-client/- Client library for publishing messagespushpin-testcontainers/- Testcontainers implementationdiscovery-*- Service discovery modulespushpin-security-*- Security modulespushpin-transport-*- Transport modules
We follow the Kotlin Coding Conventions with some additions:
// Classes: PascalCase
class PushpinServer
// Functions: camelCase
fun getBaseUrl(): String
// Properties: camelCase
val controlPort: Int
// Constants: UPPER_SNAKE_CASE
const val DEFAULT_TIMEOUT = 5000
// Test methods: use backticks for descriptive names
@Test
fun `should publish message successfully when server is healthy`() {
// test implementation
}// Order of class members
class ExampleService {
// 1. Companion object
companion object {
private val logger = LoggerFactory.getLogger(ExampleService::class.java)
}
// 2. Properties
private val timeout = Duration.ofSeconds(30)
// 3. Initialization block
init {
// initialization code
}
// 4. Constructors
constructor(param: String) : this()
// 5. Public methods
fun publicMethod() { }
// 6. Private methods
private fun helperMethod() { }
}- All public APIs must have KDoc comments
- Include examples in documentation when helpful
- Keep comments concise and meaningful
/**
* Publishes a message to all healthy Pushpin servers.
*
* @param message The message to publish
* @return Mono<Boolean> indicating success
* @throws PushpinException if no healthy servers are available
*
* @sample
* ```
* val message = Message.simple("channel", mapOf("data" to "hello"))
* pushpinService.publishMessage(message).block()
* ```
*/
fun publishMessage(message: Message): Mono<Boolean>- All new features must have tests
- Maintain or improve code coverage
- Write both unit and integration tests when applicable
# Run all tests
./gradlew test
# Run tests for a specific module
./gradlew :server:test
# Run a specific test class
./gradlew test --tests "*.PushpinServiceTest"
# Run with coverage
./gradlew test jacocoTestReport@SpringBootTest
@Testcontainers
class PushpinIntegrationTest {
@Container
val pushpinContainer = PushpinContainerBuilder()
.withPreset(PushpinPresets.minimal())
.build()
@Test
fun `should handle message publishing`() {
// Given
val message = TestDataBuilder.message()
// When
val result = pushpinService.publishMessage(message).block()
// Then
assertThat(result).isTrue()
}
}See the Testing Guide for detailed information about:
- Using the pushpin-testcontainers module
- Writing integration tests
- Testing patterns and best practices
-
Update your fork
git fetch upstream git checkout main git merge upstream/main
-
Create a feature branch
git checkout -b feature/your-feature
-
Make your changes
- Write code following style guidelines
- Add tests
- Update documentation
-
Commit your changes
git add . git commit -m "feat: add new feature - Detailed description of what changed - Why the change was made - Any breaking changes"
Follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc)refactor:- Code refactoringperf:- Performance improvementstest:- Test additions or correctionsbuild:- Build system changesci:- CI/CD changeschore:- Other changes
-
Push to your fork
git push origin feature/your-feature
-
Create a Pull Request
- Go to the original repository
- Click "New Pull Request"
- Select your fork and branch
- Fill in the PR template
- Link any related issues
- Tests pass (
./gradlew test) - Code follows style guidelines
- Documentation is updated
- Commit messages follow conventions
- PR description explains the changes
- Automated checks will run
- Maintainers will review your code
- Address any feedback
- Once approved, your PR will be merged
pushpin-missing-toolbox/
├── server/ # Main application
│ ├── src/main/kotlin/ # Application code
│ ├── src/test/kotlin/ # Tests
│ └── build.gradle.kts # Build configuration
├── pushpin-api/ # GRIP protocol library
├── pushpin-client/ # Client library
├── pushpin-testcontainers/ # Testing utilities
├── discovery-*/ # Discovery modules
├── pushpin-security-*/ # Security modules
├── pushpin-transport-*/ # Transport modules
├── docs/ # Documentation
├── docker-compose.yml # Development environment
└── gradlew # Build script
Releases are managed by maintainers:
- Update version in
gradle.properties - Update CHANGELOG.md
- Create a release tag
- GitHub Actions will build and publish
- Discord: Join our community server
- GitHub Issues: For bugs and features
- Documentation: Check the docs folder
- Examples: See Examples.md
Contributors are recognized in:
- The project README
- Release notes
- Our contributors page
Thank you for contributing to Pushpin Missing Toolbox! 🎉