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

@oxlayer/backend

v0.1.4

Published

<p align="center"> <img src="docs/website/img/logo.png" alt="OxLayer Logo" width="200" /> </p>

Downloads

195

Readme

OxLayer

Overview

OxLayer is a comprehensive framework for building multi-tenant SaaS applications. It provides:

  • Foundation Kits: Domain-driven design primitives, HTTP handling, and testing utilities
  • Capabilities: Pluggable interfaces for authentication, events, caching, and more
  • Adapters: Production-ready implementations for databases, queues, storage, and search

Open Source vs Proprietary

This repository follows a hybrid open-source model:

Open Source (Apache 2.0) ✅

  • Foundation Kits: All infrastructure packages (foundation/)

    • Domain Kit - Entities, value objects, repositories
    • App Kit - Use cases, Result/Either types
    • HTTP Kit - Controllers, middleware
    • Persistence Kit - Repository patterns
    • Testing Kit - Builders, mocks, test helpers
  • Base Adapters: Standard database, storage, and messaging adapters (capabilities/adapters/)

    • PostgreSQL, MongoDB, Redis, ClickHouse, InfluxDB
    • RabbitMQ, BullMQ, SQS, MQTT
    • AWS S3, Qdrant, Quickwit

Proprietary (Enterprise License) ❌

  • Tenancy Infrastructure: Multi-tenant resolution and isolation (proprietary/)
  • Tenancy Adapters: Database, storage, and messaging adapters with automatic tenant isolation
  • Advanced Features: BullMQ Scheduler, tenant-scoped credentials, dynamic RLS

See proprietary/README.md for details on enterprise features.

Installation

# Foundation kits (Open Source)
pnpm add @oxlayer/foundation-domain-kit
pnpm add @oxlayer/foundation-app-kit
pnpm add @oxlayer/foundation-http-kit

# Base adapters (Open Source)
pnpm add @oxlayer/adapters-postgres
pnpm add @oxlayer/adapters-redis
pnpm add @oxlayer/adapters-rabbitmq

# Tenancy adapters (Proprietary)
pnpm add @oxlayer/pro-adapters-postgres-tenancy
pnpm add @oxlayer/pro-adapters-redis-tenancy
pnpm add @oxlayer/pro-tenancy

Quick Start

Open Source (Basic Adapters)

import { Todo } from './domain/entities/todo';
import { CreateTodoUseCase } from './use-cases/create-todo';
import { TodoController } from './controllers/todos.controller';
import { createPostgresClient } from '@oxlayer/adapters-postgres';

// Setup PostgreSQL connection
const db = createPostgresClient({
  host: process.env.DB_HOST,
  port: 5432,
  database: 'myapp',
  user: 'postgres',
  password: 'secret',
});

// Create use case
const createTodo = new CreateTodoUseCase(repository, eventBus);

// Setup controller
const controller = new TodoController(createTodo, getTodos, updateTodo, deleteTodo);

// Register with Hono
app.route('/api/todos', controller.routes());

Enterprise (Multi-Tenancy with RLS)

import { createTenantResolver } from '@oxlayer/pro-tenancy';
import { createTenancyAwarePostgres } from '@oxlayer/pro-adapters-postgres-tenancy';

// Create tenant resolver
const tenantResolver = createTenantResolver({
  controlDb,
  cache: redis,
  secretService: bitwarden,
});

// Create tenancy-aware PostgreSQL with RLS
const postgres = await createTenancyAwarePostgres({
  tenantResolver,
  sharedDb,
  rlsConfig: {
    schema: 'public',
    tenantColumn: 'tenant_id',
    addColumnIfMissing: true,
  },
});

// Enable RLS on all tables (adds tenant_id column automatically)
await postgres.enableRLS();

// Queries are automatically filtered by tenant_id
await postgres.query('SELECT * FROM todos'); // Automatically adds WHERE tenant_id = ?

Packages

Foundation Kits (Apache 2.0)

| Package | Description | |---------|-------------| | @oxlayer/foundation-domain-kit | Entities, value objects, repositories, domain errors | | @oxlayer/foundation-app-kit | Use cases, Result/Either types, DTOs | | @oxlayer/foundation-http-kit | Controllers, middleware, validation | | @oxlayer/foundation-persistence-kit | Repository patterns, cursor pagination | | @oxlayer/foundation-testing-kit | Builders, mocks, test helpers |

Open Source Adapters (Apache 2.0)

Database

Messaging

Storage & Search

Proprietary Adapters (Enterprise License)

Tenancy variants with automatic tenant isolation:

  • Database: @oxlayer/pro-adapters-postgres-tenancy, *-mongo-tenancy, *-redis-tenancy, etc.
  • Messaging: @oxlayer/pro-adapters-rabbitmq-tenancy, *-sqs-tenancy, *-mqtt-tenancy
  • Storage: @oxlayer/pro-adapters-s3-tenancy, *-qdrant-tenancy, *-quickwit-tenancy
  • Scheduler: @oxlayer/pro-adapters-bullmq-scheduler
  • Core: @oxlayer/pro-tenancy

See proprietary/README.md for full list and features.

Documentation

Full documentation is available at https://docs.oxlayer.com

To build the documentation locally:

cd docs/website
pnpm install
pnpm start

Examples

See the examples/ directory for complete applications:

  • Todo App: Full CRUD with Keycloak auth, PostgreSQL, Redis, RabbitMQ
  • Multi-Tenant: Demonstrates tenant isolation with RLS
cd examples/todo-app
pnpm install
pnpm dev

Contributing

We welcome contributions to the open-source packages! Please see CONTRIBUTING.md for guidelines.

Development

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck

License

Licensing Summary

| Component | License | Location | |-----------|---------|----------| | Foundation Kits | Apache 2.0 | foundation/ | | Base Adapters | Apache 2.0 | capabilities/adapters/ | | Tenancy Adapters | Proprietary | proprietary/adapters/ | | Tenancy Core | Proprietary | proprietary/tenancy/ |

Support

Roadmap

  • [ ] Additional search adapters (Meilisearch, OpenSearch)
  • [ ] GraphQL toolkit
  • [ ] Event sourcing patterns
  • [ ] CQRS implementation
  • [ ] Advanced monitoring & observability

Made with ❤️ by the OxLayer team