AponiaJSDocs
Compare

AponiaJS vs AdonisJS

AdonisJS is a batteries-included full-stack Node framework with an ORM, auth, and validation. AponiaJS is an HTTP and dependency injection layer on Bun, and nothing more.

These two frameworks answer different questions. AdonisJS answers "how do I build a whole product"; AponiaJS answers "how do I organise an HTTP service on Bun".

At a glance

Runtime

AponiaJS 0.6.0-alpha.18

Partial. Bun only

AdonisJS

Partial. Node.js

Scope

AponiaJS 0.6.0-alpha.18

HTTP layer and DI container

AdonisJS

Full-stack application framework

Maturity

AponiaJS 0.6.0-alpha.18

No. Alpha

AdonisJS

Yes. Stable, with a long release history

Dependency injection

AponiaJS 0.6.0-alpha.18

Partial. Constructor injection, singleton only

AdonisJS

Yes. IoC container with @inject()

ORM

AponiaJS 0.6.0-alpha.18

No. None — bring your own client

AdonisJS

Yes. Lucid, Active Record and query builder

Validation

AponiaJS 0.6.0-alpha.18

Yes. Standard Schema, TypeBox, Elysia t

AdonisJS

Yes. VineJS

Authentication and authorization

AponiaJS 0.6.0-alpha.18

No. None

AdonisJS

Yes. Auth guards and Bouncer policies

Sessions, views, and frontend

AponiaJS 0.6.0-alpha.18

No. Cookie access only

AdonisJS

Yes. Sessions, Edge templates, Vite and Inertia

Config, mail, queues, events, i18n

AponiaJS 0.6.0-alpha.18

No. None

AdonisJS

Yes. First-party packages

CLI

AponiaJS 0.6.0-alpha.18

Yes. Project and component schematics

AdonisJS

Yes. Ace, with generators and custom commands

Routing is where they diverge first

AdonisJS keeps routes in a route file and points them at controller methods:

// start/routes.ts
import router from "@adonisjs/core/services/router";
const UsersController = () => import("#controllers/users_controller");

router.get("/users/:id", [UsersController, "show"]);

AponiaJS puts the path on the method:

import { Controller, Get, Param } from "@aponiajs/common";

@Controller("users")
export class UserController {
  @Get(":id")
  show(@Param("id") id: string) {
    return { id };
  }
}

Neither is better. A route file gives you one place to read the whole URL surface; decorators keep the path next to the code it runs. AponiaJS chose decorators because the module graph, not the router, is the organising idea — see controllers.

What AdonisJS gives you that you would have to build

Everything below is a first-party AdonisJS package and an unsolved problem in an AponiaJS application:

  • Database. Lucid models, migrations, seeders, and relationships. In AponiaJS you register a client as a provider and inject it.
  • Authentication and authorization. Guards and policies. In AponiaJS, authentication is an Elysia hook installed through native access, and there is no authorization primitive to attach a policy to.
  • Configuration. Typed config files and validated environment variables. In AponiaJS, configuration is a value provider you wire yourself, usually with a dynamic module.
  • Mail, queues, events, i18n, health checks, templating. No equivalents.

The corresponding AponiaJS argument is that you were going to choose those libraries anyway, and a smaller framework has less to disagree with. That is a real preference, not a technical advantage.

What AponiaJS gives you that AdonisJS does not

  • Bun as the runtime, with Elysia's request handling rather than Node's HTTP server.
  • End-to-end typed clients through Eden Treaty, inferred from the composed Elysia routes rather than generated from a spec. See Eden Treaty.
  • Validator freedom. VineJS is the AdonisJS validator. AponiaJS accepts any Standard Schema validator, plus TypeBox and Elysia's t, described in validation.
  • RFC 9457 Problem Details as the default error shape, in errors.

Which one to pick

Choose AdonisJS when

  • you are building a product, not a service, and want the database, auth, and admin surface decided for you;
  • you deploy to Node;
  • you want server-rendered views or Inertia alongside the API;
  • you want one vendor to own upgrades across the whole stack;
  • you are shipping to production now.

Choose AponiaJS when

  • the service is an API, the storage decision is already made, and you do not want an ORM opinion attached to the router;
  • Bun is a requirement rather than a preference;
  • you want the module and injection model without the rest of a full-stack framework;
  • alpha software is acceptable for this codebase.

No migration path is published

There is no AdonisJS migration guide, because the frameworks do not overlap enough for a mechanical port. Moving between them is a rewrite of the routing and data layers.

Frequently asked questions

Does AponiaJS have an ORM like Lucid?
No. AponiaJS has no database layer at all. You register a database client as a provider and inject it, which means you choose Drizzle, Prisma, Kysely, or Bun's own SQL APIs yourself and own the migration story.
Does AponiaJS have built-in authentication?
No. AdonisJS ships session, token, and basic-auth guards plus Bouncer for authorization. AponiaJS ships neither, and it has no guard runtime to hang authorization on yet, so authentication is written as an Elysia hook.
Can AdonisJS run on Bun?
AdonisJS targets Node.js. Some of it works under Bun, but the supported runtime is Node, and its tooling assumes it. AponiaJS requires Bun and does not run on Node.

On this page