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

@newfoundcodes/helvetium-alps

v0.1.0

Published

A database, ORM, query builder, migration, transaction, repository, pooling, and multi-database framework for Helvetium.

Downloads

109

Readme

Helvetium Alps is the database and persistent-storage framework for the Helvetium ecosystem. The npm package is @newfoundcodes/helvetium-alps.

Alps provides a dependency-free core for SQL databases, document databases, and key/value stores. It separates portable APIs from database-specific capabilities instead of forcing PostgreSQL, SQLite, MongoDB, DynamoDB, CouchDB, and Redis into one false abstraction.

Core capabilities

  • SQL query builder for PostgreSQL, MySQL, SQLite, and Microsoft SQL Server.
  • Parameterized raw SQL and identifier-safe tagged templates.
  • Schema/table DSL, indexes, foreign keys, timestamps, soft-delete columns, and dialect type mapping.
  • ORM-style repositories, models, relations, pagination, soft deletes, optimistic locking, and unit-of-work orchestration.
  • Migrations with ordered IDs, batches, status, rollback, and schema editing.
  • Transactions, savepoints, isolation-level options, retries, and query hooks.
  • Generic connection pooling with limits, waiting, acquisition timeouts, idle reaping, health statistics, and graceful close.
  • Multiple named databases and primary/read-replica routing.
  • Document collections with filters, projection, sorting, updates, bulk operations, indexes, and session-bound MongoDB transactions.
  • Key/value operations with TTL, conditional writes, increments, scans, and adapter-defined atomic transaction semantics.
  • First-party adapters around injected PostgreSQL/MySQL/SQLite/MSSQL/MongoDB/DynamoDB/CouchDB/Redis/Valkey clients.
  • Memory document and key/value adapters for tests and local tooling.
  • Query instrumentation hooks, health checks, retry policies, seeders, and shutdown.
  • Helvetium Boot middleware and health-route integration.

Installation

npm install @newfoundcodes/helvetium-alps

Install the native database driver you want separately. Alps intentionally does not choose a PostgreSQL, MySQL, SQLite, MSSQL, MongoDB, DynamoDB, or Redis SDK for you. Adapter functions accept structural clients, so applications can use their preferred driver version.

PostgreSQL

import { Alps, postgres, SelectBuilder, eq } from '@newfoundcodes/helvetium-alps';

// `client` can wrap pg, postgres.js, or another client with query().
const alps = new Alps().register('main', postgres(client));

const query = new SelectBuilder('postgres')
  .select('id', 'email')
  .from('users')
  .where(eq('active', true))
  .limit(25)
  .compile();

const result = await alps.sql('main').query(query);

ORM repository

import { Repository, defineTable, types } from '@newfoundcodes/helvetium-alps';

type User = {
  id: number;
  email: string;
  version: number;
  deletedAt: Date | null;
};

const users = defineTable<User>(
  'users',
  {
    id: types.integer({ primaryKey: true }),
    email: types.string(320, { unique: true }),
    version: types.integer({ default: 0 }),
    deletedAt: types.datetime({ nullable: true }),
  },
  {
    timestamps: true,
    softDeletes: true,
  },
);

const userRepository = new Repository(alps.sql(), users, { versionColumn: 'version' });

Documents

import { MemoryDocumentAdapter } from '@newfoundcodes/helvetium-alps';

const documents = new MemoryDocumentAdapter();
alps.register('documents', documents);

const users = alps.documents('documents').collection<User>('users');

await users.insertOne({ id: 1, email: '[email protected]' });
const active = await users.find({ age: { $gte: 18 } });

Helvetium Boot

import { createApp } from '@newfoundcodes/helvetium-boot';
import { serve } from '@newfoundcodes/helvetium-boot/node';
import { alpsMiddleware, getAlps } from '@newfoundcodes/helvetium-alps/boot';

const app = createApp();
app.use(alpsMiddleware(alps));

app.get('/api/users/:id', async (c) => {
  const db = getAlps(c);
  const user = await db.sql().query('SELECT * FROM users WHERE id = $1', [c.req.param('id')]);
  return c.json(user.rows[0] ?? null);
});

serve({ app, port: 3000 });

License

This project is licensed under the AGPL-3.0-only License.