You wake up, half a dream still in your head, and by the time you've made coffee it's gone. I'm building an app for that moment: you tell it the dream (typed or spoken), and it reads it the way an ancient Egyptian scribe might have, with a modern interpretation next to it and a real hieroglyph to remember it by.
The app is called Resut, from rswt, the Egyptian word for "dream". I'm building it alone, and I'm going to write about it here as I go: the decisions, the bugs, the tests, the money side. This first post is the map. Every later post goes deep on one piece.
What the app does
The core loop is small:
- The Oracle tab: describe last night's dream, or hold the mic and say it.
- A server asks an LLM for two readings: The Modern Scribe, a grounded psychological take, and The Ancient Omen, written like a line from a papyrus. It also picks a hieroglyph for the dream from a fixed list of real signs.
- The reading is saved automatically to the Temple Wall, a wall of glyphs with your dreams below it.
Around that: an Incubation tab (ask the night a question before sleeping, with ambient sound), and a Dream Book for subscribers, based on a real ancient Egyptian dream papyrus.
The business model is simple and strict: 2 free readings, ever, then a paywall ("Pharaoh": yearly, monthly, or a one-time Forever purchase), with a 7-day trial on the yearly plan only. Free readings get the Modern Scribe; the Ancient Omen stays sealed until you're Pharaoh. An account is optional and only exists to keep your dreams across devices.
It isn't in the stores yet. Google Play is being prepared, the App Store comes after.
The client: Expo SDK 58, plain JavaScript
"expo": "~58.0.26",
"react": "19.3.0",
"react-native": "0.88.1",
"@react-navigation/bottom-tabs": "^7.21.0",
"@react-navigation/native-stack": "^7.21.1",
"@supabase/supabase-js": "^2.119.2",
"react-native-purchases": "^11.0.2",
A few choices that surprise people:
-
Plain JavaScript. No
.tsx. I still runtsc --noEmitwithstrict: trueover the JS (JSDoc types where they matter), which catches a surprising amount without the ceremony. - React Navigation, not Expo Router. The app is four tabs plus two screens pushed on top. React Navigation was already there from the first prototype and has never been in the way.
-
Three typefaces and one hieroglyph font, loaded with
useFontsfrom the@expo-google-fontspackages: Cinzel for titles, Cormorant Garamond for the readings, Inter for the interface, and Noto Sans Egyptian Hieroglyphs for the signs.
App.js is mostly a provider tree. The order matters: the theme comes first so even the loading screen is the right colour, then auth, then app state, then the soft prompts (reminder, email).
export default function App() {
return (
<ThemeProvider>
<ThemedApp />
</ThemeProvider>
);
}
// inside ThemedApp, once fonts and the Appearance setting are ready:
<SafeAreaProvider style={{ backgroundColor: colors.bg }}>
<AuthProvider>
<AppProvider>
<PromptsProvider>
<StatusBar style={scheme === 'dark' ? 'light' : 'dark'} />
<Root />
</PromptsProvider>
</AppProvider>
</AuthProvider>
</SafeAreaProvider>
Until the fonts load, the app renders a plain view in the background colour of the current mode, so there's never a white flash before a dark screen. If the fonts fail, it carries on with system fonts rather than blocking.
Navigation: tabs, and a reading pushed on top
<Stack.Navigator screenOptions={{ headerShown: false, contentStyle: { backgroundColor: colors.bg } }}>
<Stack.Screen name="Main" component={Tabs} />
<Stack.Screen name="Revelation" component={RevelationScreen} options={{ title: 'The Revelation' }} />
<Stack.Screen name="Sanctum" component={SanctumScreen} options={{ title: 'The Sanctum' }} />
</Stack.Navigator>
Main holds the four tabs (Oracle, Temple Wall, Incubation, Pharaoh). The reading itself, The Revelation, is pushed over them when the Oracle has spoken. Settings (The Sanctum) are a stack card too, not a native modal, for a reason I learned the hard way: the paywall and the bottom sheets are React Native <Modal>s mounted at the root, and on iOS a root modal can't be presented over a natively presented screen.
The server: one Supabase Edge Function
All the sensitive work happens in a single Supabase Edge Function called oracle. One URL, POST only, and an action field picks what to do:
switch (body.action) {
case 'status':
return await status(seeker);
case 'interpret':
return await interpret(req, seeker, body.dream, body.question);
case 'omen':
return await revealOmen(seeker, body.readingId);
case 'transcribe':
return await transcribe(req, seeker, body.audio, body.mimeType);
// ...track, subscribe_email, register_push, link_device,
// delete_my_data, delete_account
}
The function holds the OpenAI key, checks the subscription with RevenueCat's REST API, counts free readings in Postgres and decides whether the Ancient Omen is sent or kept sealed. The app never sees a secret.
Postgres has grown through five migrations so far: readings, transcriptions, funnel events / email sign-ups / push tokens, accounts and saved dreams, and a quota key that makes free readings survive a reinstall. Tables only the function touches have row level security on and every grant revoked from anon and authenticated; the one table the app talks to directly (saved dreams of signed-in users) has policies that limit each user to their own rows.
Accounts use Supabase Auth: Sign in with Apple, Google through Supabase's browser OAuth, and a 6-digit email code. Optional, never required to read a dream.
AI: OpenAI, only on the server
Readings use gpt-4o-mini by default, set by an environment variable so I can try other models without shipping an app update. Voice uses gpt-4o-mini-transcribe. The model answers in JSON with three keys, and the server validates every one before anything reaches the phone. Dream text is never logged and never stored by the function.
Money: RevenueCat
react-native-purchases handles the stores. Every product (monthly, yearly, lifetime) unlocks one entitlement, pharaoh_pass. The app reads it to update the UI, but the decision that matters (send the Omen or not, allow another reading or not) is made on the server, which asks RevenueCat itself.
Shipping: EAS Build and EAS Update
Three build profiles in eas.json: development (dev client, internal APK), preview (internal APK) and production (app bundle, auto-incremented version code). The two internal profiles build for arm64-v8a only, which keeps the APKs small and the builds faster, since every phone I test on is arm64.
"runtimeVersion": { "policy": "fingerprint" }
Each profile has its own update channel, and the runtime version comes from a fingerprint of the native project, so a JavaScript-only change (new copy, a new sound, a screen tweak) can reach phones through EAS Update without a store build, and a change that touches native code can't be pushed to a binary that doesn't have it.
Tests: just node --test
"test": "node --disable-warning=MODULE_TYPELESS_PACKAGE_JSON --test test/*.test.mjs"
No Jest, no extra test dependencies. The logic that matters (sync rules, the hieroglyph vocabulary, the palettes and their contrast ratios, the Dream Book's content rules) lives in plain modules with no React Native import, so Node can run it directly. Right now that's 118 tests in about ten seconds on my machine.
How I'm building it
Most of the code is written by an AI coding agent from task prompts I write in detail: where things stand, what to build, what's out of scope, a definition of done. I review, test on a real Android phone, and push. The prompts live in the repo, and I'll show some of them later in the series.
What's coming
The next posts, roughly in order:
- moving the OpenAI call off the phone and into the Edge Function;
- getting JSON you can trust out of an LLM;
- voice input with
expo-audio; - rendering real hieroglyphs, and keeping one vocabulary in sync between app and server;
- testing an Expo app with nothing but Node;
- light and dark mode built on tokens;
- how I write prompts for the coding agent.
Then, in the new year: accounts and offline-first sync, the paywall and the trial, sound, motion, and shipping.
If there's a part of this stack you want me to go deeper on, tell me in the comments.
Resut is the dream app I'm building in public.
Top comments (1)
Love the Temple Wall idea, and writing the build up in public. Two Play-specific things that are easy to hit since Play is next for you: if the developer account is a personal one created after November 2023, Google needs a closed test with 12+ testers opted in for 14 days before production unlocks, so it's worth starting that early. And for RevenueCat on Android, add yourself under License testing in Play Console so you can run the paywall and the Forever purchase without being charged. Looking forward to the next post in the series.