15
17 Comments

What's the best way to sell a client-side JavaScript library?

Hey IH, I'm working on a new project that will be distributed as a piece of client-side JavaScript code.

Based on a recent Twitter poll I think Gumroad is the obvious platform to sell it on.

However, I can't shake the thought that there must be a better option than Gumroad by now. ๐Ÿ˜•

My ideal platform would let me create a SaaS by just uploading my script.

It would let me:

  1. Upload a script and version it (v1, v1.1, v2, etc)
  2. Specify a few options my users can fill in (these will be passed into the script)

And it would let my clients:

  1. Pay a monthly fee for access to the script
  2. Specify websites they own (i.e. the valid websites the script can be loaded)
  3. Can fill in the options that I chose for them (which will be passed into the script)

๐ŸŽ‰ Then they copy & paste the resulting code into their website (Wordpress, Ghost, Webflow, etc.) โ€” and they get a working version of my paid plugin!

I'd pay $40/month + a fee on every transaction for a no-headaches SaaS platform like this. I upload a script and don't have to worry about anything else!

Does anything like this exist? ๐Ÿ™ I'd rather not spend 3+ months building it out with a SaaS starter template.

posted to Icon for group Marketing
Marketing
on April 30, 2022
  1. 3

    Not aware of anything that handles this.

    โ€œthisโ€ meaning uploading a resource and then allowing versioned access to it and setting up domain locks + payment + passing in options.

    For CropGuide an image crop script, we built this backend ourselves which is indeed a hassle.

    Iโ€™d recommend Paddle over Gumroad as the Gumroad API is kind of a mess. You could also investigate using LemonSqueezy. All these servies support uploading resources that users can download when theyโ€™re logged in but they donโ€™t support the core features youโ€™re looking for, allowing people to link to the resource from their sites and pass in options + version the resource.

    If the script is fully client side the alternative is selling the script itself with some sort of configurator app.

  2. 2

    This is exactly what LemonSqueezy.com was built to do. As an added bonus, weโ€™re the merchant of record too so taxes, VAT, etc. are all taking care of too.

    You should checkout our API + webhooks.

    https://www.lemonsqueezy.com/docs/api/

  3. 2

    Take a look at Unlock.sh
    It's creator is this fine gentleman.
    I believe his DM is open on twitter โ€“ you could chat with him and see if it fits your need.

    1. 3

      Thanks for mentioning Unlock ๐Ÿ™Œ๐Ÿป Much appreciated.
      For anyone out there looking for an easy way to sell, license, market, and distribute your software be sure to take a look at Unlock. My mission is to make it possible for any developer to make a living selling their code online while Unlock takes care of everything else.

      At the moment Unlock supports PHP (private PHP composer packages), Javascript (private NPM packages), Ruby (private Ruby gems), Python (private Python Wheels), and Electron applications (plug-and-play auto-updater and license validation). Feel free to reach out if your favorite programming language/tech stack is missing.

    2. 1

      That is super cool. I wish I had a use case for it right now but switched my project over to a managed API.

  4. 1

    If you are looking towards monetizing a nodejs package - use https://privjs.com

  5. 1

    Hi David,

    Built SaaSBox for this purpose. It is a turnkey SaaS CMS + auth + subscriptions + (no)code examples to do what you want, e.g. can add screens in the user dashboard for admin upload and script configuration by the user. You can launch this in 1-3 days as a SaaS. It handles various corner cases, e.g. plan changes mid-subscription period, has turnkey funnel analytics and so on. If interested feel free to reach out.

  6. 1

    Correct me if I'm wrong but it sounds like you just need API key distribution.

    Use <a href="https://help.gumroad.com/article/76-license-keys">gumroad</a>.

    The process is fairly simple:

    1. User subscribes to your product on gumroad
    2. An email is sent to them after subscribing to your product with the api key
    3. They take the api key and add it to the politepop script.

    I've been looking into this myself for an upcoming project.

    (Great project by the way, it would be cool to expand this to user feedback forms)

  7. 1

    Can you distribute it as a npm package?

    If yes, you can use something like https://basetools.io/. Not sure if it checks all your boxes but it would probably suffice to get started.

  8. 1

    Hi @panphora,

    I had the same question a few weeks ago, until I found a great piece of article written by @mperham. https://www.mikeperham.com/2016/05/17/commercial-gems/

    I highly recommend it because he managed to break down what could be a complex solution into a simple and yet robust solution that powers his business.

  9. 1

    Have you looked at https://coded.market ? I think they do have the features you are looking for.

  10. 1

    Thanks for sharing

  11. 1

    do not focus on coders, make it no code to implement with single line of code needed to be added to head or body

  12. 1

    If youโ€™re using Gumroad, you may want to look into https://help.gumroad.com/article/154-custom-delivery-products

    Unfortunately, that still involves custom integrations on your end

  13. 1

    Can't you just distribute it as an obfuscated javascript file on your own server and have people add it as a script to their webpage? Similar to what Intercom, Fomo, Google Analytics, etc do. You can always check if they are subscribed by getting the domain the request is sent from and checking against your database.

    Not sure if that would fit this specific product but could be a start. Wouldn't take too long to implement either.

    Another alternative that's already done would be the Gumroad Github integration to give access to a private repository.

  14. 1

    As far as I'm aware, there is no service that meets all the above requirements. That being said, have you tried building a custom solution? Each script could have an embedded API key, if the user is subscribed, it'll run, otherwise it wont.

  15. 1

    I'm not aware of any exiting marketplace that checks all of these boxes. Maybe that's because it's too niche of a market or folks don't actually like "buying" scripts.

    That said, charging a monthly fee for access to a bit of software is a different question. And I think you are on to something.

    My vote is to build out exactly what you need on top of Polite Pop. Versioning, SaaS payments, website authorization, and API key population. But with one caveat: keep the code generic enough where you could copy-paste it out into the SaaS you are dreaming of with little modification.

    This lets you test two things: do people want to buy Polite Pop and is there interest marketplace interest scripts charging a monthly fee.

    I also have a ton of ideas on how the actual payment/verification could work but I don't want this comment to lose its main focus. Best of luck on this David, this sounds really exciting!

  16. 1

    This comment was deleted a year ago.

  17. 1

    This comment was deleted 3 years ago.

Trending on Indie Hackers
We just hit our first 35 users in week one of our beta User Avatar 48 comments From Ideas to a Content Factory: The Rise of SuperMaker AI User Avatar 27 comments Why Early-Stage Founders Should Consider Skipping Prior Art Searches for Their Patent Applications User Avatar 21 comments Codenhack Beta โ€” Full Access + Referral User Avatar 17 comments As a founder we need ideas,insights and lessons, here are some take aways that I've got from HN last week User Avatar 14 comments I built eSIMKitStore โ€” helping travelers stay online with instant QR-based eSIMs ๐ŸŒ User Avatar 13 comments