Gamification platform (badges and levels) based on Laravel
Laravel Sail is a lightweight CLI tool for managing Laravel’s default Docker-based development environment. It sets up multiple containers, including an application server and a database server, to meet the application’s requirements.
Clone the repository locally
git clone https://github.com/pacoorozco/gamify-laravel.git gamify
cd gamify
Copy .env.example
to .env
.
NOTE: You don’t need to touch anything from this file. It works with default settings.
Install PHP dependencies with:
NOTE: You don’t need to install neither PHP nor Composer, we are going to use a Composer image instead.
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs
Start all containers with the sail
command.
./vendor/bin/sail up -d
Seed database in order to play with some data
php artisan key:generate
php artisan migrate --seed
If you are using Sail, you should execute those commands using Sail:
# Running Artisan commands within Laravel Sail...
sail artisan key:generate
sail artisan migrate --seed
Point your browser to http://localhost
. Enjoy!
NOTE: Default credentials are
admin@domain.local/admin
orplayer@domain.local/player
Preloaded Data: Upon installation, the platform comes with a set of default badges, users, and levels to help you get started quickly. These preloaded elements provide a foundation for exploring the platform’s features.
Admin Dashboard: The admin can use the Admin Dashboard to manage these elements:
This setup allows you to customize the platform to suit your needs while providing a starting point for immediate use.
In the context of the gamify platform, a User represents an individual who interacts with the system. Users can have different roles that define their permissions and access levels within the platform. The two primary roles are:
Description: Questions are challenges or tasks that users must complete to earn Experience Points (XP) and unlock badges. They are highly flexible and can represent a wide range of activities, from answering a quiz to completing tasks outside the application.
Purpose: Questions serve as the core mechanism for engaging users, encouraging them to interact with the platform, and rewarding them for their efforts.
Customization: Questions can be tailored to fit the specific needs of the platform, allowing admins to define the type, difficulty, and rewards (XP and badges) for each question.
gamify provides extensive customization options to tailor the platform to your specific needs. From managing gamification elements like badges, levels, and questions to modifying the application’s appearance, you have full control over the platform.
These features can be accessed and configured directly through the Admin Dashboard, providing a user-friendly interface for customization.
resources/views/custom
folder.resources/views/custom
folder.This approach allows you to personalize the platform’s design and layout while leveraging the flexibility of Laravel’s Blade templating engine.