The Interledger Community 🌱

Cover image for ProgNovel's Built-in Revenue Share in JAMstack based markdowns
Radhy for ProgNovel

Posted on • Updated on

ProgNovel's Built-in Revenue Share in JAMstack based markdowns

Hello, all! I'm excited to get myself onboard here. Many thanks to web monetization and teams to deliver this awesome community site!

As my first post here I want to demonstrate my project that I proposed for Grant for the Web funding (which unfortunately rejected in the first call for proposal). To wait for second chance call for the previous proposal opened, I thought it'd be nice to share my progress is.

Before I jump in probably I need to explain what ProgNovel, my project, is. At the very heart ProgNovel is a web app "template", though recently in development it slowly evolves into the realm of framework. In my passion of driving decentralized independent novel authors owned platform (as I am an indie author myself), ProgNovel embracing Progressive Web App, JAMstack, and serverless architecture as its first-class citizen to get the most cost-effective web app as possible. The ultimate goal is to let authors bootstrap a PWA web app platform (to rival mobile apps made by million dollars companies) that they can own themselves with only paying when there are already people paying for their works.

Think of it as serverless-ly JAMstack site but for web novels.

One thing about web novel is that, unlike your usual blog-based content, its serialised over lots and lots of pages make it quite different than your usual web content publishing sites. It's common to see authors or some fans translators to not updating their table of contents, mostly due to WordPress doesn't designed to publish serialised content in mind (though, nowadays, some WP themes helped). Some blogs articles may serialized into several posts, but in contemporary web novels, it's very common to see novel spawned over hundreds of chapter pages, even in China web novel industry thousands of chapters already the norm. I believe for this very reason, if user experience is first to be considered, there's a need to design a platform not with common tools made for bloggings, but for independent authors authoring their novels, like many tools especially created for marketers to bootstrap their e-commerce.

ProgNovel is still in development and I've made a few change of direction since Grant for the Web's first call for the proposal. There are several development milestones and major bug fixes that I've made over the last few months. But since this is Web Monetization community, of course I'll be talking about monetization specifically. I'm going to talk about my experience designing revenue share right into the heart of ProgNovel. To understand why there's a need for customized tools for web novel authors to do this, let me point out the my thoughts on pain points of composing revenue share:

  1. In independent community content creators, collaborating with strangers is common, like people do with open source in Github. With many people come and go splitting up revenue isn't a trivial task to do manually. (much easier to pay people per task instead, but that'd be commissioning, instead of revenue sharing)
  2. With potentially thousands of chapters to work with, the previously hard task becomes even harder.
  3. Compose them in markdown the JAMstack way make them even worse.

Markdown Frontmatter
Image: Markdown above might look like it's fine. But there are two mistakes that probably would make contributors uncompensated.

The problem with sharing revenue

In community-centric working group, the best way to do revenue sharing is to not talking about revenue at all. Particularly people who coordinated over Discord channels or forums who only know each others' internet usernames. By what I mean not talking about revenue sharing, this partly due to many people getting in collaboration with strangers is because they love what they are doing, or simply want the projects they involved with to get released more steadily and prevent them from becoming dead projects at all. Like, how many developers out there doing pull requests on open source projects expecting they'd be drenched in shares of donation money?

The other and more urgent reason is that if there's money to be involved, inevitably there's a party going to be responsible to compensate the other party. This can be a content creators turned website owners paying their fellow content creators, or authors and translators paying for editors as well as proofreaders. All is fine until someone can get uncompensated, intentionally or unintentionally, like that ambiguous typo example image I showed previously.

I've witnessed some guy got lynched online because he made a mistake when doing a PayPal payment to someone and they eventually called him out on the public forum. And to experience them over some innocent typos? Nope, no thanks.

This is also the reason why I'm getting into Web Monetization API in the first place. It's the simplest tool available on the web to make revenue sharing without having to have a conversation about revenue at all. The most ideal way would someone makes a pull request to have their payment pointers (or someone else's payment pointers) to be included in the projects. And then get involved in the work. Just that. No need to talk about money. The paying party would have the revenue share rate per task (weights in probabilistic revenue share) they needed help with to be available in public, then if someone okay with that, they can just go ahead apply to see if they are the right people for the job. Without the explicit responsibility to compensate people then the drama about unpaid or underpaid contributions can be avoided. When the collaboration is over people can part way in good faith and thus the community have less toxic things needed to deal with.

ProgNovel approaches composing revenue share over 3 phase; with only one parts that both paying party and receiver party needs to deal with (that is, registering the receiver's payment pointer into the project).

The first part is in the site's settings which can be found in the project root folder in form of YAML document (or maybe TOML too in the future). It is (or it's copy) should be accessible in public so that potential contributors can assess how the project's manager compensate collaborators. As you can see below, the ratio of contributions over authors, translators (if foreign works), editors, and proofreaders is 5:4:3:2 Probabilistic Revenue Share weights per chapters, accumulate in every chapters contributors are credited in, and calculated after the platform takes 10% of the revenue.

Site Settings

The second part is where everyone should involved in. It's the YAML document on registering everyone's payment pointers. It's edited whenever there's a new contributor joining in.

Contributions Settings

At this point the conversation about revenue share should be minimal and there should be no promise of "paying the other party" which can lead to fight if things don't go as everyone's planned. The contributors that signed up should know the performance of the works they involved in, and they should already know at which rate they would be compensated with.

It's simple and straightforward. But the problem now is back to the pain points I previously stated; you might wonder, why would I put random gibberish such as Kabooom and Wowee as contributors examples?

The reality is usernames that are harder to spell and remember than those are very common on the web. Unthoughtful implementation of revenue sharing around this issue would be a disaster. No one would want a conversation that goes on like this:

A: "Hey, your name is hard to write in every single chapter. Can you change it to a simpler one?"

B: "What should I do? But I like this username."

A: "Are you sure you don't want to change it? Don't you want to get paid?"

Enter ProgNovel CLI

ProgNovel CLI is command line tools that (planned) to be published through NPM. Since last year I was hesitating to choose the default way to manage content for ProgNovel. Should I just export documents from Google Docs? Should I just let people outsource their contents to headless CMS (which I doubt will provide features worth of the price for niche contents like web novels)? One change that made me choose markdown is the plugins that I made with web component, which actually composable in markdowns on some markdown parsers if HTML tags to be included.

Beside compiling chapters to be consumed as JAMstack API ProgNovel CLI also offers a way to fix type on contributors name, using a library that based on SΓΈrensen–Dice coefficient to find similarity between strings. The below image is an example when typos occurred when using command prognovel build or just prognovel for shorthand:


Someone who compiling the chapters can either go the to problematic chapter or fixing the typos in bulk, with just one command line prognovel fix-typo

Fixing Typos

The CLI then would find the problematic chapters and do simple find and replace:

Typo fixed 1
Typo fixed 2

The shares would be then compiled along with the novel's metadata in static JSON with format of Fundme.js (my other project that I planned to have its name changed), which then can be used to generate Probabilistic Revenue Share either in the backend or the browser.

Rev Share Result


Collaborating over the internet is usually casual but can be complicated because everyone's want (and should have) their private information protected. Web Monetization API offers a solution in a very simple but effective way, even in its early phase. For me it's the reason why it totally rocks.

Implementing it in ProgNovel has been an adventure for me. And I'm sure there's more challenge ahead that need to be addressed: should the contribution points be tamper proof? Should the project owners have the right to cancel the contributions of other people when a problem occurred?

Other challenges also raised on technical level. One of them is build performance; this is a Javascript, NodeJS project, can it really compile ten of thousands of chapters every time without having to wait half an hour?

At first, ProgNovel is not meant to be using build time to compile chapters, instead serve it on-the-fly through Cloudflare Workers. But since I'm already developing the CLI, I'm anticipating the issue by choosing WebAssembly based markdown parser, and implement my own incremental build so that markdowns that hasn't been changed won't be compiled along with others. It also only output in JSON or ArrayBuffer at most (to be uploaded to Cloudflare Workers KV), instead building static HTML like other JAMstack frameworks do, so I'm expecting the build time won't be the most painful development issue along the road.

There's also consideration for future expansion to also host web comics/manga for artists and to provide e-book for authors who also want to publish on e-book platforms like Kindle and others. However, since I'm a web novelist myself, I'll take a look on these plans after I'm satisfied with the current development.

Top comments (0)