PHPackages                             esfredderick/laravel-blank-inertia-react-pgsql-starter-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. esfredderick/laravel-blank-inertia-react-pgsql-starter-kit

ActiveProject[Database &amp; ORM](/categories/database)

esfredderick/laravel-blank-inertia-react-pgsql-starter-kit
==========================================================

The skeleton application for the Laravel framework.

v1.1.1(1mo ago)07↓50%MITPHPPHP ^8.2CI passing

Since Mar 3Pushed 1mo agoCompare

[ Source](https://github.com/esfredderickmx/laravel-blank-inertia-react-pgsql-starter-kit)[ Packagist](https://packagist.org/packages/esfredderick/laravel-blank-inertia-react-pgsql-starter-kit)[ RSS](/packages/esfredderick-laravel-blank-inertia-react-pgsql-starter-kit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (31)Versions (6)Used By (0)

Laravel Starter Kit — Inertia React + PostgreSQL
================================================

[](#laravel-starter-kit--inertia-react--postgresql)

An opinionated Laravel starter kit built on **PostgreSQL schemas**, **Inertia v2 + React 19**, and an **action-based architecture**. Designed for developers who want clear domain boundaries, type safety across the full stack, and sensible defaults from day one.

Stack
-----

[](#stack)

LayerTechnologyBackendLaravel 12, PHP 8.4FrontendReact 19, TypeScript, Inertia v2DatabasePostgreSQL (named schemas)StylingTailwind CSS v4, shadcn/uiType BridgeLaravel Wayfinder (dev-next)TestingPest 4Static AnalysisLarastan (PHPStan), ESLint, PrettierCode StyleLaravel PintGetting Started
---------------

[](#getting-started)

> Requires PHP 8.2+, PostgreSQL, Node.js, and **pnpm**.

Create your app using [Laravel installer](https://laravel.com/docs/12.x/starter-kits#community-maintained-starter-kits):

```
laravel new my-app --using=esfredderick/laravel-blank-inertia-react-pgsql-starter-kit
```

### Initial setup

[](#initial-setup)

```
cd example-app

# runs migrations using your own db credentials
composer setup

# runs the dev server
composer dev
```

Architecture Overview
---------------------

[](#architecture-overview)

Important

This section describes the **conventions and patterns** embedded in this starter kit — not automatic behaviors. They define how the codebase is structured and how new features should be built. Detailed guidelines live in `.ai/guidelines/project-architecture.md`.

### PostgreSQL Schemas as Domain Boundaries

[](#postgresql-schemas-as-domain-boundaries)

Tables live in named schemas (`client`, `authentication`, `storage`, `queue`) instead of the default `public` schema. Schemas are created via a dedicated initial migration. Models declare their table with schema-qualified names:

```
protected $table = 'client.users';
```

A `PgsqlVerificationService` automatically creates the database and migration schema when they don't exist — no manual setup required (only for those).

### Domain-Driven Directory Structure

[](#domain-driven-directory-structure)

Database schemas mirror into PHP namespaces and frontend directories:

```
app/
  Models/Client/              Http/Controllers/Client/
  Http/Requests/Client/       Actions/Client/
  Data/Client/                Exceptions/Client/
resources/js/
  pages/client/               components/domain/client/
routes/
  domain/client.php
tests/
  Feature/Client/

```

### Action-Based Business Logic

[](#action-based-business-logic)

All business logic goes into Action classes — controllers stay thin. Artisan commands for generating both are provided by [`esfredderick/useful-artisan-commands`](https://github.com/esfredderickmx/useful-artisan-commands):

```
php artisan make:action Client/CreateUser    # → app/Actions/Client/CreateUserAction.php (-d to also create DTO)
php artisan make:data Client/CreateUser      # → app/Data/Client/CreateUserData.php
```

Actions are plain classes with a `handle()` method. DTOs are `final readonly` classes used when actions need more than one parameter.

### Thin Controllers

[](#thin-controllers)

Controllers follow a strict injection order and flow:

```
FormRequest → Route params → Action (via method DI)

```

Form Requests handle validation and expose a `getData()` method that transforms input into a DTO. The controller calls `$action->handle($request->getData())`, flashes feedback via `Inertia::notify()`, and redirects.

### Exception Handling

[](#exception-handling)

`AppException` is the base exception class. Domain-specific exceptions extend it and auto-render as flash messages — no try-catch needed:

```
throw new InsufficientBalanceException(); // flashes + redirects back automatically
```

### Frontend Feedback System

[](#frontend-feedback-system)

Two flash channels from backend to frontend:

- **Callout** — persistent inline alert via ``
- **Transient** — auto-dismissing Sonner toast via `useTransientListener()`

Both are triggered through a single macro:

```
Inertia::notify('Done!', ResponseStyle::TRANSIENT);
Inertia::notify('Check this.', ResponseStyle::CALLOUT, EmphasisVariant::INFORMATIVE);
```

### Emphasis Variant System

[](#emphasis-variant-system)

A semantic color/icon system spanning the full stack:

- **Backend**: `EmphasisVariant` enum (`AFFIRMATIVE`, `INFORMATIVE`, `PREVENTIVE`, `DESTRUCTIVE`, `INTERROGATIVE`, `NEUTRAL`)
- **Type Bridge**: Wayfinder auto-generates TypeScript constants and types
- **CSS**: Custom `oklch()` color tokens per variant (light + dark)
- **Components**: shadcn `Alert` extended with variant classes, `useDecorator()` hook for icon resolution

### Wayfinder Type Bridge

[](#wayfinder-type-bridge)

[Laravel Wayfinder](https://github.com/laravel/wayfinder) (dev-next) generates typed TypeScript from Laravel routes, models, enums, form requests, and Inertia page props. All output lives under `resources/js/wayfinder/` and auto-regenerates via Vite plugin during development.

Inertia shared props and flash data are typed through module augmentation in `resources/js/types/global.d.ts`.

### Frontend Conventions

[](#frontend-conventions)

- **UI primitives** from shadcn/ui live in `components/ui/`
- **Custom reusable components** live in `components/ux/` using composition pattern
- **Decoration records** map enum variants to UI properties via `Pick` — see `decorations/ui/emphasis-decoration.ts`
- **Theme** managed by `useAppearance()` hook (light/dark/system, cookie-persisted for SSR)

Custom Available Commands
-------------------------

[](#custom-available-commands)

Commands provided by [`esfredderick/useful-artisan-commands`](https://github.com/esfredderickmx/useful-artisan-commands) (dev dependency):

CommandDescription`php artisan make:action {name}`Action class (auto-suffixed, `-d` to also create DTO)`php artisan make:data {name}`DTO class (auto-suffixed)`php artisan app:config-db`Re-configures PostgreSQL credentials directly in `.env`### Code Quality

[](#code-quality)

CommandDescription`composer run quality`Prettier + ESLint + Pint + LarastanAll standard `php artisan make:*` commands (model, controller, request, migration, etc.) are available as usual.

Application Defaults
--------------------

[](#application-defaults)

Configured in `AppServiceProvider`:

- `CarbonImmutable` as default date class
- Strict model mode outside production
- Destructive DB commands prohibited in production
- Aggressive Vite prefetching
- HTTPS forced in production
- Password rules enforced in production (min 12, mixed case, symbols, uncompromised)

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance91

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

4

Last Release

43d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79d682351c4c4ff99c080bc3adf1828479a57fdaf5b8cc159734cd858df8619b?d=identicon)[esfredderickmx](/maintainers/esfredderickmx)

---

Top Contributors

[![esfredderickmx](https://avatars.githubusercontent.com/u/136201412?v=4)](https://github.com/esfredderickmx "esfredderickmx (50 commits)")

---

Tags

laravelpostgrespgsqlinertiavitereactstarter-kit

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/esfredderick-laravel-blank-inertia-react-pgsql-starter-kit/health.svg)

```
[![Health](https://phpackages.com/badges/esfredderick-laravel-blank-inertia-react-pgsql-starter-kit/health.svg)](https://phpackages.com/packages/esfredderick-laravel-blank-inertia-react-pgsql-starter-kit)
```

###  Alternatives

[jrsaunders/shard-matrix

A Complete Database Sharding system for MYSQL and/or Postgres. Using Laravels Query Builder easily scale up your application. Configure your whole solution in one Yaml Config file.

271.5k](/packages/jrsaunders-shard-matrix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
