I'm thrilled to give the final grant update on Bandi. Just because the grant period is finished doesn't mean that the work is over—I've found ways to continue to expand and improve the project which I'm excited to share with you. At the end of the report I'll share the roadmap for the end of 2021, and where I'm hoping to take the project over the next year.
For anyone who may not be familiar with the project, Bandi is a set of libraries intended to encourage and incentivize users to enter into the web monetization ecosystem. These projects provide a set of tools to help users bootstrap a rewards framework for their application. Think of something like Air Miles—these systems are often a key strategy companies use to help build loyalty with their audience. I'll talk a little bit more about the systems architecture in the upcoming sections.
Bandi seeks to provide all of the necessary pieces for creating an unopinionated rewards system that works with your application. It was designed to be decoupled from any specific systems implementation—it is simply a set of libraries and APIs to help you design the framework that works best for you. It's not intended to be a fully-featured framework, and it makes no decisions on how to use or manage data.
At a high-level, Bandi takes the payload triggered by the web monetization payment events and converts it to reward points. You can control the conversion rate with a multiplier. Here's a quick example:
- User has 0 points
- Creator has set a multiplier of 100x ($1 = 100 points)
- User streams 0.01 to creator
- Bandi-Events captures transaction event and uses multiplier to determine points accrued:
0.01 * 100 = 1 point
- User balance is updated to 1, and the new balance is returned through a callback
I'll talk a bit more about the individual pieces that make up the system in the next section.
Some possible examples of how you could use the rewards generated by Bandi:
- With a custom marketplace. Use the points for vouchers/discounts, or to exchange for merchandise.
- To access special privileges on your application (for example, spending 5 points to leave a comment on a post).
- To rank users in different brackets based on contributions (think Patreon).
- To keep an accumulated total of "experience". Higher levels could be granted special visual indicators, or unlock additional privileges (think StackOverflow).
I'd love to hear any other additional ideas you might have!
There have been some major changes since the last update—some out of philosophy and some from necessity. The largest would be the deliverable of the "Loyalty Framework"; this was intended to be a fully-managed solution for creating & maintaining these rewards systems. There were some logistical challenges around managing infrastructure costs, as well a handling the legalities of building a consumer product (unfortunately this is not my area of expertise). Because of this, I've made the decision to open-source the work I've been doing.
I am a devout supporter of OSS, and I truly believe that's the way forward for building support around web monetization. The philosophies behind web monetization is to create an open and native method for streaming payments across the web, and I wanted to stay aligned with these principles (though if anyone wants to take the ideas behind Bandi to the next level, I would happily join in).
The Bandi project is now broken up into 4 different libraries:
- Bandi Events
- Bandi Server
- Bandi Admin
- Bandi (this name may be changed)
I'll talk a bit about each project and how they fit into the overall architecture.
Here's a quick high-level diagram:
This was previously referred to (and also named)
micropayment-hooks. This received a complete overhaul and has been rebranded as Bandi Events. This sets the foundation of the system—it handles listening to the web monetization payment events and making the conversion to bonus points. It also accepts a callback function that will execute on every transaction and return the updated user balance.
Like every project under the Bandi alias, this library can be used on its own (as it stays decoupled from any specific systems implementation), but it also fits nicely as a puzzle piece alongside the other Bandi projects.
This project provides a set of transactional APIs for managing/updating user balances. It also includes a data layer using prisma as an ORM over a MySQL database (though this could be swapped out for the database of your choice). This project provides the groundwork for setting up a full backend (including authorization). I'll cover more about this project's architecture in the next section.
This project provides an administrative user interface for a high-level view of user transactions + balances. This will include insight into a number of valuable metrics, as well as graphs and charts for data visualization. This is meant as a complimentary project to Bandi Server, but could be adapted to work with a custom backend solution.
This is an upcoming project for bridging the other Bandi libraries together. This is designed for anyone using both the events and server projects, and handles creating the connection between the client and server, as well as automatically managing the transactions. This project is meant to abstract some of the overhead/boilerplate out of using the Bandi projects.
This will be the last project to be completed. Check the roadmap for more information on project timelines.
The high-level roadmap of objectives for Bandi are conceptually similar to the last report, but things have evolved slightly. For reference, here are the original objectives:
|Pre-grant period||Develop proof-of-concept for the webmonetization-hooks library.|
|Month 1||Extend the feature set of the webmonetization-hooks library, as well as develop a playground where users can manage/tweak the distribution of reward currency to fit their personal use case.|
|Month 2||Initial release of the webmonetization-hooks library|
|Month 3||Begin development of the Loyalty Framework (design + infrastructure).|
|Month 4||Development of Loyalty Framework transaction APIs.|
|Month 5||Begin marketing, development of a website for the Loyalty Framework.|
|Month 6||Release stable build of Loyalty Framework.|
|Post-grant period||Continue to extend the feature set of the Loyalty Framework, as well as maintain/increment on top of the webmonetization-hooks library|
The Loyalty Framework has now been divided into two projects: Bandi Server and Bandi Admin (as mentioned in the previous section). Outside of some additional scope creep, most of this work is on track.
Bandi Server is in a mostly stable place and will be ready for an alpha release. This first iteration provides a service layer for the following resources:
- Auth: Actions for sign in/sign out and authorization flows.
- Users: Actions for managing users (used for authorization).
- Transactions: Actions for creating & reading transactions.
- Balances: Actions for managing user balances.
It also provides the ability to set up a websockets connection to more effectively handle the rate that web monetization events trigger. The alpha release will be an MVP for providing a working and deployable backend solution.
Bandi Admin is almost ready for an alpha release (I have projected timelines at the end of the report). This was not originally intended as an initial deliverable for the Loyalty Framework, but I've decided to increase prioritization for Bandi Admin due to the value I believe it brings to the group of projects.
A view of the Bandi Admin dashboard
A lot of the dashboard components have been designed & created (cards, tables, charts, etc). Many of the pages have been built out, including the sign-in/out authorization flow. All of the presentational elements have been mostly created, and there's final work being completed for hooking up the pages to read from the proper endpoints.
In the last report, I mentioned my key activities were the completion of the Loyalty Framework MVP, as well as continuing to maintain the
webmonetization-hooks library. I covered much of the progress on these libraries in the previous section, but I'll extrapolate on these further.
As mentioned in the previous section, Bandi Server is ready for an upcoming alpha release. This includes the full API I had planned for the original iteration of the project. I've tried to include some nice-to-have's for development, including a
docker-compose.yml file for spinning up the server, ORM, and a seeded database. The remaining work on Bandi Server is mostly quality-of-life items to provide a robust boilerplate requiring very little configuration to be a fully deployable solution.
webmonetization-hooks library has been completely recreated from the ground up, and now lives under a new name. Bandi Events is conceptually similar to the original library—the main difference from the previous iteration is it is now decoupled from any specific business logic (the previous version had included a bunch of logic based around a built-in levelling system). I wanted to make sure this would not be limited in the use cases it could support.
More changes include:
- Rewritten in TypeScript.
- Leaner, more stable API.
- 50% smaller bundle size.
You can download v0.2.0 from https://www.npmjs.com/package/bandi-events
Unfortunately I have not had the opportunity to market the work I've been doing (yet). However, I have started a blog where I intend to outline the work I've been doing on the Bandi project, interesting projects other people in the community have been working on, and web monetization in general.
I've also been hooking up the blog to be a live example of implementing the entire Bandi ecosystem—my plan is to award users special avatars based on their contributions. I've been documenting the steps I've taken, and will release a post outlining the process (as well as using this experience to produce better documentation/tutorials).
I have a post scheduled for release this week covering an introduction to web monetization, as well as a high-level overview of the Bandi project. This post is scheduled to be published on the 10th. I'm excited to help promote the exciting work happening in this space, and to help drive the technology further.
Even though the funded grant period is over, there's still a roadmap of milestones I have set for the rest of the year (and beyond). The next major milestone that should be completed within the next three weeks is the creation of a fully-featured rewards system on my blog. I'm currently in the process of hooking up the backend, and will have a post detailing the implementation process after its completed.
My next goal is to wrap up work on the Bandi Admin project. I've had some extra help from some additional developers to help push it forward, but it's still missing a number of features before it will be ready for general release. I estimate that it should be completed by late 2021 or early 2022.
Finally, I want to complete work on Bandi—the wrapper for bridging the events and server libraries together. I've lowered priority for this project as I've been focused on stabilizing the individual pieces. This work will also be completed by early 2022.
Because I've chosen to release the Bandi projects as open-source, I welcome and encourage the community to get involved. I'm also happy to have conversations with anyone who wants to expand on the project ideas. Feel free to reach out to me on Twitter: https://twitter.com/switchcasebreak
Thank you again to Grant for the Web. They're doing great work promoting the amazing technology behind web monetization, as well as highlighting the incredible projects coming out of the community. I've been following some of the projects other grantees are working on, and I'm constantly blown away by the level of creativity coming out of this amazing community. I'll continue to work towards providing value for this ecosystem, and I will forever be a proponent of this incredible technology.