Monolith for mobile: how can you do offline functionality?

I’m working on a mature Rails app with a tiny staff but plenty of users, for recording nature observations. I’m considering strategies for a mobile app.

We’ve done a lot of work to bring the Rails codebase up to 7, and I’m working through implementing Turbo and Stimulus at the moment. I’m really intrigued by the “majestic monolith” approach, and the possibilities of a single codebase for both web and mobile.

But our mobile app needs to be able to save formatted text / photo records to local storage when there’s no connectivity, because it’s often used in areas where people are offline because there’s no signal.

I don’t write native mobile code (yet) so forgive the naivety of the question, but…conceptually, how would that work with a monolith? It seems like it would need some mobile-OS-native components, to be able to work offline.

Is that what Strada’s about? …or Turbo Native?

I haven’t used Hotwire that much for mobile apps development, but I’m actively researching this topic, because my team wants to build one.

I’ve found a discussion in issues to hotwired/turbo-ios about bringing the offline behaviour to turbo native app. It has some responses from Jay Ohms, a guy who leads the mobile team at 37signals. He shared some info on how they achieved offline support on mobile client for Hey.

Here’s the link:

imho, seems too complicated for a small team.

Thank you @yemchenko. Very interesting.

It does seem like using native elements could provide the HTML the app needs to show offline forms. The proxy strategy for iOS is interesting. Does seem a bit complicated.