Thank you for considering contributing to LaraCoreKit! This document outlines the process and guidelines for contributing.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
- Module Development
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
- Be respectful and considerate
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Accept responsibility and apologize when mistakes occur
- Prioritize what is best for the community
Before submitting a bug report:
- Check the existing issues to avoid duplicates
- Use the latest version of LaraCoreKit
- Collect relevant information (Laravel version, PHP version, error messages, stack traces)
When submitting a bug report, include:
- Clear, descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Environment details (OS, PHP version, database)
- Screenshots or code snippets if applicable
Feature suggestions are welcome! Please:
- Check if the feature has already been suggested
- Provide a clear use case and rationale
- Explain how it benefits the community
- Consider whether it belongs in core or as an addon module
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Write/update tests
- Run the test suite
- Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
- PHP 8.3+
- Composer
- Node.js & NPM
- MySQL, PostgreSQL, or SQLite
# Clone your fork
git clone https://github.com/YOUR-USERNAME/LaraCoreKit.git
cd LaraCoreKit
# Install dependencies
composer install
npm install
# Setup environment
cp .env.example .env
php artisan key:generate
# Setup database
touch database/database.sqlite
php artisan migrate --seed
php artisan storage:link
# Create admin user
php artisan filament:user
# Start development servers
npm run dev
php artisan serve# Run tests
composer test
# Run code style fixer
composer pint
# Run static analysis
vendor/bin/phpstan analyse
# Run all quality checks
composer review
# Build assets
npm run build- Update documentation if needed
- Add/update tests for your changes
- Run the full test suite and ensure it passes
- Run code style checks with Pint
- Run static analysis with PHPStan
- Update CHANGELOG.md under
[Unreleased]section
Use conventional commits format:
feat: Add new featurefix: Fix bug in moduledocs: Update documentationstyle: Format coderefactor: Refactor module structuretest: Add missing testschore: Update dependencies
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
How has this been tested?
## Checklist
- [ ] Tests pass locally
- [ ] Code follows style guidelines
- [ ] Documentation updated
- [ ] CHANGELOG.md updated- Maintainers will review your PR within 7 days
- Address feedback and update your PR
- Once approved, a maintainer will merge your PR
- Your contribution will be included in the next release
- Follow PSR-12 coding style
- Use strict types (
declare(strict_types=1)) - Add type hints for all parameters and return types
- Write descriptive variable and method names
- Keep methods focused and single-purpose
- Follow Laravel naming conventions
- Use Eloquent ORM for database operations
- Use form requests for validation
- Use policies for authorization
- Use events and listeners for decoupled logic
- Use queues for long-running tasks
We use Laravel Pint for code formatting:
composer pintTo check without fixing:
composer pint --test- Write tests for all new features
- Update tests when modifying existing features
- Aim for high code coverage
- Test edge cases and error conditions
public function test_user_can_create_blog_post(): void
{
// Arrange
$user = User::factory()->create();
// Act
$response = $this->actingAs($user)->post('/blog/posts', [
'title' => 'Test Post',
'content' => 'Test content',
]);
// Assert
$response->assertStatus(201);
$this->assertDatabaseHas('blogs', ['title' => 'Test Post']);
}# Run all tests
php artisan test
# Run specific test file
php artisan test tests/Feature/BlogTest.php
# Run with coverage
php artisan test --coverage
# Run specific test method
php artisan test --filter=test_user_can_create_blog_post- Code comments - Complex logic and business rules
- PHPDoc blocks - All classes and public methods
- README.md - Installation and quick start
- docs/ - Comprehensive feature documentation
- CHANGELOG.md - All changes
- Write clear, concise explanations
- Include code examples
- Add screenshots for UI features
- Link to related documentation
- Keep documentation up to date
Each module should follow this structure:
modules/YourModule/
├── src/
│ ├── YourModuleServiceProvider.php
│ ├── Http/
│ ├── Models/
│ ├── Policies/
│ └── Filament/
├── database/
│ ├── migrations/
│ └── seeders/
├── routes/
│ └── web.php
├── views/
├── lang/
├── config/
├── tests/
├── README.md
└── CHANGELOG.md
- Follow the core module contract
- Include migrations, routes, and seeders
- Provide Filament resources for admin
- Include translations for all languages
- Write comprehensive tests
- Document all features
- Specify version compatibility
Specify supported versions in your module's composer.json:
{
"require": {
"php": "^8.3",
"laravel/framework": "^13.0",
"filament/filament": "^5.0",
"livewire/livewire": "^4.0"
}
}feature/feature-name- New featuresfix/bug-name- Bug fixesdocs/doc-update- Documentationrefactor/refactor-name- Code refactoringtest/test-name- Test additions
Write clear commit messages:
feat: Add blog post scheduling feature
- Add scheduled_at column to blogs table
- Create scheduler command for publishing
- Add admin UI for scheduling
- Write tests for scheduling logic
By contributing to LaraCoreKit, you agree that your contributions will be licensed under the MIT License.
- Open a GitHub Discussion
- Check the FAQ
- Read the docs: https://www.laracorekit.com/docs
Thank you for contributing to LaraCoreKit!