-
-
Notifications
You must be signed in to change notification settings - Fork 1
Contributing
Saiful Alam Rakib edited this page Apr 22, 2026
·
1 revision
Thank you for your interest in contributing to Bill Organizer! This guide covers the development workflow, code standards, and pull request process.
Follow the Getting Started guide to set up the project locally before contributing.
- Follow PSR-12 coding standards
- Use Laravel Pint for automatic formatting:
composer run lint # or vendor/bin/pint # Format only changed files vendor/bin/pint --dirty
- Use type hints and return types on all methods
- Add PHPDoc blocks for non-obvious parameters
- Use snake_case for database columns and API response fields
- Use TypeScript for all new files — avoid
anytypes - Follow the Vue 3 Composition API style guide
- Use ESLint and Prettier for formatting:
yarn lint yarn format:check yarn format
- Use Zod schemas for form validation via VeeValidate
- Use descriptive variable and function names
- Write self-documenting code; comments should explain why, not what
- Keep functions small and focused on a single responsibility
- Write tests for all new features
feature/short-description # New features
fix/short-description # Bug fixes
refactor/short-description # Refactoring
docs/short-description # Documentation changes
chore/short-description # Tooling, CI, dependencies
- Fork the repository
-
Create a branch from
main:git checkout -b feature/my-new-feature
- Write tests for any new functionality
-
Ensure all tests pass:
php artisan test yarn lint -
Format your code:
composer run lint yarn format
-
Commit with a clear message following Conventional Commits:
feat: add bill duplication feature fix: correct recurring date calculation for leap years docs: update API authentication examples -
Push to your fork and open a Pull Request against
main - Fill out the PR description with:
- What the change does
- Why it's needed
- How to test it
- Screenshots (for UI changes)
Bill Organizer uses Pest PHP for backend testing.
test('user can create a bill', function () {
$user = User::factory()->withTeam()->create();
$response = $this->actingAs($user)
->postJson('/api/v1/bills', [
'title' => 'Netflix',
'amount' => 15.99,
'due_date' => '2026-05-01',
]);
$response->assertCreated()
->assertJsonPath('data.title', 'Netflix');
});# All tests
php artisan test
# API tests only
php artisan test tests/Feature/Api
# With coverage report
php artisan test --coverage
# A specific file
php artisan test tests/Feature/Api/V1/BillControllerTest.phpTest coverage expectations:
- Happy path (successful operation)
- Validation errors (missing/invalid fields)
- Authentication requirement (unauthenticated access)
- Authorization checks (wrong team, non-owner actions)
- Edge cases
# Start development servers
composer run dev
# Watch logs in real time
php artisan pail
# Enable query log for debugging
DB::enableQueryLog();
// ...your code...
dd(DB::getQueryLog());
# Reset database
php artisan migrate:fresh --seed
# Clear all caches
php artisan optimize:clear
# Restart queues
php artisan queue:restart- Add the route to
routes/api/v1.php - Create or update the controller in
app/Http/Controllers/Api/V1/ - Create or update the resource in
app/Http/Resources/Api/V1/ - Write a feature test in
tests/Feature/Api/V1/ - Update the relevant wiki page (or create a new one)
- Use GitHub Issues
- Search existing issues before creating a new one
- Include steps to reproduce, expected behavior, and actual behavior
- Attach logs or screenshots where relevant
By contributing, you agree that your contributions will be licensed under the same GNU General Public License as the project.
© Bill Organizer - Free for Personal use | Need paid license for Commercial use