A Laravel 11 app for browsing games, built with Livewire, Volt, and Tailwind CSS. Game data is powered by the IGDB API.
- PHP 8.2+ with extensions: sqlite3, xml, mbstring, curl, zip
- Composer
- Node.js (for npm or pnpm)
sudo apt update
sudo apt install php8.3 php8.3-cli php8.3-sqlite3 php8.3-xml php8.3-mbstring php8.3-curl php8.3-zipcurl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer-
Clone the repo (use your repo URL), then enter the project:
git clone <your-repo-url> cd Game-Api-app
-
Copy the environment file and generate app key:
cp .env.example .env php artisan key:generate
-
Install dependencies:
composer install npm install
Or use
pnpm installif you prefer pnpm. -
Set up the database (SQLite by default in
.env.example):touch database/database.sqlite php artisan migrate
-
Optional – IGDB API keys (needed for live game data):
- Create a Twitch app to get Client ID and Client Secret (IGDB uses Twitch OAuth).
- In
.env, set:IGDB_CLIENT_ID=your_client_id IGDB_CLIENT_SECRET=your_client_secret
- Without these, game listings may be empty or the app may not fetch data from IGDB.
-
Run the app:
composer dev
This starts the Laravel server, Vite, queue worker, and log tail in one command.
Or run in two terminals:
php artisan serve npm run dev
You can run the app in Docker using Sail. Use ./sail from the project directory, or set up a sail command that works from any folder inside the project.
Option 1 – Use ./sail (no setup):
./sail up -d
./sail npm install
./sail npm run dev
./sail artisan migrateOption 2 – Use sail without ./ (one-time setup). Remove any broken alias, then install the launcher:
unalias sail 2>/dev/null
mkdir -p ~/bin && cp bin/sail ~/bin/sail && chmod +x ~/bin/sail
grep -q 'export PATH="$HOME/bin:$PATH"' ~/.bashrc || echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc(Use ~/.zshrc instead of ~/.bashrc if you use zsh.) Then:
sail up -d
sail npm run dev
sail artisan migrateIf you use Docker, ensure Docker Desktop has WSL2 integration enabled (on Windows).
-
Install Composer dependencies on the host so Sail is available:
composer install
-
Configure for Sail: copy
.env.exampleto.env, generate the key, then in.envset:cp .env.example .env php artisan key:generate
In
.env, set the Sail block:DB_CONNECTION=mysqlDB_HOST=mariadbDB_DATABASE=laravelDB_USERNAME=sailDB_PASSWORD=passwordREDIS_HOST=redis
Optionally setWWWGROUPandWWWUSERto your host user/group id (e.g.id -gandid -u).
-
Start Sail:
./sail up -d
-
First run – run migrations:
./sail artisan migrate
-
Open http://localhost (or the port set as
APP_PORTin.env, default 80).
Rebuild Sail image (e.g. after changing PHP or Sail):
./sail build --no-cache
./sail up -dArtisan inside the container:
./sail artisan make:model Game
./sail artisan make:migration create_games_table
./sail artisan migrate
./sail artisan tinkerFiles created (models, migrations, etc.) are written into your project directory via the mounted volume.