Axeom Logo
Axeom.
Comparisons

Axeom vs. Fastify

The ultimate showdown between the Node.js standard and the weightless engine.

Fastify is the industry standard for high-performance Node.js development. Axeom takes inspiration from Fastify's speed but re-imagines the architecture for the Fetch API era, slashing bundle size and removing Node-specific lock-in.


Routing & Handlers

Axeom uses a standard REST-first approach and exposes a unified context object that works across all runtimes.

@axeom/framework

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

// Unified Context handler
.('/ping', () => {
  return "pong";
});

.('/data', ({  }) => {
  return ;
});
Fastify

import  from 'fastify';
const  = ();

// Proprietary req/reply objects
.get('/ping', async (, ) => {
  return "pong";
});

.post('/data', async (, ) => {
  return .body;
});

Validation & Type Safety

Axeom provides Zero-CodeGen Type Safety through its native s schema utility. Axeom's types are perfectly inferred at runtime and shared with the client without extra steps.

@axeom/framework

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

// Native schema-to-type inference
.('/user', ({  }) => {
  return .; // Fully typed
}, {
  : .({ : .() })
});
Fastify

import  from 'fastify';
import {  } from '@sinclair/typebox';
const  = ();

// Requires TypeBox or JSON Schema
const  = {
  : .Object({ : .Number() })
};

.post('/user', {  }, () => {
  return .body.id;
});

File Upload

Axeom handles file uploads through a unified storage abstraction, making file saving identical on Bun, Deno, and Node.

@axeom/framework

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

// Native storage abstraction
.('/upload', async () => {
  const {  } = .;
  await .storage.save(, `uploads/${.}`);
  return "Saved";
}, {
  : .({ : .() })
});
Fastify

import  from 'fastify';
const  = ();

// Requires fastify-multipart
.register(import('@fastify/multipart'));
.post('/upload', async () => {
  const  = await .file();
  // Manual pump/fs required
  return "Saved";
});

Lifecycle & Interceptors

Fastify uses an onion-model middleware. Axeom uses a Flattened Hook System (onRequest, onResponse) and .derive() for data injection.

@axeom/framework

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

// Flat Hooks & Derivations
.(() => ({ : '@axeom/framework' }))
   .(() => {
     .(..);
   });
Fastify

import  from 'fastify';
const  = ();

// Nested hooks
.addHook('onRequest', (, , ) => {
  .(.url);
  ();
});

Encapsulation (Grouping)

Axeom's grouping system is designed for isolation without the complexity of Fastify's plugin decorators.

@axeom/framework

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

// Functional grouping
.('/v1', () => {
  .('/info', () => "v1");
});
Fastify

import  from 'fastify';
const  = ();

// Plugin encapsulation
.register((, , ) => {
  .get('/info', () => "v1");
  ();
}, { : '/v1' });

Error Handling

Axeom utilizes a unified error interceptor that works seamlessly with standard JavaScript rejections.

@axeom/framework

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

// Direct rejection handling
.('/err', () => {
  throw new ("Critical Failure");
});
Fastify

import  from 'fastify';
const  = ();

// Error handler hook
.setErrorHandler((, , ) => {
  .status(500).send({ : false });
});

OpenAPI & Documentation

In Axeom, documentation is a byproduct of your schemas via the @axeom/swagger plugin.

@axeom/framework

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

.(()); 
// Documentation is automatic 
// via s.object() schemas.
Fastify

import  from 'fastify';
const  = ();

// Requires manual schema tags
.register(import('@fastify/swagger'));
.get('/ping', {
  : {
    : 'ping',
    : { 200: { : 'string' } }
  }
}, async () => "pong");

Summary: Why Axeom Wins

FeatureFastifyAxeom
RuntimeNode.js OnlyUniversal (Edge, Bun, Deno, Node)
Core Size~200KB (Transitive)~10KB (Zero Deps)
ProtocolProprietary AbstractionStandard Fetch API
ComplexityHigh (Decorators, Plugins)Low (Hooks, Groups)
Type SafetyThird-party (TypeBox/Zod)Native (s Utility)

On this page