Overview
Laravel Breeze - Next.js Edition with TypeScript is a refactor of the breeze-next repository, which changes the programming language from JavaScript to TypeScript. This repository is an implementation of the Laravel Breeze application/authentication starter kit frontend in Next.js. It provides all the authentication boilerplate already written for you, powered by Laravel Sanctum, allowing you to quickly pair your Next.js frontend with a strong Laravel backend.
Features
- Little extras: The Next.js Edition with TypeScript includes some additional features such as dark mode support and profile modification support, which are modifications of Laravel Breeze for profile editing.
- Official Documentation: The repository provides official documentation to guide you through the installation and usage of Laravel Breeze - Next.js Edition with TypeScript.
- Authentication Hook: This Next.js application contains a custom useAuth React hook that abstracts all authentication logic away from your pages. It can also be used to access the currently authenticated user.
- Named Routes: For convenience, Ziggy can be used to reference your Laravel application’s named route URLs from your React application.
- Contributing: If you are interested in contributing to Laravel Breeze Next, there is a contribution guide available in the Laravel documentation.
- Code of Conduct: The Laravel community has a Code of Conduct in place to ensure a welcoming environment for all members.
- Security Vulnerabilities: The repository provides a security policy on how to report security vulnerabilities.
- License: Laravel Breeze - Next.js Edition with TypeScript is open-source software licensed under the MIT license.
Installation
To install Laravel Breeze - Next.js Edition with TypeScript, follow these steps:
- Create a Next.js compatible Laravel backend by installing Laravel Breeze into a fresh Laravel application and installing Breeze’s API scaffolding.
- Set the
APP_URLandFRONTEND_URLenvironment variables in your application tohttp://localhost:8000andhttp://localhost:3000respectively. - Serve the Laravel application using the
serveArtisan command. - Clone the repository and install its dependencies using either
yarn installornpm install. - Copy the
.env.examplefile to.env.localand provide the URL of your backend. - Run the application using
npm run dev. It will be available athttp://localhost:3000.
Summary
Laravel Breeze - Next.js Edition with TypeScript is an implementation of the Laravel Breeze application/authentication starter kit frontend in Next.js, with additional features such as dark mode support and profile modification support. It comes with an authentication hook and support for named routes. The installation process is straightforward, and the repository provides official documentation, as well as guidelines for contribution and security vulnerabilities. Overall, Laravel Breeze - Next.js Edition with TypeScript offers a convenient and powerful solution for integrating a Laravel backend with a Next.js frontend.