If you wish to contribute code to the Godot Asset Library, you'll need to install a local copy so you can test your changes.
To run it locally, you need to install and build both the backend and frontend.
When working on new features, keep in mind this website only supports evergreen browsers:
- Chrome (latest version and N-1 version)
- Edge (latest version and N-1 version)
- Firefox (latest version, N-1 version, and latest ESR version)
- Opera (latest version and N-1 version)
- Safari (latest version and N-1 version)
Internet Explorer isn't supported.
The production environment uses PHP 7.3. To preserve compatibility with the production environment, don't use language features only available in PHP 7.4 or later.
The backend uses the Laravel PHP framework.
- Install dependencies as described on the Laravel 8.x installation page.
- Set up a MySQL or MariaDB database.
- Copy the
.env.example
file as.env
and edit theDB_*
variables to add database credentials. - Run the following commands in order:
# Install composer dependencies
composer install
# Create a database (credentials must be set in `.env` first)
php artisan db:create
# Run migrations and seed test data into the database
php artisan migrate --seed
# Create application key
php artisan key:generate
# Create an user with administrator privileges
# (you will be prompted for username/email/password)
php artisan admin:create
# Run a local Web server for development
php artisan serve
You can run php artisan migrate:refresh --seed
to run all migrations
and seed test data again.
- Feature tests are available. They use a secondary MySQL database configured
in
.env.testing
. You need to create this database before running them. - This project follows the Laravel code style, applied using PHP CS Fixer.
- Code is analysed with PHPStan thanks to Larastan.
Use the commands below:
# Run unit and feature tests
vendor/bin/phpunit
# Check PHP code for possible errors
vendor/bin/phpstan analyse
# Try to fix code style violations automatically
vendor/bin/php-cs-fixer fix
The frontend uses the Tailwind CSS framework and TypeScript.
- Install Node.js (10.x or later) and Yarn (recommended over npm).
- Run the following commands in the project folder depending on your needs:
# Install dependencies (must be done before other Yarn commands)
yarn
# Build frontend files and watch for changes
yarn watch
# Build optimized frontend files for production
yarn production
# Lint CSS and TypeScript files for code style violations
yarn lint
# Try to fix code style violations automatically
yarn lint:css --fix
yarn lint:ts --fix
Copyright © 2019-2021 Hugo Locurcio and contributors
Unless otherwise specified, files in this repository are licensed under the MIT license; see LICENSE.md for more information.