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

@gravito/satellite-catalog

v0.1.7

Published

這是 Gravito Galaxy Architecture 中的核心商品目錄插件。它負責管理商品的靜態定義、規格(SKUs)以及無限層級的分類樹。

Readme

🛰️ Gravito Satellite: Catalog

這是 Gravito Galaxy Architecture 中的核心商品目錄插件。它負責管理商品的靜態定義、規格(SKUs)以及無限層級的分類樹。

🌟 核心功能

  • 📦 結構化商品模型: 區分商品主體 (Product) 與 規格變體 (Variants/SKUs)。
  • 🌲 智慧型分類樹: 使用路徑列 (Materialized Path) 實作,支援無限層級分類,且在移動分類時自動同步所有子孫路徑。
  • 🖼️ 媒體整合: 完美整合 @gravito/nebula,自動將存儲 Key 解析為完整的 CDN/本地 URL。
  • 🌐 多語系支援: 名稱與描述預設支援 JSON 格式的 i18n 儲存。
  • 🚀 高性能查詢: 針對大數據量設計,利用索引路徑進行子分類商品的快速檢索。

🛠️ API 接口

| 方法 | 路徑 | 說明 | | :--- | :--- | :--- | | GET | /api/catalog/products | 獲取商品列表 (含 SKU) | | GET | /api/catalog/products/:id | 獲取單一商品詳情 | | POST | /api/catalog/products | 建立商品與多個 SKU (原子化) | | GET | /api/catalog/categories | 獲取完整的樹狀分類結構 |

🏗️ 領域驅動設計 (DDD) 結構

  • Domain: 包含 Category, Product, Variant 實體與業務規則。
  • Application: 提供 CreateProductUpdateCategory (含路徑同步) UseCases。
  • Infrastructure: 基於 Atlas 的倉儲實現,支援事務保護。
  • Interface: 基於 Photon 的 RESTful 控制器。

⚙️ 安裝與註冊

在您的 PlanetCore 中註冊:

import { CatalogServiceProvider } from '@gravito/satellite-catalog';

await core.use(new CatalogServiceProvider());

🧪 驗證

執行全系統校閱測試:

cd satellites/catalog
bun tests/grand-review.ts

Created by Gravito Core Team.