Stu Mason
Stu Mason

Claudavel: My Laravel + Claude Code Starter

Stu Mason3 min read

Package that sets up Laravel the way I like it - Fortify, Sanctum, Horizon, Reverb, Telescope, plus Claude Code configuration out of the box.

Claudavel: My Laravel + Claude Code Starter

Every time I start a new Laravel project, I do the same shit. Install Fortify. Install Sanctum. Install Horizon. Set up Reverb. Configure Telescope. Add Wayfinder. Create my coding standards docs. Set up GitHub Actions.

Then I spend an hour configuring Claude Code to understand how I like to write Laravel.

Got tired of it. Built claudavel.

What It Is

A Laravel package that sets up everything I use on every project, configured to work with Claude Code from the start.

composer require stumason/claudavel
php artisan claudavel:install

Two commands and you've got:

  • Fortify for authentication
  • Sanctum for API tokens
  • Horizon for queue management
  • Reverb for WebSockets
  • Telescope for debugging
  • Pail for log tailing
  • Wayfinder for TypeScript route generation
  • Sqids for ID obfuscation

Plus the GitHub workflows and coding standards docs I use on every project.

The Claude Bits

The package publishes a docs/standards/ directory with my coding conventions:

  • Actions pattern for business logic
  • DTOs for data transfer
  • Monetary values as integers (no floats for money, ever)
  • Lowercase import paths
  • How I structure controllers, services, tests

When Claude Code is working in the project, it reads these and follows them. No more explaining my preferences every conversation.

It also sets up GitHub Actions workflows:

  • Claude code review - Claude reviews PRs automatically
  • @claude mentions - Tag Claude in issues and PRs for help
  • Testing, linting, dependency updates - the usual

The ID Obfuscation Thing

One pattern I use everywhere: don't expose sequential database IDs in URLs. Instead of /users/1, use /users/xYz3Abc.

Claudavel includes a trait that handles this:

use Claudavel\Traits\HasObfuscatedId;

class User extends Model
{
    use HasObfuscatedId;
}

Route model binding still works. The user sees xYz3Abc. Your database still uses integers. No one can guess how many users you have by incrementing the ID.

The Health Check

Every project needs a health check endpoint. Claudavel adds /health that checks:

  • Database connection
  • Redis connection
  • Cache working
  • Queue processing
  • Storage writable

Returns 200 if everything's good, 503 if something's broken. Point your monitoring at it.

Running Dev

composer run dev

Spins up everything concurrently:

  • Laravel server
  • Queue worker
  • WebSocket server (Reverb)
  • Scheduler
  • Log tailing (Pail)
  • Vite

One command. Everything running. Logs streaming to your terminal.

What It's Not

This isn't a boilerplate or starter kit. It's a package that configures an existing Laravel project. You install Laravel normally, then add Claudavel on top.

I didn't want to maintain a fork of Laravel. I wanted something I could composer require into any project.

Installation Options

# Full install
php artisan claudavel:install

# Skip GitHub workflows
php artisan claudavel:install --no-workflows

# Overwrite existing files
php artisan claudavel:install --force

The repo: github.com/StuMason/claudavel

Get the Friday email

What I shipped this week, what I learned, one useful thing.

No spam. Unsubscribe anytime. Privacy policy.