Getting Started
Prerequisites
- PHP 8.4 or higher
- Composer 2.x
- Bun 1.2.23+ (package manager)
- aria2 installed and accessible
- SQLite or MySQL/MariaDB
- Git
Initial Setup
- Clone the repository
- Install dependencies
- Configure environment
.env with your local configuration:
- Set up database
- Build frontend assets
- Start development server
- Laravel server (port 8000)
- Queue worker
- Log viewer (Pail)
- Vite dev server (port 5173)
Development Workflow
Running the Application
Standard development:Code Style
The project uses strict code style enforcement: PHP:IDE Helpers
IDE helper files are automatically generated aftercomposer update:
Making Changes
Branch Naming
Use descriptive branch names:feature/auto-episode-schedulingfix/download-retry-logicrefactor/api-integrationdocs/installation-guide
Commit Messages
Follow conventional commit format:Code Organization
Action Classes:- Place in
app/Actions/or subdirectories - Use
AsActiontrait for invokable actions - Make classes
readonlywhen possible - Use dependency injection in constructor
- Keep controllers thin
- Delegate business logic to Actions
- Return Inertia responses for SPA pages
- Use Spatie Laravel Data in
app/Data/ - Define TypeScript types with transformer
- Implement proper failure handling
- Use exponential backoff for retries
- Add job middleware when needed
Frontend Development
React Components:- Use TypeScript for all components
- Keep components in
resources/js/components/ - Pages go in
resources/js/pages/ - Follow existing component patterns
- Use Tailwind CSS classes
- Leverage Radix UI for complex components
- Maintain dark mode support
- Define page props interfaces
- Use TypeScript transformer for Laravel types
- Run
bun run typesto check
Testing
See the Testing Guide for comprehensive testing instructions. Quick reference:Pull Request Guidelines
Before Submitting
- Run code quality checks:
- Update tests:
- Add tests for new features
- Update existing tests for changes
- Ensure all tests pass
- Update documentation:
- Add inline code documentation
- Update relevant .mdx files if needed
PR Process
- Create PR with clear description:
- What does this PR do?
- Why is this change needed?
- How has it been tested?
- Screenshots for UI changes
- Link related issues:
- Use “Closes #123” or “Fixes #456”
- Ensure CI passes:
- GitHub Actions must pass
- Address any failing tests or linting issues
- Respond to review feedback:
- Make requested changes
- Discuss alternative approaches if needed
PR Template
Common Tasks
Adding a New Action
- Create action class in
app/Actions/ - Use
AsActiontrait - Implement
__invoke()method - Add tests in
tests/Feature/Actions/
Adding a New API Endpoint
- Create controller method
- Add route in appropriate
routes/file - Create/update Inertia page component
- Add TypeScript types
- Add feature tests
Adding a Database Migration
Adding a Queue Job
Getting Help
- Check existing issues on GitHub
- Review the documentation in
docs/ - Examine similar existing code patterns
- Ask questions in pull request discussions
Code of Conduct
- Be respectful and constructive
- Follow project coding standards
- Test your changes thoroughly
- Document complex logic
- Keep pull requests focused and scoped