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

@zari-upmydata/b2b-schemas

v1.0.17

Published

Shared MongoDB schemas for B2B profiles and companies

Readme

B2B Schemas

A shared package containing MongoDB schemas for B2B profiles and companies using NestJS and Mongoose.

Publishing the Package

To publish updates to this package:

  • Make your code changes in a feature branch
  • Create a pull request to the main branch
  • After the PR is approved and merged into main:
  • Checkout the main branch and pull the latest changes
  • Manually update the version in package.json following semantic versioning
  • Run npm publish --access public to publish the updated package

Installation

npm install @zari-upmydata/b2b-schemas

Usage

Company Schema

import { Company, CompanySchema } from '@zari-upmydata/b2b-schemas';

// In your NestJS module
@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Company.name, schema: CompanySchema },
    ]),
  ],
})
export class YourModule {}

// In your service
export class YourService {
  constructor(
    @InjectModel(Company.name)
    private readonly companyModel: Model<Company>,
  ) {}

  // Use the model in your service methods
  async findCompany(name: string): Promise<Company> {
    return this.companyModel.findOne({ name }).exec();
  }
}

Available Schemas

Company Schema

The Company schema includes fields for:

  • Basic company information (name, domain, description, etc.)
  • Address information
  • Contact information (email, phone, social media)
  • Legal information
  • Industry classification
  • And more

HSCode Schema

The Harmonized System (HS) Code schema includes:

  • code: Unique identifier for the HS code
  • description: Detailed description of the product category
  • sitcCodes: Array of references to related SITC codes
  • naicsCodes: Array of references to related NAICS codes
  • parentCode: Parent HS code (optional)
  • level: Hierarchical level in the HS classification

SITC Schema

The Standard International Trade Classification (SITC) schema includes:

  • code: Unique identifier for the SITC code
  • description: Description of the product category
  • hsCodes: Array of references to related HS codes
  • naicsCodes: Array of references to related NAICS codes
  • parentCode: Parent SITC code (optional)
  • level: Hierarchical level in the SITC classification

NAICS Schema

The North American Industry Classification System (NAICS) schema includes:

  • code: Unique identifier for the NAICS code
  • description: Industry description
  • hsCodes: Array of references to related HS codes
  • sitcCodes: Array of references to related SITC codes
  • title: Short title of the industry
  • long_title: Detailed title of the industry
  • parentCode: Parent NAICS code (optional)
  • level: Hierarchical level in the NAICS classification
  • sicCodes: Array of related SIC codes

Schema Relationships

The schemas are interconnected through reference fields:

  • HSCode ↔ SITC: Bidirectional relationship through sitcCodes and hsCodes
  • HSCode ↔ NAICS: Bidirectional relationship through naicsCodes and hsCodes
  • SITC ↔ NAICS: Bidirectional relationship through naicsCodes and sitcCodes

Contributing

Please submit issues and pull requests for any improvements you'd like to make.

License

MIT