Freelancers July 3, 2020

Buying and selling code


Hi everyone!

It struck me the other day that it's odd that when you're building a web app and you need a piece of functionality, essentially your only options are to use an open-source library or build it yourself. If I wanted to pay for a library, I wouldn't even know where to begin. The same applies the other way around; if I had an idea for a game-changing javascript and I wanted to charge people to use it, I simply couldn't; there's no established channel for paying for and using closed-source third-party code.

I'm thinking of building a paid marketplace for third-party libraries, but first I wanted to take this community's temperature on the idea. If there were a liquid market for third-party libraries, would you consider trying to grow a business around building and maintaining a library? If not, why not? What would you need to see from the marketplace before you would consider it?

If we were able to build a healthy, low-friction ecosystem for paid code, I think it could unlock a ton a value for buyers and enable an exciting new kind of software business. But I'm wrong about a lot, and I'd love to hear if I'm wrong about this. Thanks so much!

  1. 4

    @Gooseface, some indie hackers here have looked at similar things, including myself.

    @prasanna is building I’m working on a similar thing at These target the JS ecosystem and allow gated access to npm modules.

    Others have mentioned gumroad or codecanyon. Xs:code allows you to sell access a git repo.

    See also, which seems to target more established enterprises.

    Apart from the existing markets, here are some of the key things in my mind ...

    • the community is used to open source tools. Paying and integrating something should easily fit into the customer’s workflow. How would this be better for the consumer of these paid software products?
    • how do you license these?
    • why not just roll your own delivery system and not lose x% revenue to a marketplace?
    • why not use a dual licensing model and sell licenses and use existing infra for delivery?

    Happy to talk more if you want to DM me on Twitter or hit me up on email: [email protected]

    1. 2

      Ha, that's funny.... 2 days ago I was thinking I should start my own JS marketplace called "projs". Eventually I thought it would be too much effort. Best of luck though!

      1. 1

        Ha! Nice! Seems like we all go down similar thought patterns with similar ideas

  2. 2

    Hey @Gooseface, I'm glad that you brought up this question. As @jones_spencera said, you're not the only person who came across this problem because I and Jones have been trying to solve this problem via and https://premiumjs respectively. But the more we build we realized that solving this problem gives birth to more problems which might not be accepted by the developer community just yet.

    After speaking to a lot of developers, I also found out that monetization of npm packages could lead to people hating us for doing (privjs was once trending on reddit with hate comments for trying to monetize npm packages). We are very well aware that monetization is a crucial part for life but it also comes with a lot of unknown challenges mainly because the world has adopted to receiving codes for free.

    If this post was to validate whether or not to go ahead with your idea, then I would like to say that we are already working to solve the problem. There are also a few more startups that I am not aware of yet which are looking into the same issue as well. So, I would leave it up to you to take a decision on this.

    On the other hand, if you wanted to validate the idea - I would say that there is a scope for it but the market is not ready just yet.

  3. 1

    This is something I've thought about frequently/regularly. I've searched far and wide the past couple of years, so probably know the landscape better than most. Here's my thoughts:

    • CodeCanyon is the only "real" (i.e. established) code marketplace. To be frank, however, its offering is pretty terrible. If you use WordPress there's lots of cool plugins but otherwise you're looking at a bunch of jQuery and PHP scripts that are 10 years outdated.
      I've bought a tonne of items there honestly just out of curiousity, and from them maybe 2 of them were gems.
    • ThemeForest (also run by Envato) is pretty similar - it caters very heavily for freelance
      web devs/agencies/small businesses. As such, most items for sale are WordPress themes. If you're building a frontend with modern JS tooling it actually has some great React boilerplates. I've found that these are the only items on Envato that are reliably value for money.
    • Outside Envato there's a couple of other marketplaces but the product quality is even worse (if that's possible), plus many items are cross-posted and the offering is tiny.
    • Outside these marketplaces there's only a very few indie devs who sell their work, mostly on gumroad. A guy who posts here runs I've purchased the image editor and it's amazing! That alone makes me convinced it is possible for the premium code business model to work.

    In summary, I agree it's very odd that there isn't more of a "code for money" movement. Especially given the startup craze, one would think it's a low-hanging fruit. I guess the allure of open-source collaboration and GitHub is just too powerful an influence.
    I think it's possible to create a true competitor to Envato's monopoly. But it would require enormous dedication, marketing to the right developers, strong connections with the dev community, and a relentless focus on modern + modular + well-documented products.

  4. 1

    Isn't that what envato does?

  5. 1

    There are are quite a few services that let you sell access to a git repo or npm package. There is also Gumroad.

    As someone selling Javascript boilerplates ( I found it was easier to roll my own system with Stripe. I don't want to be handing over 10-30% of my revenue in commissions either.

    Maybe there's room for a small monthly subscription model + transaction fees or perhaps these services probably exist already.

    1. 1

      Thanks @kylegawley. It's been great to learn more from this thread about some of the solutions already out there.

      Congrats on Gravity, it looks really nice. It's precisely the kind of business that I was envisioning this kind of marketplace benefitting, so it's interesting to hear that you've rolled your own distribution.

      My thoughts are extremely embryonic, but generally I was thinking that a dedicated marketplace could add value for sellers in the following ways, roughly in order of importance:

      1. If you have custom package management tooling, that might let you do things like elastic pricing, subscriptions, making a package free to use in dev, and free trials. This seems absolutely key to me. I can't speak for others, but I know that I would be significantly more willing to pay for a package if (1) I could make sure I liked it before spending a dime and (2) I didn't have to shell out a big sum all at once . Also, if I could play with a library for free (or almost free) in a toy project in my spare time, that might make me more likely to advocate for using it at work.

      2. A unified marketplace could drive the marginal transaction cost to near zero. My guess is that people don't use proprietary libraries as much as they otherwise would because procurement is a big pain. With a single marketplace, you can have a standard parameterized license agreement, which means that legal only needs to get involved the very first time you use the market. You could even try to reduce the need for pricing approval by having a feature where a team is assigned a monthly budget, and they're free to subscribe and unsubscribe to various libraries on the market as long as they stay under the budget. (Of course, this only matters once the market has reached sufficient size that buyers are using multiple packages from the market per project, but that's how most marketplace businesses work.)

      3. A marketplace could help sellers credibly signal quality. It can do this through the standard license (which, for instance, could guarantee the continued availability of the library and all documentation even if the business that owns it folds) and maybe by publishing stats like churn rate, which it's hard to do credibly if you're distributing your own package.

      4. The "let us worry about that" factor. You write the code, we handle obfuscation, distribution, subscriptions, licensing, etc.

      5. A marketplace could let you use other paid libraries as dependencies. You set your price, the dependency's owner sets her price, and the end user gets charged the sum + fees.

      If there were a market that offered those features, could you imagine giving up a cut to get access to it?

      1. 2

        I personally wouldn't because I've already solved these problems but I'm sure there are some people who would. I think the best benefit you could offer is access to customers for devs who want to sell products but don't necessarily have the marketing toolbox in order to distribute it.

        For someone selling products on the side and doesn't have time or who doesn't want to think about a lot of these problems, what you're suggesting makes sense.

        Your first point is interesting, how would you provide free access without risking the code being stolen?

        In theory this sounds like this would be a huge problem, but I have had less than 5 people get in touch asking to try a free version, and I'm selling at reasonably high price point where I imagined this would be a bigger problem than it is.

        ~95% of my customers buy without asking any questions and they never ask for a free version. So either I'm doing something right in my landing page or this isn't a big issue for people (at this price point).

        1. 1

          Thanks so much, this has been super helpful. I agree that free trials / subscription pricing is the key technical challenge here and it's not something I have any very bright ideas about just now.

  6. 1

    Open source has the great benefit that (in addition to be free) receives a lot of bug reports and fixes constantly. You can see how popular a library is.

    The problem with closed source would be to know how up to date the software is. How many bugs does it receives, etc.

    Many products offer a paid version and they sell it on their web site.

  7. 1

    I believe CodeCanyon ( might be similar to what you have in mind.

  8. 1

    It exists, it's called outsourcing. The obstacles are understanding clients requirements, so the solution turned out to be consultancy.

    A lot of large companies opt for it, a lot of large companies offer code as a service.

    There could be a more digital marketplace for it, but the platform would have to somehow overcome the requirements clarity obstacle, and of course gain trust via quality code.

    1. 1

      Thanks for your reply! I think consulting is definitely a salient data point, in that it shows that companies are willing to pay for code. I guess I'm not so sure that there's no room on the logical spectrum between open source libraries and paid bespoke code. If there were, say, a Rails authentication gem that greatly improved on ease of use over open source alternatives but you had to pay to use it, I suspect that there would be buyers -- provided that there were purchase and package management tooling in place to reduce the cost of using the gem to reasonable levels. Put differently, there is very high demand for non-bespoke libraries when the price is $0; why would a price of $X be a deal breaker for (let's stipulate) a really high quality non-bespoke library?

      1. 1

        I think the positioning should be letting open source library to sell the paid version. Ag grid offers free community version and paid version. Intro.js is the same. But there is no marketplace

        Some js library tries to monetize by separate the free and paid version. Some other open source softwares are trying with sponsorship model with github

  9. 1

    This comment was deleted 3 months ago.

Recommended Posts