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

@primocaredentgroup/listini

v0.6.0

Published

Convex component for managing dental service price lists and catalogs

Readme

@primocaredentgroup/listini

Convex component for managing dental service price lists and catalogs.

Overview

This component provides a complete system for managing:

  • Service categories (3-level hierarchy)
  • Dental services/procedures
  • Price lists
  • List rows with pricing
  • Bundles/packages

Installation

npm install @primocaredentgroup/listini

Setup

1. Configure your Convex app

In your convex/convex.config.ts:

import { defineApp } from "convex/server";
import listini from "@primocaredentgroup/listini/convex.config.js";

const app = defineApp();
app.use(listini);

export default app;

2. Environment Variables

Create a .env.local file:

CONVEX_DEPLOYMENT=your-deployment-url

Database Schema

Tables

  1. service_category_parents - Top-level areas (e.g., "Odontoiatria")
  2. service_category_groups - Sub-areas (e.g., "Chirurgia Orale")
  3. service_categories - Actual categories (e.g., "Conservativa")
  4. services - Dental procedures
  5. lists - Price lists
  6. list_rows - Price entries
  7. bundles - Service packages

Service Applications

Services can have different application types:

  • tooth - Single tooth
  • arch - Full arch
  • sextant - Sextant
  • hemiarch - Hemiarch
  • full_mouth - Full mouth
  • other - Not odontogram-related

List Types

  • standard - Base clinic list
  • insurance - Insurance pricing
  • clinical - Internal clinical list
  • healthcare - Public healthcare/SSN
  • aesthetic_medicine - Aesthetic medicine

API Functions

Service Category Parents

// Queries
ctx.runQuery(components.listini.serviceCategoryParents.getAll)
ctx.runQuery(components.listini.serviceCategoryParents.getById, { id })

// Mutations
ctx.runMutation(components.listini.serviceCategoryParents.create, { name, order })
ctx.runMutation(components.listini.serviceCategoryParents.update, { id, name, order })
ctx.runMutation(components.listini.serviceCategoryParents.remove, { id })

Service Category Groups

// Queries
ctx.runQuery(components.listini.serviceCategoryGroups.getAll)
ctx.runQuery(components.listini.serviceCategoryGroups.getById, { id })

// Mutations
ctx.runMutation(components.listini.serviceCategoryGroups.create, { name, order })
ctx.runMutation(components.listini.serviceCategoryGroups.update, { id, name, order })
ctx.runMutation(components.listini.serviceCategoryGroups.remove, { id })

Service Categories

// Queries
ctx.runQuery(components.listini.serviceCategories.getAll)
ctx.runQuery(components.listini.serviceCategories.getById, { id })
ctx.runQuery(components.listini.serviceCategories.getByParent, { parentId })
ctx.runQuery(components.listini.serviceCategories.getByGroup, { groupId })

// Mutations
ctx.runMutation(components.listini.serviceCategories.create, { 
  name, 
  serviceCategoryParentId, 
  serviceCategoryGroupId, 
  order 
})
ctx.runMutation(components.listini.serviceCategories.update, { 
  id, 
  name, 
  serviceCategoryParentId, 
  serviceCategoryGroupId, 
  order 
})
ctx.runMutation(components.listini.serviceCategories.remove, { id })

Services

// Queries
ctx.runQuery(components.listini.services.getAll)
ctx.runQuery(components.listini.services.getById, { id })
ctx.runQuery(components.listini.services.getByCategory, { categoryId })
ctx.runQuery(components.listini.services.getActive)

// Mutations
ctx.runMutation(components.listini.services.create, {
  code,
  name,
  categoryId,
  application: "tooth" | "arch" | "sextant" | "hemiarch" | "full_mouth" | "other",
  defaultDuration
})
ctx.runMutation(components.listini.services.update, {
  id,
  code,
  name,
  categoryId,
  application,
  defaultDuration,
  isActive
})
ctx.runMutation(components.listini.services.remove, { id })

Lists

// Queries
ctx.runQuery(components.listini.lists.getAll)
ctx.runQuery(components.listini.lists.getById, { id })
ctx.runQuery(components.listini.lists.getByType, { type })
ctx.runQuery(components.listini.lists.getByChannel, { channel })
ctx.runQuery(components.listini.lists.getByTypeAndChannel, { type, channel })
ctx.runQuery(components.listini.lists.getEnabled)

// Mutations
ctx.runMutation(components.listini.lists.create, {
  code,
  name,
  type,
  channel,
  fallbackDiscount?: number,
  employeeDiscount?: number,
  maxExtraDiscount?: number,
  enabled?: boolean,
  isCarePlanDiscountable?: boolean,
  insuranceRecipe?: boolean
})
ctx.runMutation(components.listini.lists.update, { id, ...fields })
ctx.runMutation(components.listini.lists.remove, { id })

Clinic availability and the default price list are host-owned concerns. Store them in the host clinic-to-list relationship, not in this component.

List Rows

// Queries
ctx.runQuery(components.listini.listRows.getAll)
ctx.runQuery(components.listini.listRows.getById, { id })
ctx.runQuery(components.listini.listRows.getByList, { listId })
ctx.runQuery(components.listini.listRows.getByBundle, { bundleId })
ctx.runQuery(components.listini.listRows.getActiveByList, { listId })

// Mutations
ctx.runMutation(components.listini.listRows.create, {
  listId,
  serviceIds: string[],
  name?: string,
  listPrice: number,
  cost?: number,
  maxDiscount?: number,
  fallbackDiscount?: number,
  bundleId?: string,
  isBundleLock?: boolean,
  duration: number
})
ctx.runMutation(components.listini.listRows.update, { id, ...fields })
ctx.runMutation(components.listini.listRows.remove, { id })

Bundles

// Queries
ctx.runQuery(components.listini.bundles.getAll)
ctx.runQuery(components.listini.bundles.getById, { id })
ctx.runQuery(components.listini.bundles.getActive)

// Mutations
ctx.runMutation(components.listini.bundles.create, { name })
ctx.runMutation(components.listini.bundles.update, { id, name, isActive })
ctx.runMutation(components.listini.bundles.remove, { id })

Example App

Check out the example/ directory for a complete Vite + React demo application.

cd example
npm install
npm run dev

Development

# Install dependencies
npm install

# Generate Convex code
npm run codegen

# Type check
npm run typecheck

License

MIT