243 lines
10 KiB
Markdown
243 lines
10 KiB
Markdown
# License Manager
|
|
|
|
<p align="center">
|
|
<a href="https://github.com/cedar-v/license-manager/releases">
|
|
<img src="https://img.shields.io/github/v/release/cedar-v/license-manager?logo=git&label=Latest%20Release" alt="Latest Release">
|
|
</a>
|
|
<a href="https://github.com/cedar-v/license-manager/releases">
|
|
<img src="https://img.shields.io/github/downloads/cedar-v/license-manager/total?label=Downloads&logo=github" alt="Downloads">
|
|
</a>
|
|
<a href="LICENSE">
|
|
<img src="https://img.shields.io/github/license/cedar-v/license-manager?label=License&color=blue" alt="License: GPL-3.0">
|
|
</a>
|
|
<a href="https://github.com/cedar-v/license-manager/issues">
|
|
<img src="https://img.shields.io/github/issues/cedar-v/license-manager?label=Issues&logo=github" alt="Open Issues">
|
|
</a>
|
|
<a href="https://github.com/cedar-v/license-manager/pulls">
|
|
<img src="https://img.shields.io/github/issues-pr/cedar-v/license-manager?label=PRs&logo=github" alt="Open PRs">
|
|
</a>
|
|
</p>
|
|
|
|
[中文](README.md) | [English](README_EN.md)
|
|
|
|
---
|
|
|
|
## Overview
|
|
|
|
License Manager is a comprehensive software commercialization solution that integrates software licensing management, self-service user portals, and commercial operation capabilities. It supports dual-track operations for both B2B enterprise customers and B2C individual users, providing full-process digital services from registration and purchase to license activation. It employs a hybrid online/offline licensing model combined with hardware binding and RSA digital signatures to ensure security.
|
|
|
|
✨It enables **any programming language** and **any type of software product** to **quickly integrate licensing capabilities** via standardized **HTTP APIs** and **cross-platform client SDKs**.
|
|
|
|
## Demo Environment
|
|
<a href="https://lm.cedar-v.com:18080">
|
|
<img src="https://img.shields.io/badge/Demo-Online-success?logo=googlechrome" alt="Live Demo">
|
|
</a>
|
|
|
|
Access URL: [lm.cedar-v.com:18080](http://lm.cedar-v.com:18080)
|
|
**Login Credentials:**
|
|
- Username: `admin`
|
|
- Password: `admin@123`
|
|
|
|
> 💡 This is a demo environment showcasing our current features. You can experience the implemented core functionalities while we continue active development with more features coming soon.
|
|
|
|
## Stars & Followers
|
|
|
|
<a href="https://github.com/cedar-v/license-manager" target="_blank">
|
|
<img src="https://img.shields.io/github/stars/cedar-v/license-manager?style=social" alt="GitHub Stars">
|
|
</a>
|
|
<a href="https://github.com/cedar-v/license-manager" target="_blank">
|
|
<img src="https://img.shields.io/github/watchers/cedar-v/license-manager?style=social" alt="GitHub Watchers">
|
|
</a>
|
|
|
|
If this project helps you, please give it a star—your support keeps us moving!
|
|
|
|
## Client SDK
|
|
|
|
Client SDK repository: [https://github.com/cedar-v/license-manager-sdk](https://github.com/cedar-v/license-manage-sdk-go)
|
|
|
|
## System Interface
|
|
|
|
### Login Page
|
|

|
|
|
|
### Management Dashboard
|
|

|
|
|
|
### Customer Management
|
|

|
|
|
|
### License Management
|
|

|
|
|
|
The customer management module provides comprehensive customer information management features, including CRUD operations for customer data, status management, and authorization associations.
|
|
|
|
## Self-Service User Portal
|
|
|
|
The platform provides comprehensive self-service user portals supporting **dual-track operations for B2B+B2C**:
|
|
|
|
### B2B Enterprise Customer Services
|
|
- **Enterprise User Registration**: Mobile phone registration with enterprise admin managing member accounts
|
|
- **Product Package Purchase**: Three package types (Trial, Basic, Professional) with bulk license purchasing
|
|
- **License Code Management**: Online license purchase with offline activation and license sharing
|
|
- **Device Management**: Enterprise users can view and manage all activated devices with device unbinding
|
|
- **Order Management**: Complete order history queries and status tracking
|
|
|
|
### B2C Individual Customer Services
|
|
- **Individual User Registration**: Quick mobile phone registration with simplified personal account management
|
|
- **Flexible Purchasing**: Support for single or small quantity license purchases meeting individual user needs
|
|
- **Convenient Activation**: Support for both online activation and offline activation modes
|
|
- **Device Monitoring**: Individual users can monitor device status and usage in real-time
|
|
|
|
### Unified Payment Experience
|
|
- **Alipay Integration**: Support for Alipay QR code payment with secure and reliable payment experience
|
|
- **Payment Status Tracking**: Real-time payment status queries and callback notifications
|
|
- **Multi-environment Support**: Sandbox environment testing and production environment switching
|
|
|
|
## Key Features
|
|
|
|
- 🔧 **Customer Management**: Complete customer information management with status control
|
|
- 🔐 **License Generation**: Online/offline license modes with hardware fingerprinting
|
|
- 📊 **License Management**: Real-time status monitoring and license lifecycle management
|
|
- 📦 **Deployment Packages**: Automatic generation of deployment packages with configurations
|
|
- 🌐 **API Services**: RESTful APIs for validation, activation, and heartbeat monitoring
|
|
- ⚙️ **System Management**: Admin authentication and monitoring dashboard
|
|
- 🛠️ **Cross-platform Tools**: Hardware information extraction tools for multiple platforms
|
|
- 👥 **Self-Service User Portal**: Dual-track B2B+B2C operations supporting enterprise customers and individual users with self-service operations
|
|
|
|
## Technical Stack
|
|
|
|
- **Frontend**: Vue.js 3+ with modern UI components
|
|
- **Backend**: Go 1.23+ with Gin framework, GORM, Viper configuration and Logrus logging
|
|
- **Database**: MySQL 8+
|
|
- **Configuration**: YAML format configuration files
|
|
- **Deployment**: Docker, single machine, or system service
|
|
|
|
## API Endpoints
|
|
|
|
```
|
|
POST /api/validate - License validation
|
|
POST /api/activate - License activation
|
|
POST /api/heartbeat - Heartbeat reporting
|
|
GET /api/license/{code} - License information query
|
|
GET /api/customers - Customer list API
|
|
GET /tools/{tool} - Tool download
|
|
```
|
|
|
|
## Security & Performance
|
|
|
|
- **Security Features**:
|
|
- JWT authentication and authorization
|
|
- HMAC-SHA256 signature verification
|
|
- Hardware fingerprint binding for anti-piracy
|
|
- HTTPS transport encryption
|
|
- Multi-language error message support (Chinese/English/Japanese)
|
|
|
|
- **Performance**:
|
|
- **High Concurrency**: Go native goroutines support, theoretically supports 10,000+ concurrent connections
|
|
- **Low Latency**: Average API response time < 50ms
|
|
- **Memory Optimized**: Go GC optimization, memory usage < 100MB
|
|
- **Database Connection Pool**: Connection reuse for maximum database performance
|
|
|
|
- **Reliability**:
|
|
- Comprehensive error handling with multi-language error messages
|
|
- Structured logging and monitoring
|
|
- Automatic database migrations
|
|
- Graceful shutdown and resource cleanup
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
# Clone the repository
|
|
git clone https://github.com/cedar-v/license-manager.git
|
|
cd license-manager
|
|
|
|
# Local backend build & run (optional)
|
|
cd backend/cmd
|
|
go build -o license-manager
|
|
|
|
# Configuration (choose one)
|
|
# 1) Create config.yaml in the working directory (the app looks here first)
|
|
# cp ../configs/config.example.yaml ./config.yaml && edit it
|
|
# 2) Edit ../configs/config.yaml (the app will fall back to this path)
|
|
|
|
./license-manager
|
|
```
|
|
|
|
## Docker Deployment
|
|
|
|
### Using Pre-built Images (Recommended)
|
|
|
|
For quick deployment without downloading source code, you can use pre-built GitHub Container Registry images:
|
|
|
|
For detailed deployment steps, please refer to: [GitHub Images Deployment Guide](docs/github-images-deploy.md)
|
|
|
|
### Build from Source
|
|
|
|
We provide ready-to-use Docker Compose files for development and production:
|
|
|
|
```bash
|
|
# Development (first run with --build is recommended)
|
|
docker compose up -d --build
|
|
|
|
# Production
|
|
docker compose -f docker-compose.prod.yml up -d
|
|
|
|
# Verify backend health
|
|
curl http://localhost:18888/health
|
|
```
|
|
|
|
Notes
|
|
- Backend config is mounted by Compose:
|
|
- Dev: `backend/configs/config.dev.yaml` → `/app/backend/cmd/config.yaml`
|
|
- Prod: `backend/configs/config.prod.yaml` → `/app/backend/cmd/config.yaml`
|
|
- Frontend Nginx proxies `/api/` to `backend:18888` inside the Docker network.
|
|
- Health checks use `curl`; the backend image includes `curl`.
|
|
- For full details (reverse proxy, health checks, mounts, troubleshooting), see `README-Docker.md`.
|
|
|
|
## Open Source License
|
|
|
|
This project is licensed under the **GNU General Public License v3.0 (GPL-3.0)**.
|
|
|
|
### License Description
|
|
|
|
- **Free Use**: You are free to use, study, modify, and distribute this software
|
|
- **Open Source Requirement**: If you distribute modified versions, they must also be open source under GPL-3.0 license
|
|
- **Copyright Protection**: Derivative works using this software must retain the original copyright notice
|
|
- **No Warranty**: The software is provided "as is" without any express or implied warranty
|
|
|
|
### Commercial Use
|
|
|
|
- Commercial use is permitted, but derivative works must also be open source
|
|
- For proprietary licensing or commercial support, please contact the project maintainers
|
|
|
|
### Full License Text
|
|
|
|
For detailed license terms, please see the [LICENSE](LICENSE) file in the project root directory, or visit:
|
|
https://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
---
|
|
|
|
## Contributing
|
|
|
|
We welcome contributions! Please feel free to submit a Pull Request.
|
|
|
|
## Support
|
|
|
|
### User Feedback & Community
|
|
|
|
We highly value user feedback and suggestions! Join our QQ group for discussions and communication:
|
|
|
|
<img src="docs/images/qrcode_1755081220153.jpg" alt="QQ Group QR Code" width="200" />
|
|
|
|
Scan the QR code or search for the QQ group number to join and connect with other users and developers to:
|
|
- Share usage experiences and best practices
|
|
- Ask questions and get help
|
|
- Participate in new feature discussions
|
|
- Provide feedback and improvement suggestions
|
|
|
|
### Issue Reporting
|
|
|
|
For technical issues or bug reports, please contact us through:
|
|
- Submit GitHub Issues (recommended)
|
|
- Provide feedback in the QQ group
|
|
- Send email to project maintainers |