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

@dk122809_org/procurement-chat

v0.1.0

Published

Reusable RFQ and line-item chat package for customer and supplier portals.

Readme

@svstack/procurement-chat

Reusable procurement chat package for RFQ-level and product line-item-level conversations.

What it supports

  • One-to-one chat between customer and supplier
  • Historical chat records stored in PostgreSQL
  • RFQ-level rooms and line-item-level rooms
  • Dynamic side modules such as RFQ info, line item info, customer info, supplier info, and actions
  • Plug-and-play UI that can be embedded in customer portal now and supplier portal later
  • Socket transport supplied by the host application

Room id rules

  • RFQ level: RFQ + supplier_route_code
  • Line item level: RFQ + supplier_route_code + line_number

Use the helper buildProcurementChatRoomId(...) so both portals generate the same value.

Package shape

  • @svstack/procurement-chat/client
    • React UI
    • fetch client helpers
  • @svstack/procurement-chat/server
    • PostgreSQL repository
    • schema bootstrap helper
    • RFQ and line-item context loader
  • @svstack/procurement-chat/shared
    • shared types and room helpers

Recommended integration

Do not pass raw database credentials to the browser. Use the server adapter from this package inside your backend or Next.js route handlers, then pass a loadConversation function to the React component.

Client example

import {
  ProcurementChat,
  createProcurementChatHttpClient,
} from "@svstack/procurement-chat/client";
import { getSocket } from "@/app/utils/socket";

const client = createProcurementChatHttpClient({
  baseUrl: "/api/procurement-chat",
});

<ProcurementChat
  scope="rfq"
  roomId="RFQ001SUP-ROUTE"
  rfqNumber="RFQ001"
  supplierRouteCode="SUP-ROUTE"
  currentUser={{
    id: "[email protected]",
    type: "CUSTOMER",
    name: "Buyer User",
  }}
  socket={getSocket(token)}
  loadConversation={(params) => client.getConversation(params)}
  onPersistMessage={(message) => client.createMessage(message)}
/>;

Server example

import {
  bootstrapProcurementChatSchema,
  createPostgresProcurementChatRepository,
} from "@svstack/procurement-chat/server";

const repository = createPostgresProcurementChatRepository({
  host: process.env.DB_HOST!,
  port: Number(process.env.DB_PORT!),
  user: process.env.DB_USER!,
  password: process.env.DB_PASSWORD!,
  database: process.env.DB_NAME!,
  schema: "bidding_mgmt",
});

await bootstrapProcurementChatSchema(repository);

Database objects created by this package

  • bidding_mgmt.procurement_chat_rooms
  • bidding_mgmt.procurement_chat_messages

These are independent from the legacy rfqcomments table so the package can support room-based chat cleanly for both RFQ and line-item conversations.