Getting Started
Before contributing, make sure you have:- Forked and cloned the repository
- Set up your development environment
- Read the Extending Guide and Testing Guide
- Reviewed existing issues and pull requests
Development Setup
Code Style Standards
VIP2CARS uses Laravel Pint for automatic code style enforcement. All code must follow Laravel’s coding standards.Pint Configuration
The project uses Laravel’s preset, configured inpint.json:
pint.json
- PSR-12 coding standard
- Laravel-specific conventions
- Consistent formatting across the codebase
Running Pint
Always run
composer lint before committing. The CI pipeline will fail if code doesn’t pass Pint checks.Code Style Guidelines
Class Structure
Controller Structure
Naming Conventions
Classes and Namespaces
Classes and Namespaces
- Controllers: Singular,
PascalCase, suffix withController- ✅
ClienteController,VehiculoController - ❌
ClientesController,cliente_controller
- ✅
- Models: Singular,
PascalCase- ✅
Cliente,Vehiculo,User - ❌
Clientes,cliente
- ✅
- Migrations: Snake_case with timestamp prefix
- ✅
2026_03_04_001541_create_clientes_table.php - ❌
CreateClientesTable.php
- ✅
Methods and Variables
Methods and Variables
- Controller Methods:
camelCase, descriptive verbs- ✅
index(),store(),update(),destroy()
- ✅
- Variables:
camelCase, descriptive nouns- ✅
$clientes,$clienteData,$vehiculo - ❌
$data,$temp,$x
- ✅
- Route Names: Dot notation, lowercase
- ✅
clientes.index,vehiculos.store - ❌
clienteIndex,Vehiculos.Store
- ✅
Database
Database
- Tables: Plural,
snake_case- ✅
clientes,vehiculos,servicios - ❌
Cliente,Vehiculo,ServiciosTbl
- ✅
- Columns: Singular,
snake_case- ✅
nro_documento,fecha_servicio,created_at - ❌
NroDocumento,fechaServicio
- ✅
- Primary Keys:
id_{table_name_singular}- ✅
id_cliente,id_vehiculo,id_servicio - ❌
id,clienteId
- ✅
- Foreign Keys:
id_{referenced_table_singular}- ✅
id_cliente,id_vehiculo - ❌
cliente_id,fk_cliente
- ✅
Development Workflow
Branch Strategy
Create Feature Branch
Always create a new branch for your work:Branch naming conventions:
feature/- New featuresfix/- Bug fixesrefactor/- Code refactoringdocs/- Documentation changestest/- Test additions/updates
Make Your Changes
Follow the development cycle:
- Write failing tests first (TDD approach)
- Implement the feature/fix
- Ensure tests pass:
composer test - Fix code style:
composer lint - Manually test in browser
Commit Your Changes
Write clear, descriptive commit messages:Commit message format:
- First line: Brief summary (50 chars or less)
- Blank line
- Detailed description (wrap at 72 chars)
- Use present tense (“Add feature” not “Added feature”)
Before Submitting a PR
Complete this checklist:Code Quality Checklist
Code Quality Checklist
- All tests pass:
composer test - Code style is correct:
composer lint:check - No debug statements (
dd(),dump(),var_dump()) - No commented-out code
- No unused imports
- Proper type hints on methods
- PHPDoc blocks for complex methods
Testing Checklist
Testing Checklist
- New features have feature tests
- Bug fixes have regression tests
- Edge cases are covered
- Tests are descriptive and well-named
- Database changes have corresponding factory updates
- Relationships are tested
Documentation Checklist
Documentation Checklist
- Code is self-documenting with clear names
- Complex logic has comments
- README updated if needed
- API docs updated if applicable
- Migration documented if schema changes
Pull Request Process
Creating a Pull Request
Write a Clear Title
Use a descriptive title that summarizes the change:
- ✅ “Add service management feature with CRUD operations”
- ✅ “Fix validation bug in cliente email uniqueness check”
- ✅ “Refactor vehiculo controller to use form requests”
- ❌ “Update”
- ❌ “Fix bug”
- ❌ “Changes”
Request Review
- Assign relevant reviewers
- Add appropriate labels
- Link related issues
- Be responsive to feedback
PR Review Guidelines
Reviewers will check:-
Code Quality
- Follows Laravel and project conventions
- Clean, readable, maintainable code
- Proper error handling
- No security vulnerabilities
-
Testing
- Adequate test coverage
- Tests are meaningful and well-written
- All tests pass
-
Documentation
- Code is well-commented where needed
- README/docs updated if needed
- Commit messages are clear
-
Functionality
- Feature works as described
- No regression bugs introduced
- Handles edge cases
PR Approval and Merge
- PRs require at least one approval
- All CI checks must pass
- Conflicts must be resolved
- Maintainers will merge approved PRs
Testing Standards
All contributions must include appropriate tests.Test Coverage Requirements
- New features: Must have feature tests covering main functionality
- Bug fixes: Must have regression tests preventing the bug’s return
- Refactoring: Existing tests must still pass
- API changes: Must update or add integration tests
Running Tests Locally
Before submitting your PR:Reporting Issues
When reporting bugs or requesting features:Bug Reports Should Include
Feature Requests Should Include
Code Review Tips
For Contributors
For Reviewers
Common Issues and Solutions
Pint Failures
Pint Failures
If Pint reports style issues:
Test Failures
Test Failures
If tests fail:
Merge Conflicts
Merge Conflicts
If you have merge conflicts:
Failed CI Checks
Failed CI Checks
Common CI failure reasons:
- Code style issues: Run
composer lint - Test failures: Run
composer testlocally - Merge conflicts: Rebase on main
- Missing dependencies: Run
composer install - Environment issues: Check
.env.examplefor new variables
Composer Scripts Reference
VIP2CARS provides convenient composer scripts:composer.json
Usage Examples
Getting Help
If you need assistance:- Check existing documentation
- Search existing issues and PRs
- Ask in discussions or create an issue
- Be specific and provide context
- Include relevant code snippets and error messages
Recognition
Contributors are recognized in:- GitHub contributors page
- Release notes for significant contributions
- Project README (for major features)
Code of Conduct
All contributors must:- Be respectful and professional
- Focus on constructive feedback
- Welcome newcomers
- Respect different viewpoints
- Accept responsibility for mistakes
Resources
Next Steps
Now that you understand our contribution process:- Find an issue to work on or propose a new feature
- Follow the Extending Guide to implement your changes
- Write tests following the Testing Guide
- Submit your PR following these guidelines