DEV Community

Nguyen Hoang Long
Nguyen Hoang Long

Posted on

I built a Laravel SaaS Starter Kit so you don't have to (Auth + Roles + Stripe + Docker)

Every time I start a new Laravel project, I spend the first 2-3 days
doing the exact same thing.

Set up authentication. Build a role system. Wire up Stripe.
Configure Docker. Write the same middleware I wrote last time.

Sound familiar?

So I stopped copy-pasting and built a proper starter kit.

What's inside

Authentication via Laravel Sanctum

  • Register, login, logout
  • Token-based API auth
  • Get current user endpoint

Roles & Permissions

  • Admin / Manager / User out of the box
  • Role middleware protecting routes
  • Assign and revoke roles via API

REST API — versioned and clean

  • All routes under /api/v1/
  • Consistent JSON response format

json
{
  "success": true,
  "message": "Registration successful",
  "data": {
    "user": { ... },
    "token": "1|abc123..."
  },
  "errors": null
}

Stripe Integration
- Create customers and payment intents
- Webhook handler for payment_succeeded / payment_failed

Docker & DevOps
- Multi-stage Dockerfile (PHP 8.3 + Nginx)
- docker-compose with MySQL + Redis
- GitHub Actions CI/CD pipeline

Tests — all passing
✅ test_user_can_register
✅ test_user_can_login
✅ test_login_fails_with_wrong_credentials
✅ test_authenticated_user_can_fetch_profile
✅ test_user_can_logout

Quick start

composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed --seeder=RoleSeeder
php artisan serve

That's it. Your API is running with auth, roles, and a seeded admin account.

Preview the structure

Full folder structure and API docs on GitHub:
👉 github.com/long260398/laravel-saas-starter

Get the full source code

If this saves you even half a day of setup, it's worth it.

👉 longnguyen77.gumroad.com/l/nhxta — $29

Built with Laravel 11 · PHP 8.3 · 2026
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
nguyen_hoanglong_3492e35 profile image
Nguyen Hoang Long

Happy to answer any questions about the setup!