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
Partial. Bun only
Partial. Node.js
Scope
HTTP layer and DI container
Full-stack application framework
Maturity
No. Alpha
Yes. Stable, with a long release history
Dependency injection
Partial. Constructor injection, singleton only
Yes. IoC container with @inject()
ORM
No. None — bring your own client
Yes. Lucid, Active Record and query builder
Validation
Yes. Standard Schema, TypeBox, Elysia t
Yes. VineJS
Authentication and authorization
No. None
Yes. Auth guards and Bouncer policies
Sessions, views, and frontend
No. Cookie access only
Yes. Sessions, Edge templates, Vite and Inertia
Config, mail, queues, events, i18n
No. None
Yes. First-party packages
CLI
Yes. Project and component schematics
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.
AponiaJS vs NestJS
NestJS is a mature, platform-agnostic Node framework with a complete request pipeline. AponiaJS reuses its vocabulary on Bun with a much smaller feature set.
AponiaJS vs Elysia
Elysia is the runtime AponiaJS is built on. This page is about what the module graph adds, what it costs, and when the plain chained application is still the better answer.