DEV Community

Cover image for Building Share Pray with Kotlin Multiplatform, from client to server
Arsenii Lisunov
Arsenii Lisunov

Posted on

Building Share Pray with Kotlin Multiplatform, from client to server

I want to write down how I built Share Pray, an app where people can share prayer requests and pray for each other in groups. I built it alone using AI, and I used Kotlin Multiplatform for pretty much everything, not just the mobile client but the backend too. This is the story of how that went, what worked, and what didn't.

Login screen

Why Kotlin Multiplatform

I didn't want to write the same logic twice for iOS and Android. I had experience with a few multiplatform frameworks before, Flutter among them, but I mostly code in Kotlin, so KMP was the natural fit. The nice part is that the Android code is just regular Kotlin/JVM, nothing foreign about it, and the iOS side compiles through Kotlin/Native into real native binaries too. The only place you trade off some native feel is the UI if you use Compose Multiplatform, since it renders through its own engine instead of native UIKit widgets on iOS, similar to how Flutter does it. But that's a small price for not writing the same logic twice. And I wanted to keep writing Kotlin. So Compose Multiplatform for the UI and a shared core for the business logic were my choice.

What surprised me is how far I could push the "shared" part. It's not just some utility functions or data models. Groups logic, filtering, the admin panel's data layer, and the RevenueCat integration for in-app purchases all live in one shared module. Even the server is written in Kotlin, so a lot of the same models and validation logic get reused there too. iOS, Android, and the backend, all talking the same language, literally.

Feed iOS

Feed Android

What the app actually does

Share Pray lets people post their prayers to the public. Or create and join groups, then post prayer requests inside those groups. Other members can participate by adding the prayer to their praying list (and the author of the prayer will see the amount of people who pray for them). Author can answer the prayer when it was fulfilled and the answered prayer will still be shown for some time so everybody who was praying for that will see the results of their praying. For the groups - communities - users have a choice to post the prayer publicly visible, visible only inside the community they are in or have a private prayer that only the author sees.

Favorite prayers

My prayers

Every user is allowed to create up to 5 communities and participate in other's communities. Those are to have a smaller groups of people who know each other better and would like to share their needs with each other to give and have support inside these circles of users.

Communities management

The prayers also have tags for a better filtering of the feed to search for the prayers one would like to pray for, and to filter the prayers by the community.

Prayer tags

There's also an admin panel, the app has a feedback functionality, prayer reporting and admin panel helps the moderator to keep the quality of the application up. Hiding the spam prayers, banning toxic people, react to feedbacks and reports.

I've also added a Telegram integration, so urgent events - feedback, report, etc. - are sent to the bot chat with the moderator to speped up the reaction to unwanted content.

Monetization is handled through RevenueCat, which made the in-app purchase side a lot less painful than doing StoreKit and Google Billing separately and trying to keep them in sync.

RevenueCat paywall

The hard parts

Auth was probably the trickiest bit. Getting Google Sign-In and Sign in with Apple working consistently across a shared KMP core, with proper token validation and account linking on the backend, took longer than I expected. Each platform has its own quirks around how the native sign-in flow hands off to your code, and Apple has its own compliance requirements you have to get right or your app gets rejected. Also IAP integration was harder than I expected, while still easier to do with RevenueCat than doing it manually for two platforms and syncing it.

Notifications and the Telegram integration also needed some platform-specific glue, since that's not something you can fully share, but the core logic of what triggers a notification and what message gets sent is shared.

Where things stand right now

iOS is live in the App Store. Android is currently in open testing on Google Play, full release should follow soon. I'm building this for Shipaton 2026, RevenueCat's hackathon, so there's a bit of a deadline pushing things along, which honestly helped me actually ship instead of polishing forever.

Open sourcing the reusable parts

A good chunk of what I built for Share Pray isn't really specific to a prayer app. Groups, an admin panel, filtering, wiring up RevenueCat for purchases, that's stuff a lot of apps need. So I went through the codebase, stripped out the app specific parts, and put together an open source template on GitHub with that scaffolding. If you're starting a KMP project and want a base with groups and purchases, posts and comments, likes and tags and many more already wired up, feel free to use it or just look through it for reference. There is a lot of documentation for both developers and AI to be able to pick up the pace and bring your app closer to the production.

Repo: https://github.com/NonGrate/Poster

Try it out

App Store: https://apps.apple.com/us/app/share-pray-pray-together/id6808700440
Google Play (open testing): https://play.google.com/store/apps/details?id=kg.nongrate.sharepray

If you're building something similar or have run into the same auth or IAP headaches on KMP, I'd like to hear about it. Happy to answer questions about any part of the setup.

Top comments (0)