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

@xmjsoft/core

v1.0.1

Published

Framework-agnostic Vectora image embedding, storage, DashVector indexing and similarity-search core.

Readme

@vectora/core:唯一共享业务库

@vectora/core 是 Vectora 的唯一业务实现来源。当前项目的 Express/tRPC 服务直接调用此库;NestJS 适配层以独立交付包形式提供,也只调用此库,不再复制图片向量、DashVector 或图片入库逻辑。

核心职责

| 文件 | 唯一实现内容 | | --- | --- | | src/image-embedding.ts | Python 子进程协议、图片格式/大小校验、解释器发现与向量 JSON 解析 | | python/image_embedding.py | ResNet-50 与 DINOv2 ViT-S/14 的真实模型推理代码 | | src/dashvector.ts | Collection 管理、Float 向量序列化、余弦距离转换、阈值过滤与索引重试 | | src/local-image-storage.ts | 本地原图命名、写入与公开 URL 生成 | | src/vectora-core-service.ts | extract、index、search 的统一业务编排 |

当前项目如何复用

当前项目中的 server/imageEmbedding.ts、server/dashvector.ts、server/vectoraService.ts 都是轻量适配层,分别将当前环境变量、图片存储和 tRPC 路由接入 @vectora/core。因此 React 页面调用 embedding.extract、embedding.save、embedding.search 时,实际运行的正是本目录中的核心实现。

在 NestJS 项目中复用

将整个 packages/vectora-core 复制到目标 NestJS 项目的相同目录,然后构建并安装为本地依赖:

# 在目标项目根目录执行
npx tsc -p packages/vectora-core/tsconfig.build.json
npm install ./packages/vectora-core

接着从单独交付的 Vectora-nestjs-shared-library.zip 复制 src/vectora 至目标项目。NestJS 模块会导入 @vectora/core,并通过 VectoraService 对外提供完全相同的 extract()、index()、search() 方法。

任何模型策略、DashVector 评分或图片存储逻辑变更都应修改本包,而不是改 Express 或 NestJS 适配层。这样两种项目会在下次构建后自动使用同一套行为。