Prerequisites
Before you begin, ensure you have the following installed:PHP 8.5
Required PHP version with modern features
MySQL 8+
Relational database for data storage
Composer
PHP dependency manager
Web Server
Laravel Herd, Apache, or Nginx
A LAMP stack like XAMPP can provide Apache, MySQL, and PHP together. Alternatively, use Laravel Herd for a simpler setup.
PHP configuration
Before installing, verify your PHP configuration has the required extensions enabled inphp.ini:
Installation
Clone the repository
Clone the AnimeThemes Server repository from GitHub:
Terminal
If you don’t have SSH keys set up with GitHub, use HTTPS instead:
Create the database
Create a MySQL database for AnimeThemes:When prompted, enter your MySQL root password.
Terminal
The database uses
utf8mb4_unicode_ci collation to support international characters and emoji.Install dependencies and set up
Run the automated setup command to install dependencies, configure the environment, and seed the database:This command performs the following actions:
Terminal
- Installs PHP dependencies via Composer
- Copies
.env.exampleto.envif it doesn’t exist - Generates an application key
- Runs database migrations
- Seeds the database with initial data
- Optimizes the application
Web server configuration
Choose your preferred web server setup:- Laravel Herd
- Apache
- Nginx
Laravel Herd provides the simplest setup experience:
Install Laravel Herd
Download and install Laravel Herd for your operating system.
Link the project
In your project directory, run:This creates a local domain for your application.
Terminal
Local storage configuration
By default, AnimeThemes stores media files locally. Configure local storage disks in your.env file:
.env
Terminal
Create an admin user
To access the admin panel, create a user with admin privileges:
You can now log in to the admin panel at
http://animethemes.test/admin with your credentials.
Optional: Elasticsearch setup
For advanced search capabilities, configure Elasticsearch:Install Elasticsearch
Follow the Elasticsearch installation guide for your platform.
Verification
Verify your installation is working correctly:Test the web interface
Test the web interface
Visit
http://animethemes.test in your browser. You should see the AnimeThemes homepage.Test the REST API
Test the REST API
Make a request to the API:You should receive a JSON response with anime data.
Terminal
Test GraphQL
Test GraphQL
Visit
http://animethemes.test/graphql to access GraphiQL, the GraphQL IDE.Try this query:Test the admin panel
Test the admin panel
Visit
http://animethemes.test/admin and log in with your admin credentials.You should be able to access the resource management interface.Troubleshooting
500 Internal Server Error
500 Internal Server Error
Check the Laravel logs:Common causes:
Terminal
- Missing
.envfile: Runcp .env.example .env - Missing application key: Run
php artisan key:generate - Incorrect file permissions: Run
chmod -R 775 storage bootstrap/cache
Database connection errors
Database connection errors
Verify your database credentials in
.env:- Check
DB_HOST,DB_PORT,DB_DATABASE,DB_USERNAME, andDB_PASSWORD - Ensure MySQL is running:
sudo systemctl status mysql - Test the connection:
php artisan db:show
Composer errors
Composer errors
If Composer fails to install dependencies:
- Update Composer:
composer self-update - Clear Composer cache:
composer clear-cache - Install with verbose output:
composer install -vvv
Permission denied errors
Permission denied errors
Ensure the web server has write permissions:Replace
Terminal
www-data with your web server user if different.Next steps
Feature flags
Enable or disable features like video streaming and search
Environment configuration
Learn about all available environment variables
Admin panel
Explore the Filament admin interface
Contributing
Contribute to AnimeThemes Server development