npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@teqfw/db

v2.2.0

Published

Relational database schema, transaction, typed-query, and rebuild package for TeqFW applications using DI 2.x.

Readme

@teqfw/db

npms.io

Human-governed. Agent-built. Agent-ready.

@teqfw/db turns explicit DEM v2 declarations contributed by an application and its packages into one validated relational model, then provides schema, transaction, typed-query, and rebuild tools around it. It is a foundational package of the Tequila Framework (TeqFW): created and evolved by coding agents under the architectural direction and final responsibility of Alex Gusev, and shipped with a version-matched Agent Skill so other agents can understand, integrate, and use it correctly.

Why It Matters

Applications can keep relational declarations close to the packages that own them while still building one explicit database target. @teqfw/db validates how those fragments fit together before database work begins and preserves the source of every composed element and diagnostic.

It supports PostgreSQL, MySQL/MariaDB, and SQLite through Knex, with dialect-aware capabilities for other supported configurations.

What It Provides

  • Composition and validation of distributed Domain Entity Model (DEM) fragments.
  • Logical core.identity and core.ref types, materialized by the host's identityProfile without package-specific key-width choices.
  • Dialect-aware schema projection, typed relational queries, and rebuild operations.
  • Explicit transaction ownership: operations can use a caller transaction or manage their own.
  • Rebuild-oriented structure recreation and compatible data transfer with evidence.

DEM Identity And References

Package fragments declare logical identity and reference types; the host selects one identityProfile for the target model. For example:

{
  "attr": {
    "id": {"type": {"id": "core.identity"}},
    "ownerId": {"type": {"id": "core.ref"}}
  },
  "relation": {
    "owner": {"attrs": ["ownerId"], "ref": {"path": "/user", "attrs": ["id"]}}
  }
}

core.ref always points through a relation to a core.identity; it receives the identity representation, is never generated, and does not select a SQL type. The host profile lets the same package model use the target database representation. See the packaged consumer skill for integration details.

Install

npm install @teqfw/db

The package registers the TeqFw_Db_ DI namespace. Configure the connection through @teqfw/cfg, load its configuration before starting database services, and compose runtime components through that namespace.

Development Verification

From a standalone checkout, install the locked dependency graph and run the package suite:

npm ci
npm test

Best Fit And Boundaries

Use @teqfw/db when a TeqFW application needs a shared relational persistence layer with declarations distributed across its packages.

It is not an ORM, does not own application entities, authorization, or business rules, and does not infer incremental migrations from database drift. A rebuild preserves data only through an explicit snapshot or source-to-target transfer; release sequencing, cutover, and rollback policy stay with the application.

For product and architectural background, see the project context. The package root is type-only; runtime integration is through the TeqFw_Db_ namespace rather than @teqfw/db/src/** imports.

Agent-Driven Development

TeqFW is built through the same development model that it is designed to enable: one human defines the intent, architecture, constraints, and acceptance criteria; coding agents implement and maintain the products; other agents use those products in different combinations to create applications.

@teqfw/db is a foundational package of TeqFW. The package includes a version-matched Agent Skill in skills/teqfw-db. This README provides a human-facing product overview; the skill provides agents with the package concepts, contracts, integration rules, examples, and boundaries.

Mount the skill into a host project:

mkdir -p .agents/skills
ln -s ../../node_modules/@teqfw/db/skills/teqfw-db \
  .agents/skills/teqfw-db

Each TeqFW package is both a practical software component and a working demonstration of human-governed, agent-driven development. This work follows the Agent-Driven Software Management (ADSM) approach: human intent, architectural authority, acceptance, and responsibility remain authoritative; agents act as implementation and reasoning partners.

License

Apache-2.0