Contributing Guide
Help us improve LiVue. Every contribution matters.
Welcome Contributors
We appreciate your interest in contributing to LiVue! Whether you're fixing bugs, adding features, improving documentation, or reporting issues, your help makes LiVue better for everyone.
Before contributing, please read through this guide to understand our development workflow and coding standards.
Development Setup
Follow these steps to set up your local development environment:
1. Fork and Clone
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/livue.git
cd livue
2. Install Dependencies
composer install
npm install
3. Configure Environment
cp .env.example .env
php artisan key:generate
4. Start Development Server
# With Laravel Sail:
./vendor/bin/sail up -d
./vendor/bin/sail npm run dev
# Or without Sail:
php artisan serve
npm run dev
Coding Standards
To maintain code consistency across the project, please follow these guidelines:
PHP
- Follow PSR-12 coding standards
- Use PHP 8.2+ features (typed properties, attributes, named arguments)
- Add type declarations for parameters and return types
-
Run
./vendor/bin/pintbefore committing
JavaScript
- Use ES6+ syntax (arrow functions, destructuring, async/await)
- Follow Vue.js best practices and composition API patterns
- Use descriptive variable and function names
Git Commits
- Write clear, descriptive commit messages
-
Use conventional commit format:
type(scope): description -
Types:
feat,fix,docs,style,refactor,test,chore
Pull Request Process
Create a Branch
Create a feature branch from main:
git checkout -b feature/your-feature-name
Make Your Changes
Write your code following our coding standards. Keep changes focused and atomic.
Write Tests
Add or update tests for your changes:
# Run the test suite
./vendor/bin/sail artisan test
# Or with coverage
./vendor/bin/sail artisan test --coverage
Submit PR
Push your branch and open a Pull Request with a clear description of your changes, the problem it solves, and any relevant issue numbers.
Reporting Bugs
Found a bug? Help us fix it by providing a detailed report:
Before Reporting
- • Search existing issues to avoid duplicates
- • Verify the bug exists on the latest version
- • Check if it's a configuration issue
Include in Your Report
- • LiVue version and Laravel version
- • PHP and Node.js versions
- • Steps to reproduce the issue
- • Expected vs actual behavior
- • Minimal code example if possible
- • Error messages and stack traces
Feature Requests
Have an idea for a new feature? We'd love to hear it! When proposing a feature:
- Clearly describe the problem the feature would solve
- Explain your proposed solution
- Consider alternatives you've thought about
- Provide use cases and examples
Testing
All contributions must include appropriate tests. Here's how to run the test suite:
# Run all tests
./vendor/bin/sail artisan test
# Run specific test file
./vendor/bin/sail artisan test tests/Feature/ComponentTest.php
# Run tests with filter
./vendor/bin/sail artisan test --filter=test_component_renders
# Run JavaScript tests
npm run test
Note: PRs without tests for new functionality will not be merged. If you're unsure how to test something, ask in the PR.
Code of Conduct
We are committed to providing a welcoming and inclusive environment. Please:
- Be respectful and considerate in all interactions
- Focus on constructive feedback
- Welcome newcomers and help them learn
- Report unacceptable behavior to the maintainers