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

@veap/settings

v0.1.6

Published

Application settings management, caching, and persistence for Veap

Downloads

501

Readme

CI Release Version

@veap/settings

Key-value application settings management, caching, and persistence engine for Veap applications.

Overview

@veap/settings provides a dynamic configuration and settings system for applications needing runtime-tunable options (site title, maintenance mode, features flags, integrations). It bridges database persistence powered by @veap/database with in-memory caching to minimize database query overhead.

Features

  • Typed key-value storage: Store strings, numbers, booleans, and complex JSON structures under unique keys.
  • In-memory cache layer: Fast cached reads with automated cache invalidation on update or delete operations.
  • Active Record persistence: Backed by the Setting model with automatic schema migrations.
  • Clean Architecture & IoC: Follows repository pattern with SETTINGS_REPOSITORY and integrates cleanly via SettingsServiceProvider.
  • Default values & fallback: Specify fallback values when keys have not yet been configured in the database.

Installation

# Using bun
bun add @veap/settings @veap/kernel @veap/database

# Using pnpm
pnpm add @veap/settings @veap/kernel @veap/database

# Using npm
npm install @veap/settings @veap/kernel @veap/database

Usage

Register in Application Builder

Include SettingsServiceProvider in your application composition root:

import { Application } from "@veap/kernel";
import { DatabaseServiceProvider } from "@veap/database";
import { SettingsServiceProvider } from "@veap/settings";

export const app = Application.configure()
  .use(DatabaseServiceProvider)
  .use(
    new SettingsServiceProvider(undefined, {
      autoMigrate: true, // Automatically applies settings table migrations
    }),
  )
  .create();

Accessing Settings via IoC

Resolve SettingsService from the container in your services or server actions:

import { app } from "@veap/kernel";
import { SettingsService } from "@veap/settings";

// Read a setting with a typed fallback
const settings = await app(SettingsService);
const siteName = await settings.get("site.name", "Default Site Name");
const maintenance = await settings.get<boolean>("system.maintenance", false);

// Save or update a setting
await settings.set("site.name", "My Enterprise Portal");
await settings.set("features.comments_enabled", true);

// Delete a setting
await settings.delete("obsolete_key");

Direct Model Access

Interact directly with the Active Record model from @veap/settings/models:

import { Setting } from "@veap/settings/models";

// Query all public settings
const allSettings = await Setting.query().orderBy("key", "asc").get();

Subpath Exports

| Export Path | Content | | --------------------------- | ----------------------------------------------------------------------- | | @veap/settings | SettingsService, SettingsServiceProvider, and repository interfaces | | @veap/settings/models | Active Record Setting model | | @veap/settings/migrations | Knex migrations for the settings schema |

Documentation

For full guides and settings caching options, visit:

License

MIT