senclaw/warehouse

app Quản lý kho hàng cục bộ 100%: danh mục sản phẩm (SKU, đơn vị, giá vốn/giá bán, tồn tối thiểu), nhiều kho/chi nhánh, phiếu nhập – xuất – chuyển kho – điều chỉnh kiểm kê (mã NK-/XK-/CK-/DC- tự sinh, nhiều dòng hàng, chặn xuất quá tồn), thẻ kho với số dư luỹ kế, giá vốn bình quân gia quyền, báo cáo nhập-xuất theo tháng, cảnh báo hàng dưới tồn tối thiểu, đối tác nhà cung cấp/khách hàng, phân tích hiệu suất sản phẩm (tự động phân loại tiềm năng / ổn định / bán chậm / tồn đọng không bán được theo tốc độ bán, ngày tồn còn lại, biên lãi) và AI phân tích tồn kho + đánh giá danh mục qua bridge SenClaw. App chỉ GHI SỔ kho — không kết nối sàn TMĐT, không tạo đơn hàng thật.

Install

senclaw app install senclaw/warehouse

Verifies sha512 and SenClaw’s signature before writing to disk.

Documentation

SenClaw Warehouse — Kho Hàng

Space App quản lý kho hàng, dữ liệu 100% local (SQLite tại ~/.senclaw/apps/warehouse/warehouse.db). App chỉ ghi sổ kho — không kết nối sàn TMĐT, không tạo đơn hàng thật.

Tính năng

  • Danh mục sản phẩm — SKU (duy nhất), đơn vị, nhóm hàng, barcode, giá vốn tham khảo, giá bán, tồn tối thiểu (cảnh báo sắp hết hàng), ngừng bán bằng status=inactive.
  • Nhiều kho / chi nhánh — mỗi kho có giá trị tồn và số mặt hàng riêng; kho mặc định "Kho chính" được tạo ở lần chạy đầu.
  • Phiếu kho (một phiếu nhiều dòng hàng, mã tự sinh):
  • receipt NK- — nhập kho, đơn giá là giá vốn nhập
  • issue XK- — xuất kho, đơn giá là giá bán; chặn xuất quá tồn
  • transfer CK- — chuyển kho (trừ kho đi, cộng kho đến)
  • adjust DC- — điều chỉnh sau kiểm kê, số lượng là delta có dấu
  • Xoá phiếu bị từ chối nếu làm tồn âm (giữ sổ nhất quán).
  • Tồn kho suy ra từ phiếu — không lưu cột tồn, sổ không bao giờ lệch chứng từ.
  • Giá vốn bình quân gia quyền theo phiếu nhập (fallback giá vốn khai báo).
  • Thẻ kho — ledger từng sản phẩm với số dư luỹ kế, theo từng kho hoặc toàn công ty.
  • Báo cáo nhập-xuất theo tháng + dashboard (giá trị tồn, hàng sắp hết/hết, nhập-xuất 30 ngày, top sản phẩm, phiếu gần đây).
  • Phân tích hiệu suất sản phẩm (/api/insight/products, tab "Phân tích SP") — phân loại tự động theo cửa sổ N ngày: potential (tiềm năng — bán tốt, tồn chỉ đủ ≤45 ngày), steady, slow (tồn đủ >180 ngày), dead (tồn đọng — không bán được đơn nào), idle; kèm tốc độ bán/30 ngày, ngày tồn còn lại, biên lãi, sell-through, lần bán cuối, giá trị vốn chôn trong hàng tồn đọng.
  • AI phân tích qua bridge SenClaw (llm.request) — không gọi thẳng provider nào: wh_analyze (tồn kho tổng quan) + wh_analyze_products (đánh giá danh mục: nên nhập thêm gì, xả hàng gì).

Chạy dev

cargo run -p warehouse                  # backend :4630 (đổi bằng PORT)
cd apps/warehouse/web && npm run dev    # Vite dev, proxy /api → :4630

Test: cargo test -p warehouse (23 test: stock logic, phiếu, thẻ kho, phân loại hiệu suất sản phẩm, MCP schema).

Đóng gói

apps/warehouse/scripts/pack.sh          # → apps/warehouse/warehouse-app.zip

MCP

Server warehouse-mcp (HTTP + SSE tại /api/mcp/sse), 23 tool prefix wh_ (mcp__warehouse-mcp__wh_*): wh_status, wh_dashboard, wh_product_* (4), wh_warehouse_* (3), wh_partner_* (2), wh_move_* (4), wh_stock_onhand, wh_stock_card, wh_report_inout, wh_low_stock, wh_product_insight, wh_analyze, wh_analyze_products, wh_activity. Mọi tool gọi chung api::*_value với REST nên agent và UI luôn thấy cùng số liệu.

Declared permissions

{
  "network": [
    "127.0.0.1"
  ],
  "exec": [
    "./warehouse"
  ]
}

Declared by the publisher, not enforced by SenClaw. The CLI compares this against what you already have installed and asks before anything widens.

Published by

@senclawtrusted
benji
44 packages · 0 downloads · member since 2026-07 · GitHub since 2015-06

The checkmark means SenClaw confirmed who this publisher is. It says nothing about whether their packages are safe.

About

Owner@senclaw
Latest1.0.0
Downloads (30d)0
Repositorygithub.com/NortonBen/senclaw-app

Versions

VersionTagsArtifactsPublished
1.0.0latestdarwin-arm64, linux-x64, win32-x642026-08-07

Artifacts · 1.0.0

PlatformFormatSignatureFileSize
darwin-arm64zipunsignedwarehouse-app.zip2976 KB
linux-x64zipunsignedwarehouse-app.zip3323 KB
win32-x64zipunsignedwarehouse-app.zip3229 KB

Unsigned builds require sign-in to download and are not distributed to the auto-updater, because unsigned executables from a new domain get flagged as unsafe. Sign and notarize (macOS) or Authenticode-sign (Windows) to distribute publicly.

Auto-update endpoints

For a Tauri app — add to tauri.conf.json:

"endpoints": ["https://senclaw.bacnd.com/api/v1/updates/tauri/senclaw/warehouse/{{target}}/{{arch}}/{{current_version}}"]

For an electron-updater app — generic provider URL:

https://senclaw.bacnd.com/updates/senclaw/warehouse/stable

Only signed/notarized artifacts are offered as updates — a client fetches the update without credentials, and unsigned binaries are not publicly downloadable.

Something wrong with this package?

Report this package

Report this package

Tell us what is wrong and a moderator will look at it. Be specific — a report that names a version and a behaviour can be checked in minutes; one that says “looks sketchy” cannot be acted on at all.

Not about this package? Contact us instead. What happens to a report is described in reporting and moderation.

API: GET https://senclaw.bacnd.com/api/v1/packages/senclaw/warehouse