KohanaJS is a Node.js ORM framework inspired by PHP Kohana, providing a code generator for database schema, ORM models, and site structure. Current stable version is 11.11.6, released on 2024-01-01 with monthly patch releases. It integrates Fastify as the default web server and Better SQLite3 for database. Key differentiators include automatic model generation from database tables, a modular MVC structure, and support for multiple databases via SQLite3. Unlike other ORMs like Sequelize or Prisma, KohanaJS offers a more opinionated, convention-over-configuration approach.
npm install kohanajs-startNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic KohanaJS setup with SQLite, model definition with JSON schema, and Fastify server startup.
Use ESM import syntax (import { ... } from 'kohanajs-start') or stay on v9.x.Change client to 'sqlite3' in your config.
Use model static methods like Model.query() instead.
Use a dedicated auth package like '@fastify/auth'.
Always define tableName as a static getter returns exactly the camelCase name.
Create a 'migrations/' folder in your project root and place migration files there.
Run 'npm install kohanajs-start' and use correct import syntax.
Set type: 'module' in package.json and use import syntax.
Use import { Kohana } from 'kohanajs-start'.Set client to 'sqlite3' in your database config.
Update kohanajs-orm to >=11.0.0.