Disclaimer: much of this code was generated using LLMs, however some basic QA was performed by a human.
Known issues: RAG and attachment uploads don't currently work, but completions and STT do work.
Tech demo app for:
- React Native (Expo)
- Supabase Auth + Storage
- Cactus on-device inference (LLM + STT)
- PowerSync React Native SDK
- PowerSync Attachments
Home: sync status and cumulative cost-savings estimates.Transcription: on-device STT with run metrics stored in PowerSync.RAG: local document corpus, on-device embeddings/retrieval, local answer generation.Attachments: PowerSync attachment queue + Supabase Storage bucketfiles.Offline: forced offline mode, queued local writes, pending CRUD count.
-
Ensure
.env.localcontains:POWERSYNC_URLSUPABASE_URLSUPABASE_ANON_KEYCACTUS_API_KEY(optional)
-
Apply Supabase schema:
- Run supabase/schema.sql.
-
Install dependencies:
pnpm install- Start Expo:
pnpm startFor native modules (cactus-react-native, @journeyapps/react-native-quick-sqlite), use a dev build (expo run:ios / expo run:android) rather than Expo Go.
- PowerSync package dependencies are currently linked from local SDK paths in
package.json. - Cost values are estimated model numbers for demo visualization only.
- Attachment metadata is tracked in
demo_files; file blobs are stored in Supabase Storage bucketfiles.