cat blog/laravel-vs-nestjs.md
Laravel or NestJS: how I choose
Solution Architect


Contents
Before every new project, the same question comes up before the first line of code: Laravel or NestJS? I use both every day, and I've learned that neither is "better" in absolute terms. They answer different needs. And since I currently work alone, the right choice is also the one that lets me ship fast without trapping me later.
My rule fits in one sentence: Laravel when the project is mostly business logic to manage, NestJS when it's mostly flows to orchestrate. A back-office, forms, roles, exports: Laravel. Real-time, services talking to each other, a pure API for a TypeScript front end: NestJS.
The rest of this article explains how I reach that decision, the questions I ask, and the bad reasons I've learned to ignore.
The three questions I ask
Before creating any repository, I answer three questions, in this order. The first "yes" decides.


Order matters: a heavy back-office is enough to tip the balance toward Laravel, even if the front end is in TypeScript. Conversely, a project with neither a back-office nor real-time falls back to Laravel by default, simply because it ships faster.
When I pick Laravel
Laravel is my default as soon as a project looks like a management application. Its strength is that almost everything is already there and consistent: authentication, validation, queues, scheduled tasks, emails, file storage, migrations. I don't spend the first week assembling parts.
And the ecosystem goes beyond the framework. Eloquent for data, Horizon to monitor queues, Sanctum to secure an API, Reverb for real-time, Livewire for reactive interfaces without leaving PHP. For administration, tools like Filament or Nova build a complete back-office (tables, filters, forms, roles) in a few hours. For a client who needs to enter, validate and export data, that's often a large part of the project delivered from day one.
I pick Laravel when:
the project has a back-office at its core: data entry, approvals, dashboards, exports;
the business is made of forms, workflows and roles rather than real-time;
I need to ship fast a first working version and iterate;
the code will one day be taken over by a client or another developer: PHP profiles remain very common;
hosting must stay simple: one app, one database, one worker.
What I accept in return: PHP isn't the front-end language, so types aren't shared with Vue or Nuxt, and real-time needs extra pieces (Reverb, Pusher).
When I pick NestJS
NestJS takes over when the project has few screens to manage but many messages flowing. Its asynchronous model and its modular, injected, decoupled architecture are built for that.
I pick NestJS when:
the core of the project is real-time: instant notifications, chat, live tracking, WebSockets;
the API must talk to many other systems: message queues, microservices, numerous outbound calls;
I want one language end to end, with types shared between the API and a Nuxt or Vue front end;
the code will later be taken over by TypeScript developers rather than PHP ones;
the project is a pure API, without a heavy back-office, consumed by a front end or a mobile app.
The price: you assemble more yourself. ORM, queues, administration, email: each piece is a choice, and the Node ecosystem has no administration tool as integrated as Laravel's for building a back-office in an afternoon.
The comparison, criterion by criterion
No single criterion decides. I look at which ones really matter for the project, then which way they lean.
Criterion | Laravel | NestJS |
|---|---|---|
Back-office | Dedicated tools (Filament, Nova): ready in hours | To build, or external tool |
Built-in features | Auth, queues, scheduler, mail, storage included | To choose and assemble |
Real-time | Possible, with extra pieces | Natural (WebSockets, events) |
Microservices and messaging | Doable, not its home turf | Built in |
Language shared with the front end | PHP server-side, JS client-side | TypeScript everywhere, shared types |
Speed to an MVP | Very fast | Fast, with more setup |
Enforced structure | Flexible conventions | Strict modular architecture |
Who will take over the code | PHP developers | TypeScript developers |
Hosting | App + database + worker | Node app + database, often a broker |
A real case: the back-end of this site
The site you're reading is a good example. The front end is Nuxt, so TypeScript. On paper, NestJS would have been the "logical" choice: one language everywhere.
Yet I chose Laravel with Filament, going through my questions:
Is there a back-office? Yes, and it's most of the need: I manage articles, projects, my career, skills, contact messages, all in French and English.
Is there real-time? No. The site reads content and receives a contact form.
Services talking to each other? No, a simple API consumed by the front end.
Three answers leaning toward Laravel. With Filament and its translation plugin, bilingual administration of all content was ready much faster than if I'd built it myself. The API feeding Nuxt fits in a few controllers.
Sharing types between front and back would have given me a bit of comfort. But that comfort weighed nothing against the hours of back-office saved.
The bad reasons to choose
Some arguments come up often in debates, and I no longer let them decide for me.
"Node is faster than PHP." For the vast majority of applications, the bottleneck is the database, not the framework. A poorly indexed SQL query costs more than any language difference.
"PHP is outdated." Modern PHP is typed and fast, and Laravel is one of the most polished ecosystems around. The old-fashioned image dates back fifteen years.
"You need the same language everywhere." It's a real comfort, not an obligation. I traded it without regret for a back-office delivered in a few hours.
"It's what's trendy." A project lives for years. The right choice is the one I'll still be able to maintain in three years, not the one making the most noise this year.
"I want to try the tech." Great for a personal project. Bad criterion for a client project with a deadline.
What if you work in a team?
Everything above, I decide alone. In a team, the tree still holds, but one question jumps ahead of the others: what does the team already master? A framework that three people know well will almost always beat an "ideal" framework nobody masters.
What changes | Solo | In a team |
|---|---|---|
What weighs most | The shape of the project | The team's skills |
Code structure | Laravel's flexible conventions are enough, I know where everything is | NestJS's strict architecture (modules, injection) stops everyone coding their own way |
Shared front/back types | A comfort | A real gain: fewer misunderstandings between front and back teams |
Back-office | A ready-made admin tool saves me days | These tools also let a junior deliver the admin alone |
Hiring and handover | I take over my own code | You need profiles: PHP or TypeScript depending on the local market |
When nothing decides | Laravel, to ship fast | The language most widespread in the team |
Two nuances I keep in mind:
Laravel in a team requires discipline. Its flexibility is an asset alone, but with several people you need rules: folders for services and actions, formatting with Pint, static analysis with Larastan, code reviews.
NestJS in a team has an entry cost. Its decorators and dependency injection puzzle developers coming from Express or PHP. Plan for onboarding time, but once learned, everyone writes code the same way.
In short
I don't choose between Laravel and NestJS by preference, but by the shape of the project. Lots of screens and data to manage: Laravel. Lots of messages and services to orchestrate: NestJS. And when nothing decides, I pick Laravel: alone, it's what lets me ship fastest.
The two can also coexist: a Laravel back-office for the business logic, and a NestJS service alongside for the real-time part. Choosing a framework isn't choosing a side.
Up next: what about when the project calls for microservices? I cover that specific case in the next article.
subscribe --blog
Get new posts by email
One email per new post, nothing else. Unsubscribe in one click.
Your address is only used to send you new posts. Privacy
ls ./related-articles



