Next.js and NestJS Development Services | Intway
Tecnologías / Next.js and NestJS Development
Technology Web Development

Next.js and NestJS: fast web systems with an API built to last

· upd.

Web systems, portals and APIs in TypeScript: Next.js for the screens and NestJS for the API, with cases in production.

TypeScript end to endNext.js · NestJS · Node.jsPostgreSQL or your database25+ years

We build web systems with Next.js for the screens and NestJS for the API, both in TypeScript on Node.js. It is the stack we build our management systems, portals and dashboards with today, like the ones in the cases below: one language end to end, an API with clear contracts and screens that respond instantly. If you are looking for the full service, from idea to production, see custom software development.

What each one is and why they go together

Next.js is the React framework for web applications: it handles screens, routes, data loading and navigation. NestJS is a Node.js framework for building APIs: it organises code into modules, controllers and services, and comes with validation, permissions and dependency injection out of the box. Keeping them apart has a practical reason: the same API serves the web, a mobile app and other systems, and none of them depends on how the other's screens are built.

  • One language: the types for a trip, an invoice or a user are written once and used by both the screen and the API. If an API change doesn't match what the screen expects, the type error shows up at compile time; tests and validation cover the rest.
  • Structure that lasts: NestJS makes it easy to organise code into one module per domain, and that decision is what lets another developer understand the system two years from now.
  • Fast screens: with the Next.js App Router, the menu and top bar stay in place when moving between screens, and the content shows its skeleton while the data arrives.

When it makes sense

  • Management systems with many screens, roles and rules: operations, payroll, stock, work orders.
  • Customer or supplier portals connected to your system, like the one we explain in customer self-service portal.
  • The dashboard and API behind a mobile app: the app and the web use the same API.
  • Integrations: your own API connecting your system to others, for example to WhatsApp Business.
  • Multi-company platforms, where each company sees only its own data.

When it doesn't

For a corporate site of a few pages or a blog, a content management system is enough. If one part of the system does heavy parallel calculation, that part can be written in another language: in a multi-country payroll engine the web is Next.js and the API is NestJS, but the calculation engine is Go. And if your team already maintains systems in Java or .NET, staying on their stack is often the better call.

Have a system to build, or one in Next.js or NestJS that needs sorting out? Tell us what it has to do and we'll tell you how we would approach it.

Next.js and NestJS compared with other options

NeedNext.js + NestJSNext.js aloneJava or .NETWordPress or another CMS
Management system with many screens, roles and rulesIts typical useEnough at first; gets harder as the rules growYes, especially if your team already works with itNot built for this
An API used by the web, an app and other systemsNestJS, with contracts and validationPossible, but the API ends up mixed with the webYesLimited to its plugins
Corporate site or blogMore than neededWorksMore than neededIts typical use
Who maintains it afterwardsA team that works in TypeScriptA team that works in TypeScriptA Java or .NET teamWhoever publishes the content

How we build it

The screens, with Next.js

The frame (menu, top bar and user) lives in a layout that isn't redrawn when navigating, and each section has its own loading skeleton: a click changes the screen immediately, even if the data takes a moment. Every internal link uses the Next.js navigation component, which prefetches the next screen. Grids the team uses all day are designed to be worked from the keyboard, like a spreadsheet.

System built with Next.js and NestJS: trips grid, TypeScript API validation and change history
From screen to audit trailExample: the grid sends the trip, the API validates it and every change is logged with user and time.

The API, with NestJS

One module per domain (trips, rates, payroll), every input validated before it touches the database, and Swagger (OpenAPI) documentation generated from the same code. Permissions are checked in the API and on every screen, not just in the menu: hiding a button doesn't stop anyone from calling the API.

Data and long-running processes

We work with PostgreSQL or with the database you already have. Anything slow, such as a payroll close, an export or a recalculation, goes to a Redis queue and runs in the background: if the user closes the screen, the process keeps going and they see its status when they come back.

A documented NestJS API used by the Next.js web dashboard and by a mobile app
One API, several consumersThe web and the app use the same contracts: an API change shows up in both before it is released.

If the system grows and it makes sense to split it into services, we do it in stages, as we explain in microservices.

Best practices we apply in Next.js and NestJS

These are the rules we work by on every project. Several of them are enforced by an automated check before every release, so they don't depend on someone remembering.

Design in Figma before code

Every screen is designed in Figma and validated with the people who will use it before it is built. The design produces the project's design system: colours, typography and components (tables, forms, modals, search boxes, filters) built once with shadcn/ui and Tailwind CSS and reused across the whole system. A create form always looks the same, a table behaves the same on every screen, and new work extends what already exists instead of starting from scratch. Screens are checked on desktop and on mobile before they are signed off.

Screens with Next.js

  • App Router with a fixed frame: menu and top bar in each level's layout and a loading skeleton per section. A click changes the screen instantly and the menu doesn't flicker.
  • Links that don't reload: every internal link goes through the Next.js Link component, which prefetches the next screen.
  • Server Components: data is read on the server and less JavaScript reaches the browser; only the interactive parts run on the client. Heavy pieces (editors, sockets) load when they are used.
  • Forms that validate real data: a phone number with its country's length, a tax ID with its check digit, a date that exists. On submit, the screen moves to the first field with an error, and creating a password asks for it twice.
  • Errors in plain sight: error screens with a retry button, and every server error logged.
  • Tables that work on mobile: no pinned columns covering the others and no truncated text.

The API with NestJS

  • Contracts in Swagger (OpenAPI): the documentation is generated from the same DTOs and controllers. The web, the app and integrating systems read the same contract, and typed clients are generated from it.
  • Every input validated: DTOs with class-validator and a global ValidationPipe for the body, the URL and the filters. The error comes back on its field, in a single format.
  • Per-method permissions: authentication and role guards on every endpoint; public routes are marked one by one, never the other way round.
  • Modules that don't step on each other: each module asks the owning service for other data and never reads another module's tables. A business rule lives in one place, with no circular dependencies between modules.
  • API versions: if a change would break a consumer, it ships as a new version and the old one stays until everyone has moved.

Data: transactions, migrations and history

  • Transactions: any operation that writes to more than one table (a payroll run with its lines, a payment with its allocation) is saved in full or not at all.
  • Concurrency: if two people edit the same record, the second one is told instead of overwriting the first, and every write checks how many rows it changed.
  • Idempotency: anything that can be retried (a payment, a webhook, a submission from an app with no signal) carries a unique key, so repeating the request doesn't duplicate the result.
  • Versioned migrations: every database change travels with the code and is applied the same way in development, staging and production.
  • History on critical tables: who changed what and when, with the old and new value. You can always explain why a number is what it is.

Redis: cache, queues and limits

We use Redis for three things. Caching data that is read often and changes rarely (catalogues, permissions, settings), with expiry and invalidation when the data changes. Queues with BullMQ for slow work (closes, exports, emails, integrations), with retries, a dead-letter queue and a separate worker that doesn't slow the API down. And rate limits per user or per IP, so no one can overload the system. With several API instances, Redis is also what they share.

Real time with WebSockets

When a screen needs to know about something without reloading (a trip changing status, a new order, a chat, the progress of a long process), we use NestJS WebSocket gateways with Socket.IO. Every connection is authenticated, every message is validated like an API request and confirmed with an acknowledgement. With several instances, the Redis adapter distributes the messages, and the socket only loads on the screens that use it.

Security

  • Headers from the first release, on the web and on the API: Content-Security-Policy, HSTS, nosniff and Referrer-Policy. No one can embed the system inside another page.
  • Sessions and passwords: httpOnly secure cookies, hashed passwords and CORS locked to your own domains.
  • A timeout on every call to another service: if a third party hangs, the system reports the error instead of waiting forever.
  • Secrets kept out of the code and logs that never store passwords or tokens.

Quality: tests on every change

  • Unit tests for the business rules and API tests against a real database.
  • End-to-end tests with Playwright that walk the user's whole journey, on desktop and on mobile, not each screen on its own.
  • Strict TypeScript, ESLint and our own checks (for example, that no internal link reloads the page) that stop a change before it ships.
  • Code review and continuous integration: all of this runs before every deployment.
  • Every bug gets a test: first a test that reproduces it, then the fix, then a search for the same pattern across the whole codebase.

Operations and deployment

  • Docker containers and separate environments (development, staging and production), with automated deployments and rollback.
  • JSON logs with an ID per request, to follow an error from the screen down to the database.
  • Health checks and graceful shutdown: when a new version ships, requests in flight finish before the process stops.
  • Monitoring, alerts and backups that are tested, not just scheduled.

Real cases

Starting pointWhat we builtResult
A security and logistics company tracked its truck traffic and its members' pay in a spreadsheet with copied formulasA Next.js grid with formulas and a NestJS API that validates, recalculates and audits every changeMore than 3,200 trips a month in a single system, in 6 months of development. See the case
A Visual Basic payroll engine that only ran on Internet ExplorerThe web in Next.js, the APIs in NestJS and a separate calculation engine that scales during payroll closesPayroll for several countries from Chrome, Edge, Firefox or Safari. See the case
Companies with no reliable record of working hoursA Next.js web dashboard for each company, with the clock-ins and the payrollMore than 300 companies and more than 10,000 users on the platform. See the case

How much does Next.js and NestJS development cost?

The cost is driven by scope, not by the technology: how many screens and rules the first module has, which systems it must integrate with, how many roles and companies share it, whether data has to be migrated from an earlier system and what infrastructure is needed. For an existing system, the state of the code also counts. We quote in stages, starting with a first release that can be used. How we build that number is in how to estimate a software project, and if you want one for your case, get in touch.

Common mistakes

  • Putting all the logic inside the web app. It works until the app or an integration arrives and it has to be pulled out.
  • Checking permissions only in the menu. The check belongs in the API and on every screen.
  • Links that reload the whole page. You lose instant navigation and prefetching.
  • Calls to other services with no timeout. If the other service hangs, the whole system hangs.
  • Modules that read other modules' tables. Each module asks the owner for its data, or a small change breaks three screens.
  • Writing to several tables without a transaction. If something fails halfway, you are left with a payroll run with no lines or a payment that isn't allocated.
  • Retries that duplicate. Without a unique key, a payment resent after a network drop is charged twice.
Next.js and NestJS development: web dashboard, TypeScript API and change audit trail

How we work with Next.js and NestJS

The decisions that keep a system easy to change.

Web dashboard built with Next.js: fixed sidebar and trips table

Screens that change instantly

A fixed menu and a skeleton while data loads.

Ver más →
NestJS API with TypeScript data validation

An API with contracts and validation

Every input is validated before it touches the database.

Ver más →
Role-based permissions in a Next.js and NestJS system: two users see the same dashboard with different actions

Permissions in the API and on every screen

Hiding a button isn't enough.

Ver más →
Background job queue in a Node.js API: closes and exports

Long processes in the background

Closes, exports and recalculations in a queue.

Ver más →
TypeScript code shared between Next.js and NestJS

TypeScript end to end

The same types on screen and in the API.

Ver más →
What we solve

What we solve with Next.js and NestJS

The problems that show up when a web system grows without structure.

Code nobody dares to touch

Every change breaks something else because there is no structure and no types to warn you.

Screens that are slow to change

Every click reloads the whole page and the menu waits for the server again.

A different integration per channel

The web, the app and other systems each consume something different and nothing matches.

Permissions that live in the menu

The button is hidden, but the API answers anyone who calls it.

How we work

How we work

1

Discovery

Screens, rules, roles and integrations, with the people who will use the system.

2

First release

A complete module in production, with its API, permissions and tests.

3

Short releases

Each new module ships once it is tested, without waiting for the end.

4

Operations

Monitoring, maintenance and evolution of the system in production.

25+
Years building software
500+
Projects
3,200+
Trips a month in a Next.js and NestJS system
300+
Companies use a dashboard we built in Next.js
FAQ
What is NestJS and what is it used for?

It is a Node.js framework for building APIs and services in TypeScript. It organises code into modules, controllers and services, and comes with data validation, permissions and dependency injection. It is used for the part of the system that stores the data and applies the rules.

Is Next.js good for management systems or only for websites?

Both. For a management system, the App Router keeps the menu in place, loads each screen instantly with its skeleton and lets permissions be checked on every screen.

Why use NestJS if Next.js can already have an API?

For a small system Next.js alone is enough. When the same API will be used by a mobile app or other systems, or there are many rules and permissions, a separate NestJS API keeps the code organised and independent of the web.

Do Next.js and NestJS work for large systems?

Yes. Both run a payroll platform for several countries, and Next.js powers the dashboard of a platform with more than 300 companies. What decides whether it scales is the architecture: queues for slow work, a well-designed database and separate services when needed.

Can you take over a Next.js or NestJS system built by another team?

Yes. First we review the code, the database and how it is deployed, and tell you what is fine, what should be fixed before adding features and what risks we see.

How is Next.js and NestJS development quoted?

In stages. After a first conversation we define a first usable release and quote it based on its screens, rules, integrations and data migration. Later stages are quoted with what was learned.

Let's talk about your system

Tell us what it has to do and we'll tell you how we would build it with Next.js and NestJS.

Contact us