Felt
An AI journaling and wellbeing app on the App Store, rated 4.4 stars. I rebuilt it from scratch, A/B tested it against the old version, and worked on the parts that let an app with no accounts safely run a paid AI: App Attest identity, server-owned credits and streamed chat.
- Role
- iOS Engineer, part-time contract
- When
- May 2024 to Jun 2026
- Stack
- Swift · SwiftUI · SQLite · Firebase · RevenueCat · Azure
- Result
- Full rewrite, A/B tested · 4.4★ on the App Store
No accounts, a paid AI, and content that works offline
Felt is an AI journaling and wellbeing app on the App Store, rated 4.4 stars. It has swipeable affirmations with themed backgrounds, daily reminders, and an AI companion called Mentora for chatting and journaling, paid for through subscriptions.
I worked on it as a part-time iOS engineer from May 2024 to June 2026. The biggest thing I did was rebuild the current app from scratch. We did not just swap it in: we ran the new version against the old one as an A/B test in Firebase, and only removed the old version once the results said the new one was better.
One constraint shaped everything: nobody has to create an account. Every user is anonymous, and every AI response still costs money that has to be metered and protected from abuse.
Metering an AI for people you cannot identify
The app had to give an anonymous person personal affirmations and an AI companion, charge per use, and resist API abuse, all without a login screen. In practice that meant four things:
- Identity without accounts. A device-bound ID, established through Apple App Attest and a Firebase anonymous token. Credits, conversations, goals and the calendar all hang off that ID.
- A ledger the client cannot fake. AI responses cost real money, so the server has to own the balance.
- Chat that feels alive. Token-by-token streaming, while the same connection also carries credit updates and other state.
- Content without a network. Affirmations have to open instantly, even offline.
One door for HTTP, one for identity
A SwiftUI app plus a widget extension. Everything past the screen goes through a few services, and everything past the device goes to Azure.
Views never build URLs. They go through view models to repositories and services, and all HTTP goes through one APIEndpoint enum and one NetworkService. There are two deliberate exceptions: chat streaming over SSE has its own handler, and audio upload for transcription is multipart. Affirmation text never touches the network. It ships as bundled SQLite databases, one per language, copied into Documents on first launch. The AI companion keeps its long-term memory in on-device SQLite too, so it remembers context across sessions.
Sending a message to Mentora shows how it fits together. The view model calls the SSE handler with the Firebase token, the device ID from the Keychain, and a pro-status header from RevenueCat. The server streams back text deltas, and the same stream also carries credit balance, gifted credits, emotion state and suggested follow-ups. Running out of credits returns a 403 that goes straight to the paywall.
What we chose, and what we paid for it
Rewrite, then prove it with an A/B test
We did not have to trust our own opinion about the new app. Real users decided, through Firebase, before the old version was removed.
Two versions to support while the test ran, and the patience to wait for results instead of shipping the rewrite on day one.
Anonymous device identity instead of accounts
No login, onboarding that starts the second the app opens, and a hardware-backed signal against abuse.
No cross-device sync and no account recovery. Lose the device or its Keychain, and the history goes with it.
Server-owned credits
The server holds the ledger and the balance arrives on every streamed chunk, so the client never has to guess.
Every chat request depends on the backend agreeing with the subscription state, so that reconciliation has to be right.
Configuration from Firebase Remote Config
Base URL, model name, paywall grouping and about thirty other flags change without an App Store release.
More moving parts at launch, and every flag needs a safe default inside the app for when Remote Config does not load.
Bundled SQLite for affirmations
Browsing works offline and instantly. The network is only for themes, AI and the rest.
New content means a new build, which is fine for content this stable.
Where it pushed back
An attestation retry loop
A temporary network error during App Attest could, in a naive version, cause endless re-registration. The attestation service now looks at the specific error: network or verification failures reuse the stored device ID, and only a missing key or a bad challenge triggers registration again. Parallel calls share one in-flight task instead of each starting their own.
A celebration that fired twice
The server reports gifted credits twice in the same stream: once early and once in the completion event. The first version showed the toast twice for one gift. A small per-stream guard fixed it.
A SwiftUI layout loop
Geometry and preference updates in the calendar and chat screens were reacting to their own output, so layout kept recalculating instead of settling. It is invisible in code review and obvious the moment you watch the frame rate.
What shipped
What I would do first next time
- One place for auth headers pays off. Past 25 endpoints, having one enum and one service build the token, device ID and pro header was worth it. SSE and multipart upload show where one abstraction stops fitting, and that is fine.
- On a metered AI product, identity and cost come before UX. Attestation and the credits ledger had to exist before chat could ship at all.
- Test the risky paths first. Attestation, credit accounting and SSE parsing are where I would put unit tests before anything else. Bugs there turned into same-day fixes more than once.