Forj is a lightweight, dependency-free SQLite ORM and Query Builder for Node.js 18+. Version 0.1.11 supports schema migrations, query building, and an active record-like ORM pattern. Unlike heavier ORMs like Sequelize or Knex, Forj has zero dependencies and focuses on SQLite exclusively, making it ideal for embedded databases and serverless environments. It provides both a fluent query builder and a resource-based ORM with support for transactions, migrations, and model definitions. The package is released under the MIT license and follows semantic versioning.
npm install forjNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initializing Forj, defining a schema, creating a model, inserting a record, and querying with the builder.
Upgrade Node.js to version 18 or later.
Replace `forj.table('name')` with `forj.query('name')`.Use only 'integer', 'text', 'real', 'blob', or 'numeric' as column types.
Check for successful save by catching errors or using Model.create() which returns the row.
Move options like `autoIncrement: true` into the column definition object.
Use `import` syntax or switch to dynamic import: `const Forj = (await import('forj')).default`.Use `forj.query('tableName')` instead.Use `schema.create({ ifNotExists: true })` or wrap in a try-catch.Change column type to 'text' (or 'integer', 'real', 'blob', 'numeric').
No dependency data recorded yet.