Client (Python/JS):
- core/license.py: attivazione, validazione, deactivate (HTTP client + JWT decode)
- core/config.py: campi license_* + URL endpoint + costanti grace/revalidate
- api/bridge.py: get_init_data ritorna license status; activate_license/
deactivate_license/revalidate_license/open_purchase_page
- check_update riscritto: punta a musictools.djluza.com/api/latest con
Bearer token, URL di download firmato dal server solo se licensed
- webui: schermata di attivazione bloccante all'avvio; sezione Licenza
in Impostazioni con verifica/disattiva
Backend (server/):
- Cloudflare Worker + D1 + R2 (vedi server/README.md)
- Endpoints: /api/license/{activate,validate,deactivate}, /api/latest,
/api/webhook/lemonsqueezy, /api/health
- JWT HS256 con rotazione; max 3 attivazioni/licenza
- Generazione licenze via webhook Lemon Squeezy + email Resend
- Schema D1 in migrations/0001_init.sql
Memory: nuova musictools-commercial-launch.md, rimosso pending obsoleto
NON taggare finche backend non e' deployato (l'app e' bloccante)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
632 B
JSON
20 lines
632 B
JSON
{
|
|
"name": "musictools-license-server",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"description": "License + update API for MusicTools (Cloudflare Workers + D1)",
|
|
"scripts": {
|
|
"dev": "wrangler dev",
|
|
"deploy": "wrangler deploy",
|
|
"db:create": "wrangler d1 create musictools-licenses",
|
|
"db:migrate:local": "wrangler d1 migrations apply musictools-licenses --local",
|
|
"db:migrate:prod": "wrangler d1 migrations apply musictools-licenses --remote",
|
|
"tail": "wrangler tail"
|
|
},
|
|
"devDependencies": {
|
|
"@cloudflare/workers-types": "^4.20251101.0",
|
|
"typescript": "^5.6.0",
|
|
"wrangler": "^3.95.0"
|
|
}
|
|
}
|