Getting Started
Thank you for your interest in contributing to AnimeThemes Server! This guide will help you set up your development environment and understand our contribution workflow. For questions and support, join the Discord Server and use the #api channel.Prerequisites
Before you begin, ensure you have the following installed:- PHP 8.5 or higher
- MySQL 8+
- Composer for dependency management
- Web Server: Laravel Herd, Apache, or Nginx
Required PHP Extensions
Enable these extensions in yourphp.ini:
fileinfo- Detects MIME types during seedinggd- Fakes image files for testingpdo_mysql- MySQL database connectivityext-intl- Internationalization support
PHP Configuration
For video upload support, adjust thesephp.ini settings:
Development Setup
1. Clone the Repository
2. Create Database
3. Install Dependencies
- Install Composer dependencies
- Copy
.env.exampleto.env - Generate application key
- Run database migrations
- Execute seeders and import dumps
- Optimize the application
4. Configure Web Server
Using Laravel Herd
Using Apache/Nginx
Configure your web server to point to thepublic directory.
5. Verify Installation
Visithttp://animethemes.test (or your configured server name). If successful, the application should be running.
Development Workflow
Creating Users
Use Laravel Tinker to create test users:Feature Flags
Features requiring external services are disabled by default. Enable them via database configuration:Local Storage Configuration
For local development, configure filesystem disks in.env:
Elasticsearch (Optional)
To enable Scout search functionality:.env:
Code Standards
Code Style
The project uses Laravel Pint for code styling, following Laravel conventions with custom rules defined inpint.json.
Key standards:
- Strict types: All PHP files must declare
declare(strict_types=1); - Array syntax: Use short array syntax
[] - Imports: Alphabetically ordered, no unused imports
- Spacing: Follow PSR-12 standards
- Method casing: Use camelCase for test methods
Running Code Style Checks
- Pint: Code formatting
- Rector: Automated refactoring
Static Analysis
Run PHPStan for type checking:phpstan.neon.
StyleCI
The project uses StyleCI for automated code style verification on pull requests.Code of Conduct
All contributors must follow the Contributor Covenant Code of Conduct.Our Standards
- Use welcoming and inclusive language
- Be respectful of differing viewpoints
- Accept constructive criticism gracefully
- Focus on what’s best for the community
- Show empathy toward other contributors
Reporting Issues
Report unacceptable behavior to [email protected].Submitting Changes
Before Submitting
- Ensure all tests pass
- Run code style checks
- Add tests for new functionality
- Update documentation as needed
Pull Request Process
- Create a feature branch from
main - Make your changes following code standards
- Commit with clear, descriptive messages
- Push to your fork
- Open a pull request with a clear description
Commit Messages
Write clear, concise commit messages that explain the “why” not just the “what”:Testing
See the Testing Guide for detailed information on writing and running tests.Resources
- GitHub Repository: https://github.com/AnimeThemes/animethemes-server
- Discord: https://discordapp.com/invite/m9zbVyQ
- Website: https://animethemes.moe
- API Documentation: https://api-docs.animethemes.moe
Getting Help
- Discord #api channel: Best for real-time questions
- GitHub Issues: For bug reports and feature requests
- Email: [email protected] for sensitive matters