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

gxcmcp

v1.1.0

Published

轻量级竞品分析系统 - 纯内存处理,无需数据库依赖

Readme

竞品分析系统 (GXCMCP)

NPM Version License Downloads

一个基于 Node.js 开发的轻量级竞品分析系统,采用纯内存处理模式,无需数据库依赖。用于获取全网竞品信息,并将客户端输入的产品信息与全网竞品进行对比分析,输出产品的对比情况以及后期发展规划。

版本 1.1.0 重要变更

  • 移除数据库依赖:现在系统完全基于内存处理,不再需要 SQLite 数据库
  • 简化架构:纯"输入-处理-输出"工作流,启动更快,资源占用更低
  • 更适合轻量级使用场景:特别适合单次分析任务和命令行使用

功能特点

  • 自动获取全网竞品信息
  • 产品对比分析
  • 生成发展建议和规划
  • RESTful API 接口设计
  • 可扩展的架构
  • 完整的测试套件
  • 命令行工具支持

技术栈

  • Node.js
  • Express.js
  • Axios & Cheerio (数据抓取)
  • Puppeteer (高级网页抓取)
  • Jest (测试框架)

安装

npm install gxcmcp

快速开始

作为独立服务运行

  1. 克隆项目到本地:

    git clone <repository-url>
  2. 进入项目目录:

    cd gxcmcp
  3. 安装依赖:

    npm install
  4. 启动服务:

    npm start

    或者开发模式启动:

    npm run dev

作为模块使用

const gxcmcp = require('gxcmcp');

// 使用竞品分析功能
const analysisResult = await gxcmcp.analyzeProduct({
  name: '产品名称',
  description: '产品描述',
  category: '产品类别',
  price: 299.00,
  features: ['功能1', '功能2', '功能3'],
  rating: 4.5
});

API 接口文档

1. 产品分析接口

  • URL: /api/products/analyze

  • 方法: POST

  • 描述: 分析指定产品并与竞品进行对比

  • 请求体:

    {
      "product": {
        "name": "产品名称",
        "description": "产品描述",
        "category": "产品类别",
        "price": 299.00,
        "features": ["功能1", "功能2", "功能3"],
        "rating": 4.5
      }
    }
  • 响应:

    {
      "success": true,
      "data": {
        "product": {},
        "competitors": [],
        "comparison": [],
        "developmentPlan": {}
      }
    }

2. 获取竞品数据接口

  • URL: /api/products/competitors/:productId
  • 方法: GET
  • 描述: 获取特定产品的竞品数据

项目结构

gxcmcp/
├── __tests__/          # 测试文件
├── src/
│   ├── controllers/     # 控制器层
│   ├── models/          # 数据模型
│   ├── routes/          # 路由定义
│   ├── services/        # 业务逻辑层
│   └── utils/           # 工具函数
├── app.js              # 应用入口
├── package.json        # 项目配置
└── README.md           # 项目说明

开发指南

  1. 控制器:处理 HTTP 请求和响应
  2. 服务层:实现具体的业务逻辑
  3. 模型层:定义数据结构和验证规则

测试

运行测试套件:

npm test

运行监视模式测试:

npm run test:watch

扩展建议

  1. 集成真实的数据源和爬虫功能
  2. 添加 MongoDB 或 PostgreSQL 支持(如果需要持久化)
  3. 实现用户认证和权限管理
  4. 添加定时任务定期更新竞品数据
  5. 实现数据可视化功能

贡献

欢迎提交 Issue 和 Pull Request 来帮助改进这个项目。

许可证

MIT