Inspiration
Sometimes having to download an app just for todo list or just for calorie tracking is too much work or not really needed. So why have a whole new app for it? Or why have to download another app wait till it downloads then try it and not like it then have to keep doing this over and over when I can just quickly make a very compact one and edit to my liking?
von mini is my attempt at fixing that. It's a one-sentence app builder, and the apps it builds are built in cloud or local. You can edit and make almost any app or game! No more needing to download a bunch of separate apps we can do them all with Von.
What it does
You type or say one sentence, like "a journal that tags my mood" or "help me practice tough interview questions out loud", and von mini builds a working app in a few seconds. You watch it come together in a live preview, and it's saved on your device and usable right away.
- Build. Online, the build prompt goes to Gemini in the cloud with Nano as the fallback (
PREFER_IN_CLOUD). In Private mode or with no network it'sONLY_ON_DEVICE, so Gemini Nano designs the app on the phone. - Use. The AI features inside a built app (summarize this entry, suggest a mood tag, rewrite this message) run
PREFER_ON_DEVICE. Entries go to local storage. All of it works in airplane mode. - Edit. This is where most of my time went. You can tap any block in the preview and edit it in an inspector, use quick-edit chips ("Rename app", "Add a field", "Change accent"), or just type what you want changed ("add a field for how much sleep I got"). The model patches the existing app instead of regenerating it, so your layout and saved entries survive. Every change gets a plain-English summary and goes into a version history you can restore from with one tap.
- Talk to it. Voice is three on-device steps chained together: the platform speech recognizer, Gemini Nano (streamed through Firebase AI Logic), and the device's own text-to-speech, spoken a sentence at a time while Nano is still writing. Ask for an interview practice app and you get a spoken mock interview that asks you a hard question, listens to your answer, gives feedback and moves on. It works in airplane mode.
- Reminders. Apps can schedule local daily notifications ("Log what you ate" at 8:00, 13:00 and 19:00). No server involved.
- Nine ready-made apps ship with it (Interview Coach, Mood Journal, Tone Fixer, Meeting Notes, Flashcards, Habit Tracker, Expense Notes, Recipe Scaler, Workout Log), so you can try everything before building anything.
- Sharing. One tap publishes an app's design (never your entries) as a link. Whoever opens it gets a copy that runs its AI on their device.
- Make it custom ✨ (online only) asks cloud Gemini for a fully custom HTML version of an app. It runs in a sandbox, and its AI calls still go through Firebase AI Logic on-device.
Every AI response has a 📱 On-device or ☁️ Cloud badge, and the status bar shows which Nano build is actually loaded. I wanted the hybrid part to be something you can see.
It also has a comic-book look (ink outlines, halftone dots, speech balloons for chat) with light and dark themes, because a tool for making little apps should be fun to use.
How I built it
Hybrid inference is the core of the architecture. A small router (src/ai/hybrid.ts) picks an InferenceMode for each task based on connectivity and the user's privacy setting, and every call reports back its InferenceSource, which the UI shows.
| Task | Online | Offline / Private |
|---|---|---|
| Build an app | PREFER_IN_CLOUD |
ONLY_ON_DEVICE |
| Edit an app by chat | PREFER_ON_DEVICE |
ONLY_ON_DEVICE |
| AI features inside an app | PREFER_ON_DEVICE |
ONLY_ON_DEVICE |
| Make it custom ✨ | ONLY_IN_CLOUD |
unavailable (and labeled that way) |
Two platforms, one SDK.
- Android: an Expo native module (
modules/nano-bridge, Kotlin) wraps the Firebase AI Logic Android SDK (firebase-ai+firebase-ai-ondevice) and passesOnDeviceConfig(InferenceMode)with every request. On-device requests run on Gemini Nano 4 through AICore, and responses stream back to JS as events. - Web (Chrome):
src/ai/engine.web.tsuses the Firebase JS SDK'sgetGenerativeModel(ai, { mode, inCloudParams, onDeviceParams }), with on-device requests served by Chrome's built-in Gemini Nano, warmed up on first interaction and streamed withgenerateContentStream. - Both share the same router, prompts, validators and UI.
Gemini Nano 4, explicitly. The Nano build is picked at runtime: nano-v4-full (PREVIEW), nano-v4-fast (PREVIEW_FAST), or STABLE. The app reports what the runtime actually loaded instead of assuming.
Apps are JSON, not code. Nano is bad at writing whole working HTML/JS apps and good at structured output. So von mini asks for an app spec: a short JSON description of a screen built from prebuilt blocks. The spec is validated and repaired before it's rendered by native components, and diffed to produce the change summaries. This is the reason offline app building actually works instead of working once in a demo.
Edits are patches. Since everything is a spec, an edit is a structured diff against a known schema. Deterministic edits (rename, add a field, reorder, restyle) are pure functions, so they're instant and offline. The model only handles changes that are expressed in words.
The rest of Firebase, where it made sense:
- App Check on every AI request (debug provider on Android, reCAPTCHA Enterprise on web).
- Remote Config lets me change the hybrid strategy without a release: swap the cloud model, move app design from
PREFER_IN_CLOUDtoPREFER_ON_DEVICEto cut cost, add design rules, or turn off voice or sharing. Bundled defaults keep it identical offline. - Anonymous Auth + Firestore power sharing only. Firestore stores the app design, never entries or chats, under rules that allow opening by link but not listing, and only the owner can change it.
The Android APK is built on EAS and published as a GitHub Release, and JS fixes go out over the air with EAS Update.
Challenges I ran into
- Getting a small model to be reliable. My first version asked Nano for HTML. It produced something plausible and broken almost every time. Switching to a validated JSON spec, with
responseConstraintstructured output and a repair pass, is what got it from "usually works" to "works". - Making edits feel instant. Regenerating on every tweak lost data, shuffled the layout and took seconds. Splitting edits into deterministic patches and model patches fixed the speed and the trust problem at the same time.
- A model that isn't ready yet. Chrome can expose the Prompt API while Nano is still downloading. At one point the UI said "On-device AI unavailable" right next to "Loaded: Gemini Nano", because the status banner and the request path were reading different engines. Now they read the same one and only show a model name once
availability()says it's usable. - Not trusting my memory of the APIs. The SDKs are new and changing fast, so I checked the Android API surface with
javapagainst the pinned AARs (firebase-ai18.1.0 /firebase-ai-ondevice16.0.0-beta07) and drove the web UI in a real Chromium with a screenshot harness. That caught a nested-button React error, white text on a pale gradient stop, and an inspector panel rendering below the fold.
Accomplishments that I'm proud of
- It builds apps offline, on the device, and they work.
- Editing is genuinely better than regenerating: tap to select, chips, natural-language patches, a "what changed" summary, and restorable history. All offline.
- Two platforms on one hybrid SDK, with the inference route visible on every response.
- The preview stays fast as data grows: rendering a saved-entry list goes from 715 ms at 0 entries to 757 ms at 2,000, because it only renders a 25-entry window.
What I learned
- On-device isn't the cheap version of the cloud. It's a different deal with the user. Once the model is on the phone, offline and privacy stop being features you bolt on and become defaults you have to design around.
- Constraining the model's output is a product decision as much as an engineering one. The JSON spec is why the offline path can be trusted.
- A hybrid app should be upfront about which half answered. Putting the inference source on every response ended up shaping the whole UI.
What's next for von mini
- iOS. The router is already platform-agnostic. What's missing is a Swift bridge to Apple Foundation Models through Firebase AI Logic, which would make it a three-platform app.
- More blocks like charts, timers and photo attachments, plus per-app prompt tuning so Nano handles longer specs.
- On-device embeddings, so you can search everything you've written across all your apps without any of it leaving the phone.
Try it
- Android APK: https://github.com/JorgeOchoaReyes/von_mini/releases/latest/download/von-mini.apk
- Code (Apache-2.0): https://github.com/JorgeOchoaReyes/von_mini
- Web: clone the repo, set
EXPO_PUBLIC_ON_DEVICE_ONLY=truein.env.local, and runnpm run webin desktop Chrome. No Firebase project needed for the on-device path.
Built With
- android
- chrome
- eas
- expo.io
- firebase
- firebase-ai-logic
- firebase-app-check
- firebase-authentication
- firebase-remote-config
- firestore
- gemini
- gemini-nano
- kotlin
- react-native
- typescript

