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

@dalgo/core

v0.1.0

Published

Database abstraction layer for TypeScript and browser applications

Downloads

437

Readme

DALgo for TypeScript

@dalgo/core is the browser-neutral TypeScript implementation of DALgo. It provides hierarchical keys, typed collections, structured queries, records, database sessions, and transaction-only mutation contracts without coupling application code to a database SDK.

The first adapter is the Firestore adapter, which uses Firebase's modular Web SDK and therefore works directly in browsers. The adapters are being migrated to the @dalgo/* scope separately; the @dalgo/core package does not connect to a database by itself.

Install

Once the first npm release is available:

pnpm add @dalgo/core

For source development before or after publication, use the dalgo-js repository. Do not mix this package with an adapter still importing @dal-go/dalgo: that would install two different DALgo core module identities.

Build a browser query

import { collection, key } from "@dalgo/core";

interface Item {
  title: string;
  done: boolean;
  rank: number;
}

const spaceKey = key("spaces", spaceId);
const items = collection<Item>("items").in(spaceKey);

const query = items.query()
  .where("done", "==", false)
  .orderBy("rank")
  .limit(25)
  .build();

// Pass query to an adapter updated for @dalgo/core.

Subcollections use DALgo's ordinary parent-key model:

import { collection, key } from "@dalgo/core";

const spaceKey = key("spaces", spaceId);
const items = collection<Item>("items").in(spaceKey);

Collection-group queries are explicit:

import { collectionGroup } from "@dalgo/core";

const query = collectionGroup<Item>("items")
  .where("done", "==", false)
  .limit(25)
  .build();

Security boundary

DALgo does not turn browser code into a trusted backend. A Firestore browser request runs as the current Firebase user and is authorized by Firestore Security Rules. Use Firebase Authentication, least-privilege rules, and App Check where appropriate. Never put service-account credentials in a browser.

Status

The initial API covers point reads, hierarchical collections, collection-group queries, filters, ordering, deterministic cursor pagination, and read-write transactions. Adapters must reject unsupported capabilities explicitly rather than silently changing query semantics.

License

MIT