Skip to main content

Build Full-Stack Apps with Laravel + Next.js

Production-ready starter template combining Laravel 12 API with Next.js 16 TypeScript frontend. Authentication, modern tooling, and best practices included.

Quick Start

Get your full-stack application running in minutes

1

Clone the repository

Clone the starter template to your local machine:
git clone https://github.com/brindogabriel/LaravelBreezeApi-NextJS.git
cd LaravelBreezeApi-NextJS
2

Set up the backend

Install Laravel dependencies and configure your environment:
cd Backend
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
The default configuration uses SQLite. For MySQL or PostgreSQL, update your .env file with database credentials.
3

Set up the frontend

Install Next.js dependencies and configure the API URL:
cd ../Frontend
npm install
# Create .env.local with:
echo "NEXT_PUBLIC_BACKEND_URL=http://localhost:8000" > .env.local
4

Start development servers

Run both backend and frontend servers:
cd Backend
php artisan serve
Open http://localhost:3000 to see your application. Register a new user to test authentication!

Explore the Stack

Everything you need to build production-ready applications

Architecture

Understand the full-stack architecture and how Laravel API communicates with Next.js

Authentication

Learn how Laravel Sanctum provides secure token-based authentication

Project Structure

Explore the organized monorepo structure with Backend and Frontend directories

Backend Setup

Configure Laravel, database, and API routes for your backend

Frontend Setup

Set up Next.js with TypeScript, Tailwind CSS, and authentication hooks

Deployment

Deploy your application to production with backend and frontend hosting

Key Features

Built with modern technologies and best practices

Laravel Sanctum Authentication

Secure token-based authentication with complete user registration, login, password reset, and email verification flows

TypeScript + Modern Tooling

Type-safe development with TypeScript, Formik + Yup validation, ESLint, and Prettier configuration

Tailwind CSS + Headless UI

Beautiful, responsive UI with Tailwind CSS utility classes and accessible Headless UI components

Production-Ready Testing

Backend testing with Pest PHP framework and pre-configured authentication test suite

Ready to Build?

Start building your full-stack application with our comprehensive guide and API reference

Build docs developers (and LLMs) love