DEV Community

Alexey
Alexey

Posted on • Edited on

2 2

Webapps need app-like monetization

I wrote my first iOS app in 2010 while still in college - it was a zynga-style social RPG called Shovel Heroes.

The app store was a beautiful innovation: a new way to distribute software in the age of internet. One important part of the innovation was monetization built into the ecosystem - since Apple keeps the credit card tied to the device.

The app store unleashed an explosion of applications, because seamless distribution on a monetizable channel created the financial incentive, entirely new opportunities.

However, Apple has treated developers terribly with fees, gatekeeping, lack of support, poor documentation, and lackluster tooling.

Developing apps has always been expensive and laborious, and sadly native development has only gotten worse over time: XCode overheats my $4000 M1 Pro Max laptop after just 15 minutes, causing glitchy/laggy performance of the entire handheld supercomputer.

Recently, I built Spicebreaker - at first as a native app built with React Native, but eventually I re-wrote from scratch on the web.

The main punchline of this post is that payments, identity, and distribution are the major advantages of the app store over the web as a publishing platform, and that crypto wallets have the potential to solve for two of those problems on the web. If you wish, skip through the dev story and check out the UX crypto enables.

Pivoting from native mobile app to web

Much of what I say here primarily affects indie developers - large companies still suffer, but they have the budget to power through it.

On a limited budget, a cross-platform solution is that much more desirable.

I wrote a prototype in React Native on a weekend, and wrote a content management system on another weekend, which my wife used to lead the content creation. It took a few months to playtest it, iterate on the core concepts. After maybe 6 months it was ready to launch on mobile, perhaps needing a few finishing touches.

I thought it was one a finish line to launch, but ultimately I abandoned the React Native project and launched on web.

Issues with iOS

I've worked with many developer tools in my career: Sublime, Eclipse, Visual Studio, Vim, Jetbrains/IntelliJ, VSCode, Ruby Mine, even BorlandC++/BorlandPascal, Delphi, Notepad++... XCode is the absolute worst developer tool I have ever worked with. Sorry. Not sorry.

I've squandered hundreds of precious hours of my life dealing with arcane XCode issues throughout my career. There's no real understanding/pattern or depth behind dealing with them, and support is close to non-existent.

One example during Spicebreaker's development was the pain of updating the SQLite database with my questions. It's just a file - I expected to override it, and have the app pick up the new version, but it doesn't work that way.

I tried various solutions, including deleting the database before loading it - but not even that worked to reset the cache. After wasting more hours than it took to build the prototype, I settled on renaming the database file each time I update it.

The key point I want to drive home is not this specific minor issue, but that hundreds of little issues like this slow down development and drain the joy from making apps.

At a certain point, I bought a new M1 laptop (my old Mac Pro had developed debilitating overheating issues). XCode and iOS are famous for incompatibility issues, and sure enough my build broke with arcane inexplicable errors. I had to start a fresh app, and slowly carry over features from the old app, over 3 days on Christmas break - which had meant a 9 month pause on any development progress since the app wasn't building.

Apple's corporate attitude towards developers

I tried to register a special email for Spicebreaker's Apple developer account. Apple rejected every credit card my wife and I put into the registration. It took days to even reach a rejection, and support had nothing to offer us in help. We ended up using my wife's personal Apple account for the developer program.

Publishing a Beta on TestFlight requires a review/approval from Apple, and my first review failed with no note. How is that even possible? This is a Beta, not a release. Why do I need review?

Last straw

So in these 2 years the Epic vs Apple trial had unraveled. And one of the big arguments Apple made was that they are owed the 30% commission because they provide highly valuable tools to developers.

Given the above rants, I hope my passionately violent gut reaction can be understood through a rational lens.

I would pay lots and lots of money to not have to deal with their developer tools. I would pay a different app store 50% commission if only I got to not have to deal with XCode, TestFlight, the Apple Developer Program, and their review process. Apple fights vigorously against the possibility, though - obviously they are in no shape to compete.

I needed a website to promote the app. I started up a basic Express+NextJS server, and... re-built the entire game, designs included, in a day or two on a weekend. Oh, and by the way, I no longer have to deal with any of those SQLite issues - because I'm directly connected to my database by default. No build issues. No deploy issues. No issues publishing a Beta, no issues sharing the game with my friends. Christ almighty, what a breath of fresh air.

I just want to reiterate that these considerations become maximally important with a constrained budget, though arguably cheaper is always better as long as quality isn't compromised.

Switching to web

The pivot to web made me reflect on what pushed me to write an app in the first place.

Mobile apps have done very well in monetization. Mobile has nearly eliminated the friction of payments: on both the app store and inside apps, payments are just a few interactions away.

So what's the problem on the web? There's Stripe, PayPal - I can ~easily integrate payments. Why is the web an inferior payment platform for applications like Spicebreaker?

Payments and identity

The friction of payments on the web is identity.

Physical goods don't require a digital identity per se - but you'd need to put in your address each time you make a purchase without one.

Digital goods, on the other hand, absolutely require a digital identity, since their ownership is impossible otherwise. They represent most purchases on the app store: content subscriptions, in-game currency, unlockable features.

Spicebreaker sells packs of questions, i.e. digital content; to prove you've made a purchase and claim that digital content a year later on a different device, you need to be able to authenticate with a repeatable credential.

The need to set up those repeatable credentials creates the crux of the friction.

Identity on the web

The problem

Modern mobile devices provide identity by default: e.g. Apple ID or Google Account. That identity is shared by all apps, e.g. in-app purchases are tied to your Apple ID on iOS, and can be recovered when switching devices. The key is that the setup is done just once - when setting up the phone - and then consumed by all apps.

The web does not provide a cohesive identity platform: each account-based website is ignorant of your login information on other websites. This is by design, of course. OAuth is the strongest modern solution to the problem, but the experience of OAuth + Payment is not nearly as seamless as platform-based payment identity. OAuth also forces you to reveal your web activity to OAuth providers.

Today, browser-based web identity does not yet exist. Until recently, the only way to purchase digital goods on the web and retain ownership was to (ugh) Register an Account. This enormous friction is a major reason the web has not yet become a vibrant app publishing platform the way the app store is.

The solution

There already exists a technology that links identity and payments on the web that can act as a platform for applications: web3 wallet plugins. Wallet plugins need to be set up once per browser, and can unify identity across web sites via public keys (and private key signatures verifying ownership of those public keys).

If that sounds complicated, please check out the login flow on Spicebreaker. The UX itself is dead simple (that's the whole point):

  1. Click a button to begin sign in process with Phantom
  2. Click "Approve" inside of a Phantom Wallet popup

Image description
Image description

There are also more technical details below.

The purchase is done via USDC, so it's always $10. The purchase is a 3-step experience:

  1. Connect Phantom Wallet
  2. Click "Purchase"
  3. Confirm payment in Phantom Wallet popup

Here's what it looks like:
Image description
Image description
Image description

The reason I chose Phantom wallet for this technical experiment is that the Solana blockchain facilitates extremely low fees (fractions of a cent). There are certainly alternatives out there (e.g. Polygon), and I look forward to trying them out in the future.

Low fees are extremely important for an application whose most expensive purchase is $10. Ethereum gas fees ($3-$100) are exorbitantly high for in-app purchase applications.

Technical details

How does the web3 identity/purchase solution work, exactly?

The gist of it is that a purchase is tied to a public key, and access is authenticated via a private key signature - the same way blockchains authorize transactions, except done on top of a traditional centralized database application.

A wallet is able to issue signatures and share the public key. So the mechanism is as follows:

  1. The front end requests authentication for a public key via an API call
  2. The API call returns some random string of data
  3. The wallet issues a signature for that random string of data
  4. The front end resolves authentication by providing the signature via an API call
  5. If the signature is correct, the backend issues a session for the front end

A purchase is automatically tied to a public key, since every transaction sent to the blockchain contains information on which public key triggered it - so without any extra effort the purchase is tied to your identity, and you are able to prove your identity as long as you have the corresponding private key. Which you absolutely should always have if that's where your money is stored.

Distribution

Perhaps crypto wallets can solve identity and payments, but what about distribution - the third pillar of the App Store?

It's great to be promoted by the app store - winning a top award is a sure way to get millions of users.

The web doesn't have a single natural distribution platform. The distribution platforms of the web are SEO, social networks, bloggers, influencers etc.

There's no one way to play growth... but perhaps winning on the App Store is not easier than winning on a web distribution platform!

Harsh modern reality

Web3 and crypto are not mainstream.

I was extremely happy to imagine (and implement) a future with web payments as seamless as on the app store.

Today, the harsh reality is that a mass audience is not going to pay that way. So ultimately, Spicebreaker supports creating accounts via email, and paying with PayPal. I don't collect any personal info, and don't store passwords - the email sends a one-time code each login attempt, which I find much more usable than passwords. I'll eventually add various OAuth providers to also help with sign-up friction.

The UX isn't terrible, but it's nothing like the single-click seamless experience with wallets, or with in-app purchases.

There are many advances in the space. Brave browser is pioneering work on becoming a browser-based identity and payments platform, and they are getting traction with users. Even Chrome now supports identity in the browser - though it's to your Google Account, which these days is one of the least private types of accounts you can link to an application. Would you want Google to know what purchases you make on every web page?

In that world, as an indie developer, I would realistically integrate with the most used and least friction-prone payments platforms on the web; I'd grind my teeth but integrate with Google - so true privacy may be a luxury until crypto is adopted in the mainstream.

My hope is that web3 authentication and payments do become more mainstream, and wallets dominate web payments. That way, independent developers like myself can publish to an open, privacy-respecting, universally accessible platform, where we can use the best developer tools in existence: the web.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay