Offline-first learning, in your pocket.
A bite-sized UX and UI learning app, built from zero as lead developer, with courses that download once and read without internet.
The abstract class that made offline data easy- ~300KLearnerssome time after going to production
- 80+Courses
- 4.7App Store rating
- 4Modulescourses, workshops, design challenges, mentor connect
Context
The founder of the company I was working at wanted a new product: a bite-sized way to learn UX and UI. A course is a run of about nine or ten topics, and each topic is a sequence of small cards, an illustration on top and a short piece of content below.
Courses were the core, but the product was bigger than courses. It also had workshops, design challenges and a way to connect with a mentor.
It was a product inside a larger company, and it started from a blank page. There was no legacy app, no existing codebase and no infrastructure to inherit.
- 01Courses
- 02Workshops
- 03Design challenges
- 04Mentor connect
- IllustrationSets the idea in one glance.
- Short contentA few lines: one idea per card.
- ProgressCards in a topic, topics in a course of nine or ten.
My role & the team
I was the lead developer and owned the architecture end to end: the app, the API, the database and all of DevOps. Two developers worked with me, one on the frontend and one on the backend.
My time went three ways: setting the direction for how the app and the API fit together, working with the team on the pieces that carried the most risk, and running everything around the code, from environments to releases.
We built everything from scratch, which meant the early decisions (framework, storage, payments) were ours to get right, and ours to live with.
React Native, after a Flutter proof of concept
We started with a proof of concept in Flutter. At the time its library ecosystem and community support were still thin, and a lot of what we needed would have meant building it ourselves.
The team already knew React, so we moved to React Native and spent our time on the product instead of the plumbing.
| Flutter (proof of concept) | React Native (chosen) | |
|---|---|---|
| Library & community support | Thinner; more to build ourselves | Broader support |
| Team familiarity | New to us | We already knew React |
| Outcome | Proof of concept only | Shipped |
Offline-first with Realm
The hardest requirement was offline reading. When a learner opens a course, it downloads into the app, and every topic and card has to be readable with no connection.
I solved it by putting a local database, Realm, inside the app. The app reads from the device; the network is only how a course gets onto the device.
Realm fit the shape of the problem. Courses, topics and cards are naturally objects with relationships, and Realm lets the app work with them directly in JavaScript, with fast queries over a large local dataset and live results that update the screen when stored data changes. A key-value store would have meant hand-building that structure and its queries, and SQLite would have meant a SQL and mapping layer inside the app.
The piece that made this practical day to day was a small abstract class in the API layer. Every API call inherited it, and it ran the same steps: check the local database and return what is there, call the API, update the local copy if the response is newer, then pass the fresh data to the screen.
Screens never had to care whether they were online. A new endpoint only had to describe what was specific to it: how to read its data locally, how to fetch it, and how to save it.
- 01Pick a courseLearner chooses what to download
- 02DownloadTopics and cards fetched once
- 03Store in RealmSaved on the device
- 04Read offlineCards render from local data
- 01Check localReturn saved data if there is any
- 02Call the APIAsk the server for the latest
- 03Update if changedSave the new data on the device
- 04Pass to screenHand fresh data to the component
// Every API call extends this and only describes what is specific to it.export class OfflineFirstRequest { readLocal() { throw new Error("not implemented"); } fetchRemote() { throw new Error("not implemented"); } writeLocal(data) { throw new Error("not implemented"); } isStale(local, remote) { return JSON.stringify(local) !== JSON.stringify(remote); } async load(onData) { const local = await this.readLocal(); if (local) onData(local); // 1. show what is already on the device try { const remote = await this.fetchRemote(); // 2. ask the API if (!local || this.isStale(local, remote)) { await this.writeLocal(remote); // 3. update the device copy onData(remote); // 4. hand the new data to the screen } } catch (error) { if (!local) throw error; // offline with nothing saved: let the screen know } }}A native in-app purchase module
Apple requires digital goods to be sold through its own in-app purchase, so a third-party payment provider wasn't an option. At the time, no library covered what we needed, so I wrote a native module that bridges Apple's payment flow into React Native.
The aim was to keep the bridge small. The JavaScript side exposed one promise-based call to start a purchase, so no screen needed to know anything about the native layer behind it.
import { NativeModules } from "react-native";// The native side talks to Apple; this is the JavaScript surface the app uses.const { Purchases } = NativeModules;export async function buy(productId) { const result = await Purchases.purchase(productId); return result;}Animations that don't stutter
The third hard problem was motion. Moving from one screen into the next, with a piece of the next screen already peeking into view, was one of the most challenging parts of the build, and it took a lot of effort to get right.
It came down to many rounds of building the transition, running it, and adjusting until it felt right. It is also the part of the app I would start earliest next time.
Architecture & infrastructure
The app is React Native with a custom UI. It talks to a Node.js and Express API backed by PostgreSQL. Content is managed in a CMS, errors go to Sentry, and Amplitude tells us how learners actually use the app.
I handled all of DevOps. UAT and production run on GCP, with the database hosted there too.
| Layer | Technology | Note |
|---|---|---|
| App | React Native, custom UI | Team already knew React |
| On-device data | Realm | Courses, topics and cards as objects, readable offline |
| Payments | Native in-app purchase module | Built in-house |
| API | Node.js, Express | JavaScript across the app and the API |
| Database | PostgreSQL | Relational data: courses, topics, cards. Hosted on GCP |
| Content | Zoho (CMS) | Content management |
| Errors | Sentry | Error tracking |
| Analytics | Amplitude | User behaviour and analytics |
| Hosting | GCP | UAT and production environments |
From CMS to production
Course content wasn't shipped inside app releases. It was written in the CMS and verified there by a content manager. Once it was approved, it was toggled for production, which kicked off the CI/CD pipeline and deployed the content live.
That gave the content team a real review step and a clear go-live moment, without needing a developer in the loop for every new course.
- 01AuthorWritten in the CMS
- 02VerifyReviewed by a content manager
- 03ToggleApproved and switched on for production
- 04CI/CDPipeline picks up the change
- 05LiveDeployed to production
Results
Some time after going to production, the app had around 300K learners and more than 80 courses, with a 4.7 rating on the App Store. It had also grown beyond courses into workshops, design challenges and mentor connections. A team of three built it from a blank page.
What I take from those numbers is that the foundations held: an app that reads without a connection, content that goes live through a review step, and a stack small enough for three people to run. That was enough to carry a product that kept growing.
What I'd do differently
Design offline into the data layer first. The abstract class in the API layer paid off because offline was part of how data moved, not something bolted onto screens. I would write that contract, and its tests, before the first screen, and reuse it on every project that needs to work without a connection.
Spike the motion early. Screen transitions were the problem I planned for least and struggled with most. Next time I would build the hardest transition in the first weeks, on a modest phone, before the designs harden around it.
Write the reason down when you decide. The choices held up: React Native, Realm, a native payment bridge. But the reasoning mostly lived in our heads. A short decision note per choice would have made onboarding easier, and made this write-up easier too.