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

cloudisk

v1.0.3

Published

Samba 文件共享管理平台

Downloads

480

Readme

Cloudisk

Samba 文件共享管理平台 — 基于 Node.js + Vue 3 的 Web 管理系统。

功能

| 模块 | 说明 | |------|------| | 用户管理 | 创建/删除/禁用 Samba 用户,自动配置系统用户、目录、配额 | | 服务管理 | Samba 安装/卸载/启停,自动检测包管理器和服务名称 | | 磁盘管理 | 磁盘列表、格式化 (XFS/EXT4)、挂载/卸载 | | 共享目录 | 共享目录创建/删除、权限管理 | | 配额管理 | XFS 磁盘配额,软/硬上限独立控制 | | 系统日志 | 实时日志流 (SSE),支持级别过滤 | | 系统监控 | 存储用量、服务健康检查 |

快速开始

npm 安装(推荐)

npm install -g cloudisk
cloudisk init
cloudisk server start
# 浏览器访问 http://your-ip:9528

源码运行

git clone https://git.caiim.com/root/cloudisk-server.git
cd cloudisk-server

# 安装依赖
cd frontend && npm install && npm run build && cd ..
cd backend && npm install && npx prisma generate && npx tsc

# 启动服务
node dist/index.js

# (可选) 注册为全局命令
npm link
cloudisk server start

首次访问进入初始化向导,设置管理员账户和站点标题。

命令行

服务管理

cloudisk server start              # 启动服务
  -p, --port <端口>                # 默认 9528
  -c, --config <配置文件>          # 默认 /etc/cloudisk/.env
  -d, --db <数据库路径>
  -l, --log-level <级别>          # debug/info/warn/error

cloudisk server install-service    # 注册 systemd 服务

用户管理

cloudisk user list                 # 列出用户 (-j JSON 格式)
cloudisk user add -u <用户名> -p <密码> [-q <配额GB>]
cloudisk user delete -u <用户名> [--force]
cloudisk user change-password -u <用户名> -p <新密码>
cloudisk user set-quota -u <用户名> -q <配额GB>

其他命令

cloudisk status                    # 查看系统状态
cloudisk admin reset-password      # 重置管理员密码 (-u 用户名 -p 新密码)
cloudisk backup [-o <输出路径>]    # 备份数据库
cloudisk restore -f <备份文件>     # 恢复数据库 [--force]
cloudisk init                      # 初始化配置目录
cloudisk migrate                   # 从 account.json 迁移用户

所有命令支持 -h 查看帮助。

架构

Handler → Service → Repository / Operator → 系统 / 数据库
  • Handler: HTTP 请求处理,参数解析,响应返回
  • Service: 业务逻辑编排,依赖接口(SOLID 依赖倒置)
  • Repository: 数据库操作(Prisma + SQLite)
  • Operator: 系统命令执行(useradd、smbpasswd、mount 等)

技术栈

| 层 | 技术 | |----|------| | 前端 | Vue 3 + Element Plus + Pinia + Vue Router | | 后端 | Node.js + TypeScript + Express 5 | | 数据库 | SQLite (Prisma ORM) | | 认证 | JWT | | 日志 | Pino (stdout + 内存缓冲 + 文件) | | 实时通信 | SSE (Server-Sent Events) |

数据目录

/etc/cloudisk/
├── .env                    # 环境配置
├── data/cloud_storage.db   # SQLite 数据库
└── logs/app.log            # 应用日志

环境变量

| 变量 | 默认值 | 说明 | |------|--------|------| | PORT | 9528 | 服务端口 | | DATABASE_URL | file:/etc/cloudisk/data/cloud_storage.db | 数据库路径 | | JWT_EXPIRES_IN | 24h | Token 过期时间 | | SHARE_BASE | /share | 共享目录根路径 | | LOG_LEVEL | info | 日志级别 |

系统要求

  • Node.js >= 18
  • Linux (需要 root 权限)
  • Samba (可选,服务管理页面可自动安装)

许可证

MIT