14d0eaa2b315193d052401a92f62463053790283
DashCaddy License Server
Stripe-driven license automation for DashCaddy.
Purpose
This service is the billing and license orchestration layer for DashCaddy. It receives Stripe webhooks, maps purchases/subscriptions to license entitlements, and exposes license validation/deactivation endpoints for DashCaddy instances.
Planned responsibilities
- Verify Stripe webhook signatures
- Track customers, subscriptions, invoices, and purchases
- Generate or extend DashCaddy licenses
- Expose
/api/license/validatefor DashCaddy activation - Expose
/api/license/deactivatefor DashCaddy deactivation - Support renewals, expirations, cancellations, and grace periods
Architecture
- Stripe is billing truth
- License server database is entitlement truth
- DashCaddy app remains the consumer of license validation
- Existing DashCaddy license logic should be reused, not reinvented
Next steps
- Extract/reuse the current DashCaddy license key generation and verification logic
- Define DB schema for customers, licenses, activations, and Stripe mapping
- Implement webhook ingestion and event processing
- Implement validate/deactivate endpoints
- Add admin tooling for manual recovery and support workflows
Current implementation status
Implemented now:
- Stripe Checkout session creation
- Stripe webhook ingestion scaffold with subscription/license sync
- File-backed persistence for customers, subscriptions, and licenses
- License validation endpoint
- License deactivation endpoint
- One-machine-at-a-time activation enforcement
Still required before production:
- durable database
- email delivery for license keys
- deployment on Contabo
- Stripe webhook registration
- end-to-end live checkout verification
Environment
PORT=3010
APP_BASE_URL=https://licenses.dashcaddy.net
DASHCADDY_WEBSITE_URL=https://dashcaddy.net
STRIPE_SECRET_KEY=sk_live_...
STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
DATA_DIR=./data
HTTP endpoints
GET /healthGET /api/public/configGET /api/public/plansPOST /api/checkout/sessionPOST /api/stripe/webhookPOST /api/license/validatePOST /api/license/deactivateGET /api/admin/debug/store
Description
Languages
JavaScript
100%