Search by

kerigard / laravel-api-starter-kit

kerigard

The skeleton application for the Laravel framework.

Package info

github.com/Kerigard/laravel-api-starter-kit

Type:project

pkg:composer/kerigard/laravel-api-starter-kit

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-10-04 18:14 UTC

This package is auto-updated.

Last update: 2026-10-04 18:33:05 UTC


README

Laravel API starter kit with Dockerized local and production environments, PostgreSQL, Redis, and Nginx.

  • Versioned API routes under /api/v1.
  • Redis-backed request throttling.
  • Strict Eloquent models and lazy-loading prevention in development.
  • Validation that rejects unknown request fields.
  • Destructive database commands disabled in production.
  • HTTPS enforced when the application URL uses HTTPS.
  • PHPUnit, Pint, Rector, and PHPStan for testing and code quality.

Installation

Create a new project with Composer:

composer create-project --no-install kerigard/laravel-api-starter-kit example-app

Development

Start the application for the first time:

WWWUSER="$(id -u)" WWWGROUP="$(id -g)" docker compose up -d
sail artisan migrate --seed

For subsequent runs, use sail:

sail up -d

Note

Run Docker and Sail commands as a regular user to avoid file permission issues.

To start the queue worker and scheduler:

sail --profile "*" up -d

Alternatively, enable them by default in .env:

COMPOSE_PROFILES=scheduler,worker

Useful development commands:

sail test
sail pint
sail bin rector
sail bin phpstan analyse --memory-limit=1G

Production

cp .env.example .env
docker compose -f compose.prod.yaml up -d --build
docker compose -f compose.prod.yaml exec app php artisan migrate

Note

Configure the environment variables in .env before starting the application.

License

MIT