raphyabak's avatar

I built an Eloquent-style ORM for Node.js because I kept missing it every time I touched a JS project

Been writing Laravel for years. Every time a project pulls me into Node.js territory, whether it's a side project, a microservice, or just helping a team, the first thing I notice is that nothing feels like Eloquent.

Prisma is fine but it's a different mental model entirely. TypeORM is verbose. Drizzle is SQL-first in a way that's almost too raw. None of them have scopes, observers, morph relationships, or that clean fluent API that just clicks once you know it.

So I built one.

It's called IlanaORM (ilana-orm on npm). It runs on Node.js and TypeScript, built on Knex.js under the hood, and the API is as close to Eloquent as I could get it.

Here's what the same pattern looks like side by side:

Laravel Eloquent:

$posts = Post::published()
    ->with('author')
    ->orderBy('created_at', 'desc')
    ->get();

IlanaORM:

const posts = await Post.query()
  .published()
  .with('author')
  .orderBy('created_at', 'desc')
  .get();

Scopes work exactly the same way. Define them on the model, chain them on queries. Relationships (hasOne, hasMany, belongsTo, belongsToMany, morphTo, morphMany, hasManyThrough) all work. Soft deletes, casting, events, observers, global scopes, factories, seeders, migrations, all in there.

A few things beyond standard Eloquent:

  • ULID and UUID primary keys supported (opt-in)
  • pgvector support built in for AI/embedding search
  • Edge runtime support (Cloudflare Workers, Next.js edge routes)
  • Supports MySQL, PostgreSQL, SQLite, and Supabase
  • No code generation step

It is live now. Docs are at https://raphwebb.mintlify.com and the package is npm install ilana-orm.

GitHub: https://github.com/raphyabak/ilana-orm

Genuinely curious what you all think, especially if you've worked in both Laravel and Node.js and felt the same frustration. Happy to hear what's missing or what I got wrong.

0 likes
0 replies

Please or to participate in this conversation.