Laranext Monorepo is a free boilerplate starter kit that pairs a Laravel backend with a Next.js frontend in a single Lerna-managed monorepo, built on the official Laravel Breeze scaffolding with NextJS.
What is Laranext Monorepo?
Laranext Monorepo is a starter kit that combines a Laravel backend running on PHP 8 with a Next.js frontend built with React, all housed in one repository. The project uses Lerna and npm workspaces to manage two separate packages: the Laravel application inside the backend folder and the Next.js application inside the frontend folder. It is based on the Laravel Breeze scaffolding with NextJS, which means authentication is already wired up through a custom useAuth React hook. The hook abstracts login, logout, and user retrieval, and accepts middleware configurations such as auth to protect pages. The repository is authored by isaacdarcilla and is designed to save developers from manually connecting a Laravel API to a React frontend.
What makes Laranext Monorepo stand out?
The most distinctive aspects of this starter are its monorepo organization and its authentication setup.
- Lerna monorepo — The repository is organized with Lerna and npm workspaces, so you can execute commands like
npm run dev -w @mono/backendornpm run dev -w @mono/frontenddirectly from the root directory. - Laravel Breeze integration — It builds on the official Laravel Breeze scaffolding with NextJS, giving you an official starting point for sessions, authentication, and API routes.
useAuthhook — A custom React hook exposes the current user and a logout function; it takes a middleware option such asauthto control page access, and you must use optional chaining likeuser?.namebecause of Next.js server-side rendering.- Named routes via Ziggy — Ziggy is included so you can reference Laravel named routes from your React components, avoiding hard-coded URLs.
- Tailwind CSS — The frontend uses Tailwind CSS, the default styling library in the Breeze Next.js scaffold, for utility-first styling.
- Seeded database — The installation steps include
php artisan migrate --seed, which creates the necessary tables and populates them with sample data. - Workspace-aware scripts — You can start the backend with
php artisan serveor via npm workspaces, and the frontend withnpm run dev, either in separate terminals or with workspace flags.
Who should use Laranext Monorepo?
This starter is aimed at full-stack developers who want a Laravel API backend and a Next.js frontend in a single codebase without spending time on the initial wiring. It is also a good fit for teams that already use Lerna for monorepo management, and for Laravel developers who want to adopt React on the frontend instead of Blade views.
What can you do with Laranext Monorepo?
With this starter you can quickly launch a full-stack application and customize the workspace to fit your workflow.
- Full-stack developers can clone the repository, follow the documented installation steps, and have a working authenticated application in a few minutes.
- Teams working in a monorepo can add new npm dependencies to the workspace using the
-wflag, as illustrated withnpm install husky -D -w @mono/frontend. - Frontend developers can build protected pages using the
useAuthhook with theauthmiddleware, and can access named routes from Laravel through Ziggy.
How does Laranext Monorepo work?
The workflow starts by cloning the repository and installing Node dependencies with npm install. After that, you install Composer packages inside the backend directory and run php artisan migrate --seed to prepare the database. You must set APP_URL to http://localhost:8000 and FRONTEND_URL to http://localhost:3000 in your environment files. Then you start the Laravel server with php artisan serve (or via the workspace command) and the Next.js development server with npm run dev. The final application runs at http://localhost:3000.








