Overview
Laravel Breeze Next.js is built with Next.js 16, TypeScript, and Tailwind CSS v4. This guide covers the initial setup and configuration.Prerequisites
- Node.js 18.x or higher
- npm or yarn package manager
- Laravel backend running (see Backend Guide)
Installation
1. Install Dependencies
Key Dependencies
The frontend uses the following core packages:package.json
TypeScript Configuration
The project uses strict TypeScript with path aliases for clean imports:tsconfig.json
Path Aliases
The@/* alias maps to ./src/*, allowing you to import modules cleanly:
Tailwind CSS Configuration
The project uses Tailwind CSS v4 with the new CSS-based configuration:PostCSS Configuration
postcss.config.js
Global Styles
src/app/globals.css
Tailwind Forms Plugin
The@tailwindcss/forms plugin provides beautiful form styles out of the box:
Environment Variables
Create a.env.local file in the root directory:
.env.local
Environment Variable Usage
NEXT_PUBLIC_BACKEND_URL- The URL of your Laravel backend API- Prefix with
NEXT_PUBLIC_to expose variables to the browser - Never commit
.env.localto version control
Next.js Configuration
next.config.js
Development Server
Start the development server:http://localhost:3000.
Build for Production
Create an optimized production build:Font Configuration
The project uses Google Fonts with Next.js font optimization:src/app/layout.tsx
Project Structure
Next Steps
- Routing - Learn about Next.js App Router structure
- Components - Explore reusable components
- Authentication - Implement auth flows
- API Integration - Make API calls with Axios and SWR