Platform
Server-side logic.
No separate deploy.
Write JavaScript, push it with one command, and it runs inside Nimbu, next to your content, customers, and custom data. Functions, custom HTTP routes, scheduled jobs, and callbacks. No serverless account. No second auth layer.
One runtime. Four shapes.
Cloud Code covers what templates cannot. Functions hold named server-side logic callable from a theme, a client, or an agent. Custom HTTP routes are your own GET/POST/PUT endpoints mounted on the site. Scheduled jobs run background work on a cron schedule. Callbacks fire before or after events on content, products, customers, and orders. The Nimbu SDK is injected into the runtime. There is no API client to configure and no credentials to pass.
- Functions Named server-side logic, callable from a theme, API client, or agent.
- Custom routes Your own GET/POST/PUT/PATCH/DELETE endpoints, mounted on the site.
- Scheduled jobs Background work on a cron-style schedule, or enqueued on demand.
- Callbacks Before/after hooks on content, product, customer, and order events.
The tools backend work actually needs.
Cloud Code ships a curated module library so you reach for http, crypto, jwt, csv, pdf, and mail without wiring them yourself. The honest scope: this is a sandboxed V8 runtime, not full Node.js with npm. The catalog is fixed, handlers run under execution timeouts, and you cannot add arbitrary packages. That is the trade. You get a narrow surface you can reason about and deploy in seconds instead of a dependency tree you own forever.
Use cases
What gets built with it.
The work that used to mean standing up a separate backend service, or adding another glue layer to the portal.
-
Price recalculation and B2B rules
Apply per-customer or group pricing server-side with request.customer context, then return trusted results to the theme or API.
-
Data enrichment and validation
On before-callbacks for channels or customers, validate and normalize entries as they are saved.
-
Custom auth flows and gated routes
Sign and verify JWTs, integrate an external IdP, gate functions and routes on request.customer.
-
Stateful workflows and webhooks
React to customer, order, and content events. Expose routes, enqueue jobs, sync to ERPs and CRMs.
-
Transactional email and exports
Send mail on events, generate CSV or PDF exports on demand, no third-party function host needed.
-
Scheduled background jobs
Nightly sync, cache warm-up, report generation. Runs on a cron schedule with no external scheduler.
Assert behavior before it touches production.
Cloud Code is testable in isolation. @nimbu/testing runs your handlers against in-memory fixtures so you assert behavior before anything reaches a live site. It plugs into Jest, mocks the API and the request context, and hands you the registered handler to call directly. Catch the regression on your machine, not on the client's launch night.
Deploy it, then run it, from the CLI or an agent.
Cloud Code does not only run when a person clicks. A function can be called from a theme, hit over the REST API, fired by a content or order event, run on a schedule, or invoked by an agent over the CLI. Because the same logic is reachable by hand, over the API, and from the command line, an agent can deploy a function and then run it on a real site. The backend is as programmable as the rest of the platform.
In practice
Backend control without the overhead.
We moved three client integrations off a separate Lambda setup into Cloud Code. One deploy pipeline dropped out of the picture entirely, and the logic sits next to the data it touches.
Write the logic. Push it once. It runs in the platform.
No serverless account. No separate deploy. EU infrastructure, next to your data. Book a 30-minute intro or read the docs to get started.