Axeom Logo
Axeom.
Comparisons

Axeom vs. tRPC

Comparing E2E type safety architectures.

tRPC and Axeom both aim to solve the problem of type safety between the server and the frontend without relying on code generation. However, Axeom does this while remaining a standard, high-performance HTTP engine—eliminating the need for proprietary protocols.


Routing & Protocol

tRPC is a protocol layer that hides HTTP. Axeom is an HTTP engine that embraces it.

@axeom/framework

import  from '@axeom/framework';
const  = new ();

// Standard REST API
.('/user', () => {
  return { : 1 };
});
tRPC

import {  } from '@trpc/server';
const  = .create();

// Proprietary Procedure
const  = .router({
  : .procedure.query(() => {
    return { : 1 };
  })
});

Validation & Type Safety

tRPC requires Zod. Axeom uses its native s schema, which is lighter and more integrated into the engine registry.

@axeom/framework

import , {  } from '@axeom/framework';
const  = new ();

// Native Registry Inference
.('/auth', ({  }) => {
  return ; // Typed
}, {
  : .({ : .() })
});
Hono

import {  } from '@trpc/server';
import {  } from 'zod';
const  = .create();

// Proxy-based inference
const  = .router({
  : .procedure
    .input(.object({ : .string() }))
    .mutation(({  }) => )
});

Lifecycle (Context)

tRPC's context is built through middleware layers. Axeom uses a Flattened Hook System (onRequest, onResponse) and .derive().

@axeom/framework

import  from '@axeom/framework';
const  = new ();

// Direct Hook/Derive patterns
.(() => ({ : "@axeom/framework" }))
   .(() => {
     .(..);
   });
tRPC

import {  } from '@trpc/server';
const  = .create();

// Procedure Middleware
const  = .procedure.use(({ ,  }) => {
  return ({ : { : '@axeom/framework' } });
});

Encapsulation (Modules)

Axeom groups its logic into paths via the fluent API. tRPC groups its logic into nested router objects.

@axeom/framework

import  from '@axeom/framework';
const  = new ();

// Path-based grouping
.('/v1', () => {
  .('/ping', () => "pong");
});
tRPC

import {  } from '@trpc/server';
const  = .create();

// Object-based nesting
const  = .router({
  : .procedure.query(() => "pong")
});

OpenAPI & Documentation

Axeom provides native Swagger support via a plugin. tRPC requires specialized libraries like trpc-openapi and explicit metadata for every route to escape its proprietary format.

@axeom/framework

import  from '@axeom/framework';
import {  } from "@axeom/swagger";
const  = new ();

// Native Swagger Plugin
.(()); 
tRPC

import {  } from '@trpc/server';
const  = .create();

// Requires trpc-openapi
.procedure
  .meta({ : { : 'GET', : '/ping' } })
  .input(z.void())
  .output(z.string())
  .query(() => "pong");

Error Handling

tRPC mappings errors to TRPCError codes. Axeom uses standard HTTP statuses or rejections.

@axeom/framework

import  from '@axeom/framework';
const  = new ();

// Standard Rejections
.('/err', () => {
  throw new ("Failure");
});
tRPC

import {  } from '@trpc/server';

// Proprietary TRPCError
throw new ({ 
  : 'NOT_FOUND',
  : '...'
});

Beyond E2E Safety

tRPC is restricted to procedure calls. Axeom is a full-scale web engine with plugins for WebSockets, SSE, and more.

@axeom/framework

import  from '@axeom/framework';
import {  } from '@axeom/ws';
const  = new ();

// WS, SSE, Plugins
.(());
tRPC

// Procedure calls only

Summary: Why Axeom Wins

FeaturetRPCAxeom
API FormatProprietary ProcedureStandard REST / HTTP
ConsumptionTS Client Only (mostly)Universal (Any HTTP Client)
DependencyRequires TypeBox/ZodZero-Dependency Core
ExtensibilityLimited to ProceduresUnlimited via Plugins
PerformanceHigh Overhead (Proxy logic)Ultra-Fast (Radix Router)
OpenAPIRequires Complex BridgesNative Plugin Support

On this page