--- title: "Comparisons" description: "How Beignet compares to tRPC, ts-rest, oRPC, Hono, NestJS, AdonisJS, and Laravel-style frameworks — and when each is the better choice." url: "https://www.beignetjs.com/comparisons" markdown_url: "https://www.beignetjs.com/markdown/comparisons.md" framework_version: "0.0.65" documentation_scope: "current-checkout" source_revision: "e5b4771b262efbdd036e3a40a514c08d1508316c" source_modified: true --- # Comparisons Choose based on two decisions: how you want to define your API, and how much of the application structure you want the framework to provide. Beignet provides an application architecture for TypeScript: shared REST contracts, feature-owned business workflows, and infrastructure connected through typed ports. Authentication, background work, notifications, and other production capabilities fit that model. Choose it when you want those decisions to follow one set of conventions. A focused API library is a better fit when you already have an application structure you want to keep. The CLI helps developers and coding agents follow the architecture: it maps the app, scaffolds features and their wiring, and checks dependency boundaries and setup alongside the app's own tests. [Agent tools](https://www.beignetjs.com/markdown/agents.md) explains the commands, package guidance, and MCP tools that support this workflow. > **Alpha software** > > Beignet is pre-1.0 alpha, and its APIs can change between releases. Consider > release stability, maintenance status, available integrations, and your > team's experience alongside the API design. ## The short version | Tool | What it is | Reach for it when | | --------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | Beignet | TypeScript application framework with a shared architecture and integrated production capabilities | You want APIs, business workflows, infrastructure, and CLI checks to follow one application model, and can evaluate an alpha framework | | tRPC | Typed RPC for full-stack TypeScript | You prefer typed procedure calls between TypeScript clients and servers | | ts-rest | Typed REST contract library; no longer maintained | You are evaluating an existing integration or a maintained fork | | oRPC | Procedures with RPC and OpenAPI transports | You want procedure ergonomics with broad runtime adapters | | Hono | Web framework built on Web Standards | You want a small HTTP layer and will choose your application conventions | | NestJS | Decorator-based Node application framework | Your team prefers modules, decorators, and dependency injection | | AdonisJS | TypeScript-first MVC framework | You want a Laravel-style monolith in TypeScript on a long-running server | | Laravel / Rails | PHP and Ruby application frameworks | You prefer their application ecosystems and languages | ## tRPC tRPC gives full-stack TypeScript teams typed server procedures that feel like local function calls. It deliberately hides HTTP — methods, paths, and status codes are transport details — which is exactly right for internal APIs where both ends are TypeScript and ship together. Beignet keeps the opposite bet: REST is the public API. Methods, paths, headers, status codes, and error shapes are explicit in the contract, so the same API serves your own frontend, non-TypeScript consumers, OpenAPI docs, and anything else that speaks HTTP — without a second API layer bolted on later. **Choose tRPC when** the API is private to one TypeScript codebase, you want procedure-call ergonomics with middleware-chained context, or you need procedure subscriptions over WebSockets. Beignet's [broadcasting](https://www.beignetjs.com/markdown/broadcasting.md) uses typed Server-Sent Events to signal changes; clients reconcile by refetching authoritative application data. **Choose Beignet when** the HTTP surface is a product requirement — public APIs, mobile clients, webhooks, OpenAPI — or when you want the framework to also answer what happens *behind* the procedure: where use cases, policies, jobs, and infrastructure live. ## ts-rest [ts-rest is no longer maintained](https://ts-rest.com/). As of November 8, 2026, its maintainers state that there are no planned releases, fixes, security updates, or support. Treat it as an architectural comparison and an existing-codebase decision; evaluate a fork's maintenance separately before choosing it for a new app. ts-rest is the closest comparison at the contract layer: a compact object DSL for typed REST contracts shared between server and client, with response validation, React Query hooks, and OpenAPI generation. As a focused library it is easy to adopt incrementally inside an existing app, and its nested router contract shape is very discoverable. Beignet's contract layer covers the same ground with a builder grammar (`defineContractGroup().namespace(...).prefix(...)`), but the differentiator is everything after the contract: a canonical app structure, use cases with validated inputs and outputs, ports and providers for infrastructure, an error catalog with route-owned errors, a workflow tier (events, jobs, schedules, tasks, notifications, uploads, a transactional outbox, idempotency), generators, architecture linting, doctor checks, and a devtools dashboard. **For an existing ts-rest app**, its contracts and adapters may already meet your needs. Assess the maintenance implications before expanding its role; Beignet is an application framework with conventions to adopt, so migration involves more than replacing the contract syntax. **Choose Beignet when** you are starting an application and want the typed REST boundary *and* the application model behind it to come from one tool that enforces its own conventions. ## oRPC oRPC supports inferred client types, Standard Schema, typed errors, and both RPC and OpenAPI transports. It also has a [contract-first API](https://orpc.dev/docs/contract/procedure) for defining input, output, errors, and metadata separately from implementations. The trade is the same as ts-rest but with an RPC accent: oRPC is a procedure layer you bring into your own architecture, and its OpenAPI story sits alongside an RPC protocol rather than REST being the only shape. Beignet has no RPC mode — REST is the boundary — and spends its complexity budget on the application framework instead: feature folders, dependency-direction linting, provider-backed infrastructure, background work, and tooling that keeps generated apps conformant. **Choose oRPC when** you want procedure composition with broad runtime flexibility and are happy owning the rest of the stack. **Choose Beignet when** you want the REST contract and the production app structure to be the same opinionated system. ## Hono [Hono](https://hono.dev/docs) is a web framework built on Web Standards, with typed routes via its RPC client and OpenAPI support through extensions. It focuses on the HTTP layer; your application chooses its business-logic structure, background execution, and infrastructure wiring. Beignet sits a full layer up. Contracts are schema-first rather than route-handler-first, and the framework owns the answers Hono leaves open: where business logic lives, how infrastructure stays swappable, how jobs and events get reliability guarantees, and how drift gets caught (`beignet lint`, `beignet doctor`). Beignet's server core is runtime-portable through the same fetch standard — Next.js is the first-class adapter, and `@beignet/web` serves Cloudflare Workers, Bun, Deno, and Node fetch servers. **Choose Hono when** you want a small HTTP layer and intend to build your own conventions on top. **Choose Beignet when** you want the conventions included and enforced, and REST contracts as the source of truth rather than handler inference. ## NestJS NestJS is a Node application framework built around modules, decorators, dependency injection, guards, pipes, and interceptors. It shares Beignet's belief that applications need structure, and it has a decade of production hardening Beignet cannot claim. Nest organizes application dependencies through modules, class decorators, and a runtime dependency injection container. Beignet uses contract builders and plain-interface ports wired explicitly in `infra/`. Client types and OpenAPI derive from the contracts, while CLI linting checks the application's dependency direction. **Choose NestJS when** your team wants modules, decorators, dependency injection, and the Nest integration ecosystem. **Choose Beignet when** end-to-end type inference from a single contract matters more than ecosystem breadth, and you prefer functional composition to decorators and DI containers. ## AdonisJS AdonisJS is a TypeScript MVC framework with an ORM, auth, validation, mail, events, a CLI, and testing tools. Its [Tuyau integration](https://docs.adonisjs.com/guides/frontend/api-client) generates a typed HTTP client from routes, controllers, and validators; its React and Vue starter kits include that integration. The split is in where types come from and where the app runs. Adonis is MVC: routes point at controllers and validators guard inputs. Tuyau generates the client registry from those definitions. In Beignet, the contract is a standalone value, and the server, client, React Query options, forms, and OpenAPI use that definition without generating client code. Architecture differs the same way — Adonis structures the app through an IoC container and service providers, where Beignet uses plain-interface ports wired explicitly in `infra/` and enforced by static linting. And Adonis assumes a long-running Node server, while Beignet is built for the Next.js/serverless deployment model first. **Choose AdonisJS when** you want its MVC conventions and integrated tools, with typed clients generated from your routes, controllers, and validators. **Choose Beignet when** the contract-first boundary and no-codegen inference across the whole stack are the point, or your deployment target is serverless/Next.js rather than a persistent Node process. ## Laravel and Rails Laravel and Rails provide application conventions for persistence, background work, mail, authorization, testing, and deployment. Beignet takes the same approach of giving related feature code predictable places to live. The main difference is language and type sharing. A PHP or Ruby backend can serve a TypeScript frontend, with API types shared through generated clients or other integrations. Beignet keeps contracts in TypeScript so the server, client, and frontend adapters share their types directly. Its application capabilities include persistence, jobs, outbox delivery, and notifications, with the stability limits of an alpha framework. **Choose Laravel or Rails when** you prefer their application ecosystems and PHP or Ruby fits your team. **Choose Beignet when** the stack is TypeScript end to end and you want framework-grade structure without giving up typed contracts as the source of truth. ## What Beignet deliberately doesn't do - No RPC protocol or WebSocket transport. REST and standard `Response` are the HTTP boundary; [broadcasting](https://www.beignetjs.com/markdown/broadcasting.md) provides typed SSE subscriptions. - Runtime validation accepts Standard Schema libraries. OpenAPI includes Zod support; other libraries need [custom schema introspection and conversion](https://www.beignetjs.com/markdown/openapi.md#custom-schema-introspection). - Next.js is the first-class server adapter; other runtimes go through the fetch adapter in `@beignet/web` rather than per-framework adapters. - Pre-1.0: APIs can change between `0.0.x` releases while the framework settles. Start with [Quickstart](https://www.beignetjs.com/markdown/getting-started.md) to change a schema across the form, API, and OpenAPI document, then [build your first feature](https://www.beignetjs.com/markdown/build-first-resource.md).