Back to project foundations
Application starter

Laravel Next.js Starter Kit

Separate Laravel API and Next.js frontend with Fortify and Sanctum authentication through a same-origin proxy.

Why we recommend it

Choose it when Laravel should own the business backend but a separate Next.js application should own the interface. The starter demonstrates cookie sessions, CSRF handling and account screens across that boundary, which are otherwise easy to implement inconsistently.

When to choose it

  • Customer portals with a Laravel domain model and an independently structured Next.js frontend.
  • Products that intentionally need two runtimes and want a documented session-authentication pattern.

What to consider

  • You must operate both PHP and Node.js. Session cookies, trusted origins, proxy settings and API authorization remain essential deployment responsibilities.
  • This is a community starter rather than an official Laravel kit. Review compatibility and maintenance before adopting its authentication dependencies.

Start with this project

The checked README requires PHP 8.4 or newer, Composer, Node.js 20 or newer and pnpm. Review the clone's setup script, configure both environment files and a database, then follow the documented backend and web/ frontend setup. Test CSRF, session expiry and authorization across the proxy.