·

Next.js 15 Server Actions

Next.js 15 Server Actions — a complete, field-tested reference by John Kihiu.

John Kihiu12 min read

Next.js 15 Server Actions is the kind of work that pays for itself the first time you ship. The patterns have stabilised; the libraries have matured; the next decade of web development is the boring application of these patterns. This guide is the field-tested walkthrough of Next.js 15 in a production context.

The stack today

The default web stack in 2026 has stabilised around:

The framework matters less than the discipline

A well-structured Laravel app beats a poorly-structured Next.js app. A team that writes tests beats a team that does not. The framework is the tool; the discipline is what makes the tool useful.

Laravel patterns

Laravel is the most productive web framework in 2026 for the typical SaaS application. The patterns that work:

PHP · LARAVEL ACTION
class CreateInvoiceAction
{
    public function execute(Quote $quote): Invoice
    {
        return DB::transaction(function () use ($quote) {
            $invoice = Invoice::create([
                "customer_id" => $quote->customer_id,
                "quote_id" => $quote->id,
                "total" => $quote->total,
            ]);
            foreach ($quote->lines as $line) {
                $invoice->lines()->create($line->toArray());
            }
            event(new InvoiceCreated($invoice));
            return $invoice;
        });
    }
}

For the broader Acumatica integration patterns, see the REST API definitive guide.

Real-time patterns

Real-time is a first-class requirement in modern SaaS. The patterns:

PatternUse whenTool
Server-Sent EventsOne-way server-to-client, simpleNative browser, Laravel Reverb
WebSocketsBidirectional, real-time chatSoketi, Laravel Reverb, Pusher
Long pollingFallback for restrictive networksNative
PollingLast resortNative, but accept the tax
LARAVEL · REVERB BROADCASTING
// In a controller
broadcast(new OrderStatusChanged($order))->toOthers();

// In a frontend component
var orderChannel = Echo.channel('orders.' + orderId);
orderChannel.listen(".order.status.changed", (e) => {
    order.value.status = e.status;
    toast.success("Order updated");
});

API design

Modern APIs are REST (or GraphQL). The patterns:

The OpenAPI drift

The OpenAPI spec drifts from the implementation within a week of every release. The only fix is generation, not maintenance. Generate the spec from the routes, the validation rules, and the response schemas.

For the broader API design patterns, see the REST API definitive guide and the OpenAPI generation guide.

Deployment

The deployment story in 2026:

  1. Code in Git.
  2. CI builds, tests, and packages.
  3. Container is built and pushed to a registry.
  4. CD deploys to staging, runs smoke tests, deploys to production.
  5. Observability tracks the deployment; rollback is automated.
GITHUB ACTIONS · DEPLOY
name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: docker build -t app:${ github.sha } } .
      - run: docker push registry.example.com/app:${ github.sha } }
      - run: kubectl set image deployment/app app=registry.example.com/app:${ github.sha } }

For the broader DevOps patterns, see the CI/CD guide and the pipeline design guide.

Wrapping up

The stack, the patterns, the real-time, the API design, the deployment. Get all five right and the modern web app is a product. The framework matters less than the discipline; the discipline is what makes the framework useful.

Wrapping up

That is the working approach I use on Acumatica projects. The same patterns show up whether you are in Nairobi, Johannesburg, Kigali, Lusaka or Harare — and they are the things that keep work moving when an upgrade lands at 6 PM on a Friday. If you are stuck on something specific, reach out or keep reading through the rest of the Acumatica blog.

John Kihiu
John Kihiu
Acumatica ERP Developer · Laravel Engineer

Independent software engineer in Nairobi specialising in Acumatica customisations, Laravel backends, and tax fiscalisation integrations across East and Southern Africa.