Status: available for projects [email protected]
← Back to articles

My Laravel Skeleton Project: A Opinionated Starting Point

After building several SaaS applications, I noticed I was repeatedly implementing the same patterns: strict code quality rules, action-based architecture, Stripe subscriptions with pricing pages, social authentication and type-safe communication between Laravel and React. This skeleton project captures those patterns so I can start new projects with proven, production-ready code instead of rebuilding from scratch.

Why This Exists

Most Laravel starters give you authentication and maybe an admin panel. But real SaaS applications need more: payment processing, subscription management, type-safe data flow between backend and frontend, and strict code quality enforcement. This skeleton includes all of that, configured and working together.

Strict Code Quality by Default

The project enforces code quality at the highest level:

  • PHPStan/Larastan at max level: Static analysis catches type errors before runtime

  • Architecture tests with Pest 4: Enforces patterns and coding standards automatically

  • Rector: Automated code refactoring and modernization

  • TypeScript strict mode: Frontend code is equally strict about types

  • Laravel Pint & Prettier: Consistent code formatting across PHP and JavaScript

This isn't optional tooling you might enable later - it's baked into the composer lint and composer test commands. If it doesn't pass, it doesn't ship.

Action Pattern Throughout

The codebase heavily relies on the Action pattern for business logic. Instead of fat controllers or service classes that do everything, each action is a single-purpose class that's testable and explicit about its dependencies. Combined with PHPStan's max level analysis, you know exactly what goes in and what comes out.

End-to-End Type Safety

One of the biggest wins is type safety from backend to frontend. Laravel Data automatically generates TypeScript definitions for your PHP Data objects. When you define a Data class in PHP, run php artisan typescript:transform, and your frontend gets matching TypeScript types automatically. No manual synchronization, no runtime surprises when the API shape changes.

Stripe Integration Out of the Box

The skeleton includes complete Stripe subscription functionality:

  • Pricing page: Displays available subscription plans

  • Checkout flow: Handles Stripe checkout sessions via Laravel Cashier

  • Webhook handling: Processes Stripe events to keep subscriptions in sync

  • Subscription management: Users can view and manage their subscriptions

Important limitation: The implementation uses a flat pricing structure - one product has one price. It's designed exclusively for subscriptions, not one-time payments. This covers most SaaS use cases but won't work if you need complex pricing tiers or mixed billing models.

Filament Admin Panel

Filament 4 comes pre-configured with:

  • User management: Full CRUD operations with proper authorization

  • Stripe resources: Manage products, prices, and view subscription data

  • Settings management: Global app settings using Spatie Laravel Settings

The admin panel integrates with your Stripe account, so you can manage products and view subscription data without leaving your application.

Modern Development Workflow

The project includes pre-configured commands for common development tasks:

  • composer test - Runs all test suites (unit, feature, browser, architecture)

  • composer lint - Formats code and runs static analysis

  • npm run dev - Frontend development with hot module replacement

Production Deployment

The Docker setup (Dockerfile and docker-compose.yaml) is designed for production deployment. It defines separate services for the web app, queue workers, scheduler, and Nightwatch monitoring agent - everything needed to run a Laravel application in production.

For local development, I highly recommend Laravel Herd.

Conclusion

This skeleton isn't a tutorial project - it's production code I use to start all of my applications. The strict typing, action pattern, and complete Stripe integration mean I can go from git clone to working on actual features within minutes instead of days. If you build subscription-based SaaS apps with Laravel and React, this might be starter kit for you.

Check it out at github.com/antonL95/laravel-skeleton.

Email me CV ↓