{"id":15019790,"url":"https://github.com/laravel/breeze-next","last_synced_at":"2025-05-14T07:08:26.710Z","repository":{"id":37172142,"uuid":"433989147","full_name":"laravel/breeze-next","owner":"laravel","description":"An application / authentication starter kit frontend in Next.js for Laravel Breeze.","archived":false,"fork":false,"pushed_at":"2025-03-24T03:45:46.000Z","size":281,"stargazers_count":1624,"open_issues_count":1,"forks_count":440,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-05-08T04:18:15.763Z","etag":null,"topics":["authentication","breeze","laravel","nextjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laravel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-01T21:21:57.000Z","updated_at":"2025-05-07T15:32:03.000Z","dependencies_parsed_at":"2024-02-16T23:12:27.159Z","dependency_job_id":"cc157770-4d8a-41c1-802d-8d52c7153ec4","html_url":"https://github.com/laravel/breeze-next","commit_stats":{"total_commits":67,"total_committers":26,"mean_commits":2.576923076923077,"dds":0.7462686567164178,"last_synced_commit":"f0e467a0c50e785741d7ea2b1068fe321284a9c5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel%2Fbreeze-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel%2Fbreeze-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel%2Fbreeze-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel%2Fbreeze-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laravel","download_url":"https://codeload.github.com/laravel/breeze-next/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092776,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","breeze","laravel","nextjs"],"created_at":"2024-09-24T19:54:06.243Z","updated_at":"2025-05-14T07:08:26.688Z","avatar_url":"https://github.com/laravel.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Starter"],"sub_categories":[],"readme":"# Laravel Breeze - Next.js Edition ▲\n\n## Introduction\n\nThis 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.\n\n## Official Documentation\n\n### Installation\n\nFirst, 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:\n\n```bash\n# Create the Laravel application...\nlaravel new next-backend\n\ncd next-backend\n\n# Install Breeze and dependencies...\ncomposer require laravel/breeze --dev\n\nphp artisan breeze:install api\n\n# Run database migrations...\nphp artisan migrate\n```\n\nNext, ensure that your application's `APP_URL` and `FRONTEND_URL` environment variables are set to `http://localhost:8000` and `http://localhost:3000`, respectively.\n\nAfter defining the appropriate environment variables, you may serve the Laravel application using the `serve` Artisan command:\n\n```bash\n# Serve the application...\nphp artisan serve\n```\n\nNext, 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:\n\n```\nNEXT_PUBLIC_BACKEND_URL=http://localhost:8000\n```\n\nFinally, run the application via `npm run dev`. The application will be available at `http://localhost:3000`:\n\n```\nnpm run dev\n```\n\n\u003e Note: Currently, we recommend using `localhost` during local development of your backend and frontend to avoid CORS \"Same-Origin\" issues.\n\n### Authentication Hook\n\nThis 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:\n\n```js\nconst ExamplePage = () =\u003e {\n    const { logout, user } = useAuth({ middleware: 'auth' })\n\n    return (\n        \u003c\u003e\n            \u003cp\u003e{user?.name}\u003c/p\u003e\n\n            \u003cbutton onClick={logout}\u003eSign out\u003c/button\u003e\n        \u003c/\u003e\n    )\n}\n\nexport default ExamplePage\n```\n\n\u003e 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.\n\n### Named Routes\n\nFor 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.\n\n## Contributing\n\nThank you for considering contributing to Breeze Next! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).\n\n## Code of Conduct\n\nIn 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).\n\n## Security Vulnerabilities\n\nPlease review [our security policy](https://github.com/laravel/breeze-next/security/policy) on how to report security vulnerabilities.\n\n## License\n\nLaravel Breeze Next is open-sourced software licensed under the [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaravel%2Fbreeze-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaravel%2Fbreeze-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaravel%2Fbreeze-next/lists"}