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

medicine-wheel-data-store

v0.1.3

Published

Shared Redis data-access layer for the Medicine Wheel Developer Suite — connection management, Node/Edge/Ceremony CRUD, session-ceremony linking, and discovery helpers

Readme

medicine-wheel-data-store

Shared Redis data-access layer for the Medicine Wheel Developer Suite — connection management, Node/Edge/Ceremony CRUD, session-ceremony linking, and discovery helpers.

Overview

This package provides a unified Redis persistence layer consumed by mcp-medicine-wheel and other Medicine Wheel services. It wraps the redis client with domain-aware helpers that honour the relational ontology defined in medicine-wheel-ontology-core.

What it provides

| Module | Description | |--------|-------------| | connection | Redis client lifecycle — connect, create, disconnect | | store | Node, Edge, and Ceremony CRUD with direction/type indexing | | session-link | Bi-directional session ↔ ceremony linking | | helpers | Generic Redis primitives — sets, sorted sets, hashes |

Installation

npm install medicine-wheel-data-store

Or link locally:

npm link ../medicine-wheel/src/data-store

Usage

import {
  // Connection
  getRedis, createRedisClient, disconnectRedis,

  // Node CRUD
  createNode, getNode, getNodesByType, getNodesByDirection, getAllNodes, searchNodes,

  // Edge CRUD
  createEdge, getEdge, getRelatedNodes, updateEdgeCeremony,

  // Ceremony CRUD
  logCeremony, getCeremony, getCeremoniesTimeline,
  getCeremoniesByDirection, getCeremoniesByType, getAllCeremonies,

  // Accountability
  getRelationalWeb, trackAccountability, getAccountability,

  // Session-Ceremony Linking
  linkSessionToCeremony, unlinkSessionFromCeremony,
  getSessionsForCeremony, getCeremoniesForSession,

  // Generic Redis Helpers
  getAllFromSet, getHash, getAllHashes, setHash, addToSet, addToSortedSet,
} from 'medicine-wheel-data-store';

Quick start

import { getRedis, createNode, getNodesByDirection } from 'medicine-wheel-data-store';

// Connect (reuses existing client if already connected)
const redis = await getRedis();

// Create a relational node
await createNode({
  id: 'node-1',
  name: 'Vision Quest',
  type: 'ceremony',
  direction: 'East',
});

// Query by direction
const eastNodes = await getNodesByDirection('East');

// Clean up
await disconnectRedis();

Sub-path imports

import { getRedis } from 'medicine-wheel-data-store/connection';
import { createNode, logCeremony } from 'medicine-wheel-data-store/store';
import { linkSessionToCeremony } from 'medicine-wheel-data-store/session-link';
import { getAllFromSet, setHash } from 'medicine-wheel-data-store/helpers';

API Reference

Connection (./connection)

| Function | Description | |----------|-------------| | getRedis() | Return the shared Redis client, connecting if needed | | createRedisClient() | Create a new, independent Redis client | | disconnectRedis() | Gracefully close the shared client |

Node CRUD (./store)

| Function | Description | |----------|-------------| | createNode(node) | Persist a relational node and update indexes | | getNode(id) | Retrieve a node by ID | | getNodesByType(type) | List nodes matching a given type | | getNodesByDirection(dir) | List nodes aligned to a direction | | getAllNodes() | Return every stored node | | searchNodes(query) | Full-text / pattern search across nodes |

Edge CRUD (./store)

| Function | Description | |----------|-------------| | createEdge(edge) | Persist a relational edge | | getEdge(id) | Retrieve an edge by ID | | getRelatedNodes(nodeId) | Discover nodes connected to a given node | | updateEdgeCeremony(edgeId, ctx) | Attach or update ceremony context on an edge |

Ceremony CRUD (./store)

| Function | Description | |----------|-------------| | logCeremony(ceremony) | Record a ceremony event | | getCeremony(id) | Retrieve a ceremony by ID | | getCeremoniesTimeline() | Ceremonies ordered chronologically | | getCeremoniesByDirection(dir) | Ceremonies filtered by direction | | getCeremoniesByType(type) | Ceremonies filtered by type | | getAllCeremonies() | Return every stored ceremony |

Accountability (./store)

| Function | Description | |----------|-------------| | getRelationalWeb(nodeId) | Full relational web around a node | | trackAccountability(record) | Log an accountability event | | getAccountability(id) | Retrieve accountability tracking data |

Session-Ceremony Linking (./session-link)

| Function | Description | |----------|-------------| | linkSessionToCeremony(sessionId, ceremonyId) | Create a bi-directional link | | unlinkSessionFromCeremony(sessionId, ceremonyId) | Remove a bi-directional link | | getSessionsForCeremony(ceremonyId) | Sessions attached to a ceremony | | getCeremoniesForSession(sessionId) | Ceremonies attached to a session |

Generic Redis Helpers (./helpers)

| Function | Description | |----------|-------------| | getAllFromSet(key) | All members of a Redis set | | getHash(key) | All fields of a Redis hash | | getAllHashes(pattern) | Hashes matching a key pattern | | setHash(key, data) | Write fields to a Redis hash | | addToSet(key, member) | Add a member to a Redis set | | addToSortedSet(key, score, member) | Add a member to a sorted set |

Dependencies

| Package | Purpose | |---------|---------| | medicine-wheel-ontology-core | Shared types, schemas, and constants | | redis | Redis client (v4+) |

License

MIT — IAIP Collaborative, Shawinigan, QC