Thank you for your interest in contributing to the Phoenix Starter Kit for Peek Pro Apps! This document provides guidelines and instructions for contributing.
- Elixir 1.14 or higher
- Erlang/OTP 25 or higher
- PostgreSQL 12 or higher
- Node.js 18 or higher (for asset compilation)
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/phoenix_starter_kit.git cd phoenix_starter_kit -
Install dependencies:
mix deps.get npm install --prefix assets
-
Set up your database:
mix ecto.setup
-
Run the test suite to ensure everything is working:
bin/check
Start the Phoenix server:
bin/serverThe application will be available at http://localhost:4000.
We maintain 100% test coverage. Before submitting a PR, ensure all tests pass:
# Run all tests with coverage
mix coveralls.lcov
# Run tests in watch mode during development
mix test.watch
# Run specific test file
mix test test/path/to/test_file.exs
# Run specific test by line number
mix test test/path/to/test_file.exs:42We use several tools to maintain code quality:
# Format code (required before committing)
mix format
# Run static analysis
mix credo
# Run all checks (format, credo, tests)
bin/checkUse descriptive branch names:
feature/add-new-widget-supportfix/partner-authentication-bugdocs/update-deployment-guiderefactor/simplify-webhook-handling
Write clear, descriptive commit messages:
Add support for custom webhook events
- Implement webhook event registry
- Add tests for custom event handling
- Update documentation with examples
Format:
- First line: Brief summary (50 chars or less)
- Blank line
- Detailed description with bullet points if needed
- Follow the existing code style
- Run
mix formatbefore committing - Keep functions small and focused
- Write descriptive variable and function names
- Add
@docand@moduledocfor public functions and modules - Use pattern matching and guards effectively
- Write tests for all new functionality
- Update existing tests when modifying behavior
- Use descriptive test names:
test "creates partner when installation webhook received" - Follow the Arrange-Act-Assert pattern
- Mock external dependencies appropriately
- Maintain 100% test coverage (or justify exceptions)
- Update README.md if adding new features or changing setup
- Update architecture.md if changing module boundaries or data models
- Add inline comments for complex logic
- Include examples in function documentation
- Update .env.example if adding new environment variables
- Ensure all tests pass:
bin/check - Update documentation as needed
- Add yourself to the contributors list (if not already there)
- Rebase on the latest main branch
- Ensure your branch has a clear, linear history
- Push your branch to your fork
- Open a Pull Request against the
mainbranch - Fill out the PR template completely
- Link any related issues
- Request review from maintainers
Use conventional commit format:
feat: Add webhook retry mechanismfix: Resolve partner authentication timeoutdocs: Update deployment instructionsrefactor: Simplify partner user contexttest: Add integration tests for webhookschore: Update dependencies
Include:
- What: What changes does this PR introduce?
- Why: Why are these changes needed?
- How: How were the changes implemented?
- Testing: How was this tested?
- Screenshots: If UI changes, include before/after screenshots
- Breaking Changes: List any breaking changes
- Migration Notes: Any special deployment or migration steps
- At least one maintainer approval required
- All CI checks must pass
- Address all review comments
- Keep the PR focused and reasonably sized
- Be responsive to feedback
When filing a bug report, include:
- Clear, descriptive title
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (Elixir version, OS, etc.)
- Relevant logs or error messages
- Screenshots if applicable
When proposing a feature:
- Explain the use case
- Describe the proposed solution
- Consider alternatives
- Discuss potential impact on existing functionality
- Be open to feedback and iteration
Documentation contributions are highly valued:
- Fix typos and grammar
- Clarify confusing sections
- Add examples
- Improve organization
- Update outdated information
Areas where contributions are especially welcome:
- Additional webhook handlers
- Improved error handling
- Performance optimizations
- Additional test coverage
- UI/UX improvements
- Accessibility enhancements
- Keep contexts focused and cohesive
- Avoid circular dependencies between contexts
- Use public functions as the context API
- Keep implementation details private
- Use UUIDs for primary keys
- Add appropriate indexes
- Write reversible migrations
- Include migration tests for complex changes
- Keep LiveView modules focused
- Extract reusable components
- Handle errors gracefully
- Optimize for minimal data over the wire
- Use temporary assigns for large data
- Never commit secrets or credentials
- Validate all user input
- Use parameterized queries (Ecto does this by default)
- Implement proper authorization checks
- Follow OWASP guidelines
- Questions: Open a GitHub Discussion
- Bugs: File a GitHub Issue
- Security Issues: Email security@peek.com (do not file public issues)
- General Chat: Join our community Slack (link TBD)
We are committed to providing a welcoming and inclusive environment for all contributors, regardless of background or identity.
- Be respectful and considerate
- Welcome newcomers and help them get started
- Provide constructive feedback
- Focus on what's best for the community
- Show empathy towards others
- Harassment or discrimination of any kind
- Trolling or insulting comments
- Personal or political attacks
- Publishing others' private information
- Other conduct inappropriate in a professional setting
Violations may result in temporary or permanent ban from the project. Report issues to the maintainers.
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Contributors will be recognized in:
- The project README
- Release notes for significant contributions
- Our contributors page (coming soon)
Don't hesitate to ask questions! We're here to help. Open a GitHub Discussion or reach out to the maintainers.
Thank you for contributing to Phoenix Starter Kit! 🎉