A Next.js frontend implementation of the Laravel Breeze authentication starter kit, with authentication boilerplate prewritten
next-lara-frontend — Next.js Starter Template
By ThawZin999
A Next.js frontend starter based on Laravel Breeze, with authentication boilerplate powered by Laravel Sanctum, used to pair a Next.js frontend with a Laravel REST API backend.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Authentication is powered by Laravel Sanctum, used to pair with a Laravel REST API backend
Provides a custom useAuth React hook that extracts authentication logic from pages and retrieves the current user
Laravel's named route URLs can be referenced within the React application via Ziggy
Uses the MIT license, allowing free use, modification, commercial use, and distribution of this version of the code
Template Details
This repository is a Next.js frontend implementation of the Laravel Breeze authentication starter kit. The authentication boilerplate is prewritten and powered by Laravel Sanctum, making it easy to pair a Next.js frontend with a Laravel backend.
For setup, the backend first needs a Laravel application with Breeze's API scaffolding installed (php artisan breeze:install api), database migrations run, and APP_URL and FRONTEND_URL set to http://localhost:8000 and http://localhost:3000 respectively. After cloning the repository, the frontend installs dependencies, copies .env.example to .env.local and fills in NEXT_PUBLIC_BACKEND_URL, then runs npm run dev; the app is available at http://localhost:3000 by default. The README recommends using localhost for both frontend and backend during local development to avoid CORS same-origin issues.
At the code level, it includes a custom useAuth React hook that extracts authentication logic from pages and can retrieve the currently authenticated user; when accessing user object properties, optional chaining (such as user?.name) is required to handle Next.js's initial server-side rendering. In addition, Ziggy can be used to reference Laravel's named route URLs within the React application.
Regarding licensing, the repository uses the MIT license, allowing free use, modification, commercial use, and distribution of this version of the code; when distributing, the copyright notice and the full MIT license notice must be retained. Third-party assets such as demo images, fonts, and icons, as well as external services such as domains, hosting, and databases, require separate verification of their licenses or fees.
Is it right for your project?
Use Cases
- Building a matching Next.js authentication frontend for a Laravel backend
- Integrating Breeze API scaffolding into an existing Laravel application and pairing it with a separate frontend
- Organizing page-level authentication and user information retrieval based on the useAuth hook
Suitable For
- Projects using Laravel as the backend that want a Next.js frontend
- Developers who need ready-made authentication boilerplate rather than writing login and registration flows from scratch
- Teams that accept a separated frontend and backend communicating via REST API and Sanctum
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
The backend requires creating a Laravel application and running composer require laravel/breeze --dev and php artisan breeze:install api, then running php artisan migrate
- 2
Set the backend environment variables APP_URL and FRONTEND_URL to http://localhost:8000 and http://localhost:3000 respectively, and start it with php artisan serve
- 3
After cloning the repository, the frontend installs dependencies, copies .env.example to .env.local and sets NEXT_PUBLIC_BACKEND_URL, then runs npm run dev
- 4
For local development, it is recommended to use localhost for both frontend and backend to avoid CORS same-origin issues
- 5
When accessing user object properties, use optional chaining (such as user?.name) to handle Next.js's initial server-side rendering
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is this version of the code and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version of the code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional fees.
- Before using this frontend template, you must set up a compatible Laravel backend yourself: install Laravel Breeze in a fresh Laravel application and run its API scaffolding, otherwise the frontend cannot run independently.
- The backend must configure the APP_URL and FRONTEND_URL environment variables to point to the backend and frontend addresses respectively, otherwise frontend-backend communication and authentication will fail.
- The frontend must copy .env.example to .env.local and fill in the backend URL (NEXT_PUBLIC_BACKEND_URL), otherwise it cannot connect to the backend.
- For local development, it is recommended to use localhost for both frontend and backend to avoid CORS same-origin issues; using other domains may trigger cross-origin restrictions.
- When accessing user object properties, optional chaining (such as user?.name) must be used, otherwise errors will occur due to Next.js's initial server-side rendering.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
First, create a Next.js compatible Laravel backend by installing Laravel Breeze into a [fresh Laravel application](https://laravel.com/docs/installation) and installing Breeze's API scaffolding:
Original README
Next, ensure that your application's `APP_URL` and `FRONTEND_URL` environment variables are set to `http://localhost:8000` and `http://localhost:3000`, respectively.
Original README
Then, copy the `.env.example` file to `.env.local` and supply the URL of your backend:
Original README
> Note: Currently, we recommend using `localhost` during local development of your backend and frontend to avoid CORS "Same-Origin" issues.
Original README
https://github.com/ThawZin999/next-lara-frontend/blob/main/LICENSE.mdhttps://github.com/ThawZin999/next-lara-frontend/blob/main/README.md> Note: You will need to use [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) (`user?.name` instead of `user.name`) when accessing properties on the user object to account for Next.js's initial server-side render.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-13. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- Partly documented · 73 / 100
- Technologies
- Next.js · Laravel · React
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2024-02-16
- Screenshot last checked
- 2026-10-13
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: [email protected] · 2026-10-13
Inspect the recorded source material
SHA-256: 2afcc757fce46540de1a45e889d2ceced580183a0061e0fe63ef83c2746695cd
2026-10-13T10:06:12.385Z
Source file / repository# Laravel Breeze - Next.js Edition ▲
## Introduction
This repository is an implementation of the [Laravel Breeze](https://laravel.com/docs/starter-kits) application / authentication starter kit frontend in [Next.js](https://nextjs.org). All of the authentication boilerplate is already written for you - powered by [Laravel Sanctum](https://laravel.com/docs/sanctum), allowing you to quickly begin pairing your beautiful Next.js frontend with a powerful Laravel backend.
## Official Documentation
### Installation
First, create a Next.js compatible Laravel backend by installing Laravel Breeze into a [fresh Laravel application](https://laravel.com/docs/installation) and installing Breeze's API scaffolding:
```bash
# Create the Laravel application...
laravel new next-backend
cd next-backend
# Install Breeze and dependencies...
composer require laravel/breeze --dev
php artisan breeze:install api
# Run database migrations...
php artisan migrate
```
Next, ensure that your application's `APP_URL` and `FRONTEND_URL` environment variables are set to `http://localhost:8000` and `http://localhost:3000`, respectively.
After defining the appropriate environment variables, you may serve the Laravel application using the `serve` Artisan command:
```bash
# Serve the application...
php artisan serve
```
Next, clone this repository and install its dependencies with `yarn install` or `npm install`. Then, copy the `.env.example` file to `.env.local` and supply the URL of your backend:
```
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
```
Finally, run the application via `npm run dev`. The application will be available at `http://localhost:3000`:
```
npm run dev
```
> Note: Currently, we recommend using `localhost` during local development of your backend and frontend to avoid CORS "Same-Origin" issues.
### Authentication Hook
This Next.js application contains a custom `useAuth` React hook, designed to abstract all authentication logic away from your pages. In addition, the hook can be used to access the currently authenticated user:
```js
const ExamplePage = () => {
const { logout, user } = useAuth({ middleware: 'auth' })
return (
<>
<p>{user?.name}</p>
<button onClick={logout}>Sign out</button>
</>
)
}
export default ExamplePage
```
> Note: You will need to use [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) (`user?.name` instead of `user.name`) when accessing properties on the user object to account for Next.js's initial server-side render.
### Named Routes
For convenience, [Ziggy](https://github.com/tighten/ziggy#spas-or-separate-repos) may be used to reference your Laravel application's named route URLs from your React application.
## Contributing
Thank you for considering contributing to Breeze Next! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
Please review [our security policy](https://github.com/laravel/breeze-next/security/policy) on how to report security vulnerabilities.
## License
Laravel Breeze Next is open-sourced software licensed under the [MIT license](LICENSE.md).
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
