插件商店和许可证管理平台
专为 Github 私有项目设计的商业分发平台,支持永久许可证 + 时限维护的创新授权模式。
做这个项目是因为自己有一些 Github 的小玩意,想拿来换点小钱,但没有一个趁手的授权程序,就自己和 AI 双排(主要是 AI)撸了一个。
Github https://github.com/nodeloc/gitstore
Demo https://discourseplugin.com

你是一位 GitHub 开源开发者吗?想要将你的创意项目变现,同时保持开源精神?
Git-Store 解决了插件开发者的变现难题:
完美适用于:
不再担心盗版和许可证验证。开始从你的创意中获得收益。
| 支付方式 | 覆盖地区 | 状态 |
|---|---|---|
| 💎 Stripe | 全球 | ✅ 已集成 |
| 💚 支付宝 | 中国 | ✅ 已集成 |
| 后端 | Go 1.21+ / Gin Framework / GORM |
| 前端 | Vue 3.4 / Vite 5 / TailwindCSS / DaisyUI |
| 数据库 | PostgreSQL 14+ |
| 认证 | GitHub OAuth + JWT |
| 支付 | Stripe / PayPal / Alipay |
| 部署 | Docker / Nginx Proxy Manager |
# 1. 克隆代码
git clone https://github.com/nodeloc/gitstore.git /opt/gitstore
cd /opt/gitstore
# 2. 配置环境变量
cp .env.example .env
nano .env # 修改必要的配置
# 3. 执行部署脚本
export DOMAIN="your-domain.com"
sudo ./deploy.sh
部署完成后访问 http://YOUR_SERVER_IP:81 配置 Nginx Proxy Manager 。
详细步骤请参考 NPM_SETUP.md
# 1. 启动数据库(使用 Docker )
docker-compose up -d postgres
# 2. 运行迁移
psql -h localhost -p 5433 -U postgres -d git_store < migrations/001_initial_schema.sql
# 3. 启动后端
go run main.go
# 4. 启动前端
cd frontend
npm install
npm run dev
访问 http://localhost:3001
访问 GitHub Developer Settings 创建 OAuth App:
gitstorehttps://your-domain.comhttps://your-domain.com/api/auth/github/callback获取 Client ID 和 Client Secret
为了管理已购插件的仓库访问权限,你需要一个 GitHub 个人访问令牌:
gitstore admin tokenadmin:org → write:org(用于管理组织成员)添加到 .env:
GITHUB_ADMIN_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
说明:此令牌用于在用户购买/过期插件时,自动添加/移除用户到你的 GitHub 组织。
管理员配置
[email protected]
ADMIN_GITHUB_ID=your_github_user_id
设置为管理员的 Github 邮箱和用户名,使用 Github 登录时,会自动将此用户设置为管理员。
访问 Stripe Dashboard:
STRIPE_SECRET_KEY=sk_live_xxx # 生产环境用 live ,测试用 test
STRIPE_PUBLISHABLE_KEY=pk_live_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
创建 Webhook(用于接收支付状态):
https://your-domain.com/api/webhooks/stripepayment_intent.succeeded, payment_intent.payment_failed完整的 .env 配置示例:
# 应用配置
APP_ENV=production
APP_PORT=8080
APP_URL=https://your-domain.com
FRONTEND_URL=https://your-domain.com
# 数据库
DB_HOST=postgres
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_strong_password
DB_NAME=git_store
# GitHub OAuth
GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
GITHUB_REDIRECT_URL=https://your-domain.com/api/auth/github/callback
GITHUB_ORG_NAME=your-org-name
GITHUB_ADMIN_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
# JWT
JWT_SECRET=your-random-64-character-secret-key
JWT_EXPIRY_HOURS=720
# Stripe
STRIPE_SECRET_KEY=sk_live_xxx
STRIPE_PUBLISHABLE_KEY=pk_live_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
# 邮件(可选)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=your-app-password
[email protected]


整个项目基本都是 AI 写的。花了大概 2 天时间打磨了一下细节。