npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

damsle

v1.0.0

Published

**Digital Asset Marketplace & SaaS Licensing Engine**

Readme

DAMSLE

Digital Asset Marketplace & SaaS Licensing Engine

A production-grade, open-source Go boilerplate for building digital asset marketplaces with automated license management. Three decoupled microservices, event-driven architecture, and zero-dependency frontend.

Go 1.23+ Docker Compose NATS JetStream License: MIT

Features

  • Clean Architecture: Decoupled microservices (cart, payment, license)
  • Event-Driven: Built on NATS JetStream for reliable async messaging
  • High Performance: DragonflyDB for ultra-fast caching and distributed locking
  • Payment Abstraction: Seamless support for Stripe and LemonSqueezy
  • Modern UI: Zero-dependency vanilla HTML/CSS/JS frontend dashboard

Quick Start

Docker Compose:

git clone https://github.com/vyofgod/DAMSLE.git
cd DAMSLE
docker compose up -d

Then open http://localhost:8080 for the frontend.

Installation Methods

Option 1: Python CLI & SDK (PyPI)

Install the management tool and developer SDK instantly:

pip install damsle

Manage your stack with ease:

damsle up      # Start the infrastructure
damsle ps      # Check service status
damsle down    # Stop everything

Option 2: Docker Compose (Manual)

Start all services and infrastructure instantly:

docker compose up -d

Verify services are running:

curl http://localhost:8081/healthz  # Cart
curl http://localhost:8082/healthz  # Payment
curl http://localhost:8083/healthz  # License

Option 2: Local Development

Start infrastructure only:

docker compose up -d nats dragonflydb

Run services (in separate terminals):

cd services/cart && go run ./cmd/server
cd services/payment && go run ./cmd/server
cd services/license && go run ./cmd/server

Serve frontend:

cd web && python3 -m http.server 8080

Option 3: Kubernetes Deployment

Deploy to your K8s cluster:

kubectl apply -f deploy/k8s/namespace.yaml
kubectl apply -f deploy/k8s/nats/
kubectl apply -f deploy/k8s/dragonflydb/
kubectl apply -f deploy/k8s/cart-service/
kubectl apply -f deploy/k8s/payment-service/
kubectl apply -f deploy/k8s/license-service/
kubectl apply -f deploy/k8s/ingress.yaml

Usage

1. Manage Cart

  • Interact with the Cart Service on :8081
  • Endpoints: GET /api/v1/cart/{id}, POST /api/v1/cart/{id}/items
  • Perform checkout: POST /api/v1/cart/{id}/checkout

2. Process Payments

  • Handled by Payment Service on :8082
  • Verify payment status: GET /api/v1/payments/{id}
  • Receives provider webhooks (e.g., Stripe) at /api/v1/payments/webhook

3. Issue & Validate Licenses

  • Governed by License Service on :8083
  • Create products: POST /api/v1/products
  • Validate issued keys: POST /api/v1/licenses/validate

Architecture & Specifications

System Design

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│    Cart     │     │   Payment   │     │   License   │
│   Service   │     │   Service   │     │   Service   │
│   :8081     │     │   :8082     │     │   :8083     │
└──────┬──────┘     └──────┬──────┘     └──────┬──────┘
       │                   │                   │
       └───────────┬───────┴───────────┬───────┘
                   │                   │
             ┌─────┴─────┐      ┌──────┴──────┐
             │   NATS    │      │ DragonflyDB │
             │ JetStream │      │  (Redis)    │
             └───────────┘      └─────────────┘

Event Flow

  • cart.checkoutpayment.completedlicense.issued

Tech Stack

  • Language: Go 1.23
  • Cache / Store: DragonflyDB (Redis-compatible)
  • Locking: Distributed mutex via bsm/redislock
  • Frontend: Vanilla HTML/CSS/JS

Configuration

All configuration is handled via environment variables:

  • PORT: Service port (8081/8082/8083)
  • NATS_URL: NATS server URL (default: nats://localhost:4222)
  • DRAGONFLY_ADDR: DragonflyDB address (default: localhost:6379)
  • PAYMENT_PROVIDER: Provider choice (stripe or lemonsqueezy)
  • STRIPE_SECRET_KEY / STRIPE_WEBHOOK_SECRET: Stripe credentials
  • LICENSE_KEY_SECRET: HMAC secret for key generation
  • LOG_LEVEL: Logging verbosity (debug, info, warn, error)

Python SDK Usage

Integrate DAMSLE into your Python applications with ease:

from damsle import DamsleClient

client = DamsleClient("http://localhost:8083")

# Validate a license key
result = client.validate_license(
    product_id="my-product-uuid",
    license_key="ABCD-1234-EFGH"
)

if result.get("valid"):
    print("Welcome, licensed user!")
else:
    print(f"Access denied: {result.get('message')}")

Important Notes

  • Secret Management - Ensure LICENSE_KEY_SECRET and payment API keys are kept secure
  • Event Idempotency - Services are designed to handle duplicate events safely
  • Data Persistence - DragonflyDB is used for caching, configure persistence if required for production

Links

  • GitHub: https://github.com/vyofgod/DAMSLE
  • Issues: https://github.com/vyofgod/DAMSLE/issues

Contributing

Contributions welcome! Please submit a Pull Request.

License

MIT License - see LICENSE file for details.

Disclaimer

This software is provided "as is" without warranty. Ensure proper testing in staging environments before deploying to production.


Empowering Digital Commerce with DAMSLE

Version 1.0.0