# Laravel as a backend for modern frontends

How Laravel pairs with Next.js — API design, authentication, and the patterns that keep things maintainable.

Next.js handles the frontend beautifully. But for anything with real business logic — payments, permissions, complex queries — you need a proper backend. Laravel has been my answer for years, and it pairs with Next.js better than most people realize.

## The API contract comes first

Before writing a single endpoint, I define the shapes. What does a Project look like? An Article? A User? Once the contract is clear, both sides can be built in parallel — the frontend mocks it, the backend implements it.

A clean API is a contract between two systems that will outlive both of you.

## Laravel Resources are underrated

Laravel&#x27;s API Resources give you a consistent way to shape JSON. No more &#x27;why is this field named differently here?&#x27; — the resource is the single source of truth.

## Authentication, simply

Sanctum handles token auth for SPAs cleanly. Filament handles the admin panel. Together with Next.js, you get a full product — public site, admin area, API — with a fraction of the code a from-scratch stack would need.

- Next.js for the public-facing product
- Laravel for business logic and API
- Filament for the admin panel
- PostgreSQL for the data
The result: one team, one stack, two sides. Fast to build, easy to maintain, and nothing that surprises you six months later.

## More notes

### Why I build with Next.js

تست 24

### پلتفرم ملی هوش مصنوعی ایران: آنچه باید درباره‌اش بدانید

ایران نمونه‌ی اولیه‌ی پلتفرم ملی هوش مصنوعی خود را معرفی کرده است. در این گزارش بررسی می‌کنیم این پروژه چیست، چه هدفی دنبال می‌کند و چه چالش‌هایی پیش رو دارد.

### استارتاپ‌های ایرانی در سال ۲۰۲۵: از فین‌تک تا کشاورزی هوشمند

استارتاپ‌های ایرانی با وجود محدودیت‌ها، در حوزه‌هایی مانند فین‌تک، سلامت و کشاورزی فعال‌اند. این مقاله نگاهی دارد به مهم‌ترین روندها و چالش‌های این اکوسیستم.

## Got something in mind?Let&#x27;s talk about it.