Thank you for considering contributing to this project! To maintain a high-quality, production-ready codebase, we adhere to strict architectural and coding standards.
- Environment: Ensure you have PHP 8.2+, Composer, and a supported database.
- Initialization:
This script installs dependencies and sets up necessary git hooks.
chmod +x scripts/setup-project.sh && ./scripts/setup-project.sh
All contributions must follow these core principles:
- Strict Typing: Every PHP file must start with
declare(strict_types=1);. - Service Layer: Business logic must reside in
app/Services, not in controllers. - API Versioning: New endpoints should be versioned (e.g.,
Api/V1). - Standardized Responses: Use the
ApiResponsetrait for all JSON outputs. - Feature Modules: Use
php artisan make:api-module {Name}to scaffold new feature sets correctly.
We follow the PSR-12 coding standard.
Before submitting a pull request, please run the following checks:
- Styling:
./vendor/bin/pint - Formatting:
npm run format(Prettier) - Static Analysis:
./vendor/bin/phpstan analyse - Testing:
php artisan test
Our pre-commit hook will automatically run these checks for you. Ensure your commit passes all local checks before pushing.
- Create a new feature branch from
main. - Ensure your code is well-tested (100% feature coverage for new endpoints).
- Update the
CHANGELOG.mdunder the[Unreleased]section. - If adding a new module, provide documentation in
docs/api-modules. - Submit a descriptive Pull Request for review.