diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 135424b..d5a7141 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -36,7 +36,8 @@ export default withMermaid( { text: '快速开始', link: '/guide/getting-started' }, { text: '许可证结构与验证(客户端要点)', link: '/guide/license-token-structure' }, { text: '商业价值', link: '/guide/business_value' }, - { text: '接口文档', link: '/guide/api' } + { text: '接口文档', link: '/guide/api' }, + { text: '社区发展策略', link: '/guide/community_strategy' } ] } ] @@ -60,7 +61,8 @@ export default withMermaid( { text: 'Getting Started', link: '/en/guide/getting-started' }, { text: 'Business Value', link: '/en/guide/business_value' }, { text: 'License Structure & Validation', link: '/en/guide/license-token-structure' }, - { text: 'API Reference', link: '/en/guide/api' } + { text: 'API Reference', link: '/en/guide/api' }, + { text: 'Community Strategy', link: '/en/guide/community_strategy' } ] } ] diff --git a/docs/en/guide/community_strategy.md b/docs/en/guide/community_strategy.md new file mode 100644 index 0000000..6aa07e8 --- /dev/null +++ b/docs/en/guide/community_strategy.md @@ -0,0 +1,48 @@ +# Community Development Strategy + +## 1. Vision & Mission + +We are committed to making **License Manager** the industry-standard infrastructure for software licensing management. Our mission is to lower the barriers to software distribution and copyright protection through open source, while ensuring enterprise-grade security and reliability. + +We believe that reliable infrastructure software must withstand extensive community validation and requires long-term investment from a professional team. + +## 2. Development Philosophy: Core-Led, Community-Driven + +To ensure project sustainability and technical architecture rigor, we adopt a **"Core-Led, Community-Driven"** governance model: + +* **Core Team**: Acts as the project's "gatekeepers," responsible for setting the technical roadmap, controlling architectural design, reviewing core code, and maintaining system security. We commit to keeping core functionality open source and neutral. +* **Community Contributors**: Serve as the project's "radar" and "accelerator." We rely on the community to discover real-world pain points, report bugs, contribute multi-language SDKs, improve documentation, and share best practices. + +## 3. Sustainable Development Model + +Open source is not a whim, but a marathon. To ensure License Manager can be maintained long-term, we have established a transparent sustainable development mechanism: + +### 3.1 Symbiosis of Business and Open Source + +We do not shy away from commercialization, as healthy commercial revenue is the fuel for continuous iteration of open source projects. We achieve this through: + +* **Feedback Mechanism**: General features, performance optimizations, and security patches accumulated in commercial projects will be prioritized for merging back into the open source main branch. +* **Enterprise Support**: By providing value-added services to enterprise users, we use the funds for full-time developer salaries, server infrastructure, and community activity operations. + +### 3.2 Ecosystem Collaboration + +We encourage and actively seek deep collaboration with community developers and enterprise users. Whether through integration plugins, developing client SDKs for specific languages, or building industry solutions based on this platform, we view all as part of ecosystem prosperity. + +## 4. Roadmap Planning Mechanism + +We will regularly (quarterly) publicly update the Roadmap. + +* **Requirement Collection**: All requirements from Issues and Discussions will enter the requirement pool. +* **Priority Assessment**: The core team will evaluate requirements based on three dimensions: "Generality," "Security," and "Urgency." +* **Transparent Decision-Making**: For major architectural changes or feature deprecations, we will solicit community input through the RFC (Request for Comments) process. + +## 5. Your Participation + +We need not just code, but also your voice. You can participate in License Manager's future through: + +* **Feedback on Scenarios**: Tell us what scenarios you use it in and what obstacles you encounter. +* **Improve Documentation**: Help us make obscure technical details more accessible. +* **Promotion and Evangelism**: Let more developers know about and use this tool. + +Every line of code, every Issue, and every discussion will be taken seriously. + diff --git a/docs/en/guide/index.md b/docs/en/guide/index.md index 88cd598..4bfd350 100644 --- a/docs/en/guide/index.md +++ b/docs/en/guide/index.md @@ -1,3 +1,114 @@ -# guide +# Introduction -License Manager is an independent software licensing platform that provides license code generation, distribution, validation, and management services for IoT platforms and other software systems. It offers both online and offline licensing modes with hardware-based binding for enhanced security. +License Manager is an independent software licensing management system that provides license code generation, distribution, validation, and management services for software systems. It supports both online and offline licensing modes, with hardware-based binding mechanisms ensuring security. + +## System Overview + +License Manager is an enterprise-grade software licensing management solution that helps software vendors achieve a complete lifecycle management cycle from license generation, distribution, validation to full lifecycle management. The system adopts a frontend-backend separation architecture, providing an intuitive management interface and rich API interfaces, supporting multiple deployment modes to meet licensing management needs in different scenarios. + +## Core Features + +### 🔐 Flexible Licensing Modes + +- **Online Licensing (Cloud)**: Local verification + heartbeat reporting, with remote control and management +- **Offline Licensing (Standalone)**: Hardware fingerprint binding, verification without network connection +- **Hybrid Mode**: Local verification + heartbeat reporting, allow short-term offline operation when disconnected + +### 🛡️ Security Mechanisms + +- **Hardware Binding**: Prevent license copying through device fingerprints (MAC, CPU, HostID, etc.) +- **Digital Signatures**: RSA-PSS-SHA256 signatures ensure license data integrity +- **State Management**: Support multiple states including normal, locked, expired, with remote control capabilities +- **Key Encryption**: Encrypted storage and transmission of license data + +### 📊 Full Lifecycle Management + +- **Customer Management**: Unified maintenance of customer profiles, contacts, and license relationships +- **License Generation**: Batch generation, custom validity periods, feature restriction configuration +- **Status Monitoring**: Real-time license status viewing, usage statistics +- **Operation Auditing**: Complete operation log records for traceability and auditing + +### 🚀 Easy Integration + +- **RESTful API**: Standardized API interfaces, easy to integrate with existing systems +- **Client SDK**: Client verification libraries in multiple languages +- **Deployment Package Generation**: Automatically generate deployment packages with configuration, simplifying delivery processes + +## System Architecture + +The system adopts a modern **frontend-backend separation architecture** design, with the backend built on the high-performance **Go (Golang)** language. This architecture design ensures system stability under high-concurrency scenarios while greatly simplifying enterprise deployment and operational costs. + +### Core Components + +```mermaid +graph TD + UI[💻 Frontend Admin Interface
Vue.js 3 + Modern UI] + API[⚙️ Backend Core Engine
Go + Gin + GORM] + DB[(🗄️ MySQL Database
License Data Storage)] + + UI -->|HTTPS / REST API| API + API -->|TCP / SQL| DB + + %% Simple styling + classDef default fill:#fff,stroke:#333,stroke-width:2px; +``` + +### Architecture Advantages + +* **Ultimate Performance**: Thanks to Go's coroutine (Goroutine) features, a single node can support tens of thousands of concurrent verification requests with extremely low resource consumption. +* **Simple Deployment**: The backend compiles into a single binary file (Single Binary) with zero runtime dependencies, perfectly supporting Docker containerized deployment. +* **Secure and Reliable**: API interface layer adopts strict authentication mechanisms, core business logic is closed-loop on the server side, and the database supports transactional consistency guarantees. +* **Easy to Scale**: Modular code structure design supports smooth upgrade from single-machine mode to cluster high-availability mode. + +### Workflow + +```mermaid +sequenceDiagram + autonumber + participant Admin as 👤 Administrator + participant System as ⚙️ Core Engine + participant Client as 🖥️ Client Software + + Note over Admin, System: Phase 1: Generation & Distribution + Admin->>System: 1. Create License Policy (Web UI) + System-->>Admin: Generate License File/Key + Admin->>Client: 2. Distribute License Package (Email/Download) + + Note over Client, System: Phase 2: Verification & Operation + Client->>Client: 3. Local Verification (Decrypt & Verify Signature) + + opt Online Mode + Client->>System: 4. Report Heartbeat (with License Info) + System->>System: Check Heartbeat Content + alt License Update Required + System-->>Client: Return true (Update Required) + Client->>System: 5. Auto-download New License + System-->>Client: Return New License File + Client->>Client: Update Local License + else No Update Needed + System-->>Client: Return false (Normal) + end + end +``` + +1. **License Issuance**: Administrators configure policies through the frontend interface, and the backend core engine generates tamper-proof license files/keys using encryption algorithms. +2. **License Distribution**: Supports online automatic distribution or export of offline deployment packages, delivered to end users through secure channels. +3. **Client-Side Verification**: Client applications integrate SDKs and perform **local verification** (using public key to decrypt and verify signatures) at startup or runtime. Whether in online or offline mode, verification is completed locally without requiring real-time network connection. +4. **Heartbeat Reporting & License Update**: In online mode, clients periodically report heartbeats (containing license information) to the server. The server checks the heartbeat content to determine if a license update is needed. If an update is required, it returns `true` to the client, and the client automatically downloads the new license and updates the local license file. +5. **Audit and Monitoring**: The system automatically records verification logs and heartbeat data, providing real-time feedback on license usage status and anomaly alerts. + +## Use Cases + +- **SaaS Software**: Need to control access permissions by time, features, user count, etc. +- **Enterprise Software**: Require hardware binding to prevent illegal license copying +- **Embedded Systems**: Require offline verification without network dependency +- **API Services**: Need to control usage limits such as call counts, concurrency, etc. +- **Software Trials**: Provide trial period licenses with automatic feature restrictions upon expiration + + +## Next Steps + +- If you are a **new user**, we recommend starting with [Getting Started](./getting-started.md) to learn how to deploy the system +- If you want to understand **why you need a licensing system**, check out [Business Value](./business_value.md) +- If you are a **developer** needing to integrate license validation, please refer to [License Structure](./license-token-structure.md) and [API Reference](./api.md) +- If you want to **contribute** or understand our development philosophy, see [Community Strategy](./community_strategy.md) diff --git a/docs/guide/community_strategy.md b/docs/guide/community_strategy.md new file mode 100644 index 0000000..79fe195 --- /dev/null +++ b/docs/guide/community_strategy.md @@ -0,0 +1,42 @@ +# 社区发展策略 + +## 1. 愿景与使命 + +我们致力于将 **License Manager** 打造为行业标准的软件授权管理基础设施。我们的使命是通过开源的力量,降低软件分发与版权保护的门槛,同时确保企业级的高安全性与可靠性。 + +我们相信,一个可靠的基础设施软件必须经得起社区的广泛验证,同时需要专业团队的长期投入。 + +## 2. 发展哲学:核心引导,社区共建 + +为了保证项目的可持续性和技术架构的严谨性,采取 **"Core-Led, Community-Driven"(核心团队引导,社区驱动)** 的治理模式: + +* **核心团队(Core Team)**:作为项目的"守门人",负责制定技术路线图(Roadmap)、把控架构设计、审核核心代码以及维护系统的安全性。我们承诺保持核心功能的开源与中立。 +* **社区贡献者(Contributors)**:是项目的"雷达"和"加速器"。我们依赖社区来发现真实场景下的痛点、报告Bug、贡献多语言SDK、完善文档以及分享最佳实践。 + +## 3. 可持续发展模型 + +开源不是一时兴起,而是一场长跑。为了确保 License Manager 能够长期稳定地维护下去,我们建立了透明的可持续发展机制: + +### 3.1 商业与开源的共生 +我们不避讳商业化,因为健康的商业收入是开源项目持续迭代的燃料。我们将通过以下方式实现闭环: +* **反哺机制**:商业项目中积累的通用功能、性能优化和安全补丁,将优先合并回开源主分支。 +* **企业支持**:通过为企业用户提供增值服务,我们将获得的资金用于全职开发者的薪资、服务器基础设施和社区活动的运营。 + +### 3.2 生态合作 +我们鼓励并积极寻求与社区开发者、企业用户的深度合作。无论是通过集成插件、开发特定语言的客户端 SDK,还是基于本平台构建行业解决方案,我们都视作生态繁荣的一部分。 + +## 4. 路线图规划机制 + +我们将定期(每季度)公开更新 Roadmap。 +* **需求收集**:所有来自 Issue、Discussion 的需求都会进入需求池。 +* **优先级评估**:核心团队将根据“通用性”、“安全性”和“紧迫性”三个维度对需求进行评估。 +* **透明决策**:对于重大的架构变更或功能废弃,我们将通过 RFC (Request for Comments) 流程征求社区意见。 + +## 5. 您的参与 + +我们不仅需要代码,更需要您的声音。您可以通过以下方式参与 License Manager 的未来: +* **反馈场景**:告诉我们您在什么场景下使用,遇到了什么阻碍。 +* **改进文档**:帮助我们将晦涩的技术细节变得通俗易懂。 +* **推广布道**:让更多的开发者知道并使用这个工具。 + +您的每一行代码、每一个 Issue、每一次讨论,都会被认真对待。 \ No newline at end of file diff --git a/docs/guide/index.md b/docs/guide/index.md index 992a3f7..c2585e1 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -1,3 +1,113 @@ # 介绍 -软件授权管理平台是一个独立的软件授权管理系统,为软件系统提供授权码生成、分发、验证和管理服务。支持在线和离线两种授权模式,基于硬件绑定的授权机制确保安全性。" +软件授权管理平台是一个独立的软件授权管理系统,为软件系统提供授权码生成、分发、验证和管理服务。支持在线和离线两种授权模式,基于硬件绑定的授权机制确保安全性。 + +## 系统概述 + +License Manager 是一个企业级的软件授权管理解决方案,帮助软件厂商实现从授权生成、分发、验证到全生命周期管理的完整闭环。系统采用前后端分离架构,提供直观的管理界面和丰富的 API 接口,支持多种部署模式,满足不同场景下的授权管理需求。 + +## 核心特性 + +### 🔐 灵活的授权模式 + +- **在线授权(Cloud)**:本地验证 + 心跳上报,支持远程控制和管理 +- **离线授权(Standalone)**:基于硬件指纹绑定,无需联网即可验证 +- **混合模式(Hybrid)**:本地验证 + 心跳上报,断网时允许短时间离线运行 + +### 🛡️ 安全机制 + +- **硬件绑定**:通过设备指纹(MAC、CPU、HostID等)防止授权复制 +- **数字签名**:RSA-PSS-SHA256 签名确保授权数据完整性 +- **状态管理**:支持正常、锁定、过期等多种状态,可远程控制授权 +- **密钥加密**:授权数据加密存储和传输 + +### 📊 全生命周期管理 + +- **客户管理**:客户档案、联系人、授权关系统一维护 +- **授权生成**:批量生成、自定义有效期、功能限制配置 +- **状态监控**:实时查看授权状态、使用统计 +- **操作审计**:完整的操作日志记录,便于追溯和审计 + +### 🚀 易于集成 + +- **RESTful API**:标准化的 API 接口,易于与现有系统集成 +- **客户端 SDK**:提供多种语言的客户端验证库 +- **部署包生成**:自动生成包含配置的部署包,简化交付流程 + +## 系统架构 + +系统采用现代化的**前后端分离架构**设计,后端基于高性能的 **Go (Golang)** 语言构建。这种架构设计既保证了系统在高并发场景下的稳定性,又极大地简化了企业的部署与运维成本。 + +### 核心组件 + +```mermaid +graph TD + UI[💻 前端管理界面
Vue.js 3 + Modern UI] + API[⚙️ 后端核心引擎
Go + Gin + GORM] + DB[(🗄️ MySQL 数据库
授权数据存储)] + + UI -->|HTTPS / REST API| API + API -->|TCP / SQL| DB + + %% 简单的样式美化 + classDef default fill:#fff,stroke:#333,stroke-width:2px; +``` + +### 架构优势 + + * **极致性能**:得益于 Go 语言的协程(Goroutine)特性,单节点即可支撑数万级并发验证请求,资源占用极低。 + * **部署简便**:后端编译为单一二进制文件(Single Binary),无复杂的运行时依赖(Zero Dependency),完美支持 Docker 容器化部署。 + * **安全可靠**:API 接口层采用严格的鉴权机制,核心业务逻辑在服务端闭环,数据库支持事务一致性保障。 + * **易于扩展**:模块化的代码结构设计,支持从单机模式平滑升级至集群高可用模式。 + +### 工作流程 + +```mermaid +sequenceDiagram + autonumber + participant Admin as 👤 管理员 + participant System as ⚙️ 核心引擎 + participant Client as 🖥️ 客户端软件 + + Note over Admin, System: 阶段一:生产与分发 + Admin->>System: 1. 创建授权策略 (Web UI) + System-->>Admin: 生成 License 文件/Key + Admin->>Client: 2. 分发授权包 (Email/下载) + + Note over Client, System: 阶段二:验证与运行 + Client->>Client: 3. 本地验证 (公钥解密验证签名) + + opt 在线模式 + Client->>System: 4. 上报心跳 (包含授权信息) + System->>System: 检查心跳内容 + alt 需要更新授权 + System-->>Client: 返回 true (需要更新) + Client->>System: 5. 自动下载新授权 + System-->>Client: 返回新授权文件 + Client->>Client: 更新本地授权 + else 无需更新 + System-->>Client: 返回 false (正常) + end + end +``` + +1. **授权生成 (Issuance)**:管理员通过前端界面配置策略,后端核心引擎结合加密算法生成防篡改的授权许可证(License File/Key)。 +2. **授权分发 (Distribution)**:支持在线自动分发或导出离线部署包,通过安全通道交付给最终用户。 +3. **端侧验证 (Verification)**:客户端应用集成 SDK,在启动或运行时进行**本地验证**(使用公钥解密验证签名)。无论是在线模式还是离线模式,验证都在本地完成,无需实时联网。 +4. **心跳上报与授权更新 (Heartbeat & Update)**:在线模式下,客户端会定期向服务端上报心跳(包含授权信息)。服务端检查心跳内容,判断是否需要更新授权。如需更新,返回 `true` 给客户端,客户端自动下载新授权并更新本地授权文件。 +5. **审计与监控 (Audit)**:系统自动记录验证日志与心跳数据,实时反馈授权使用状态与异常告警。 + +## 适用场景 + +- **SaaS 软件**:需要按时间、功能、用户数等维度控制访问权限 +- **企业软件**:需要硬件绑定,防止授权被非法复制 +- **嵌入式系统**:需要离线验证,不依赖网络连接 +- **API 服务**:需要控制调用次数、并发数等使用量限制 +- **软件试用**:提供试用期授权,到期后自动限制功能 + +## 下一步 + +- 如果您是**新用户**,建议从 [快速开始](./getting-started.md) 开始,了解如何部署系统 +- 如果您想了解**为什么需要授权系统**,可以查看 [商业价值](./business_value.md) +- 如果您是**开发人员**,需要集成授权验证,请参考 [许可证结构](./license-token-structure.md) 和 [API 文档](./api.md) +- 如果您想**参与贡献**或了解我们的发展理念,可以查看 [社区发展策略](./community_strategy.md)