Skip to content

arkstack-hq/arkormx

Repository files navigation

Arkormˣ

NPM Downloads npm version License CI Deploy Documentation codecov

Arkormˣ is a framework-agnostic ORM designed to run anywhere Node.js runs. It brings a familiar model layer and fluent query builder on top of Prisma delegates, enabling clean, modern, and type-safe development.

Features

  • Arkormˣ is built on top of Prisma, providing a familiar and powerful API for database interactions.
  • Delegate-backed query execution with practical ORM ergonomics.
  • End-to-end guides for setup, querying, relationships, migrations, and CLI usage.
  • Full TypeScript support, providing strong typing and improved developer experience.
  • Follows best practices for security, ensuring your data is protected.
  • Open source and welcomes contributions from developers around the world.
  • Intuitive API that feels familiar to users transitioning from Eloquent or other ORMs, making it easy to learn and adopt.

Getting Started

Installation

pnpm add arkormx @prisma/client
pnpm add -D prisma

Configuration

Create arkormx.config.js in your project root:

import { defineConfig } from 'arkormx';
import { PrismaClient } from '@prisma/client';

export default defineConfig({
  prisma: new PrismaClient(...),
});

Or run the Arkormˣ CLI command npx arkorm init to initialize your project along with configuration.

Define a model

import { Model } from 'arkormx';

export class User extends Model<'users'> {
  protected static override delegate = 'users'; // not required if your model name matches the delegate name or the pluralized form of it
}

Generate Prisma client

pnpm prisma generate

Run queries

const users = await User.query()
  .whereKey('isActive', true)
  .latest()
  .limit(10)
  .get();

Next steps

About

Modern TypeScript-first ORM for Node.js.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors