Team Member: Greg Mousseau
Tree of Trust is a mobile application that creates a safe, private space for personal reflection and AI-powered conversation by running Google's Gemma 3N model directly on the user's device. In an era where online data is perpetually at risk, our solution ensures that a user's thoughts and queries are protected, with roots firmly planted in on-device processing.
Your thoughts never leave your phone. Period.
- 100% on-device inference using Gemma 3N
- No internet connection required after initial setup
- No cloud APIs, no data collection, no telemetry
- Chat history stored locally with user control
Online, privacy is an illusion. Every major tech company has suffered massive data breaches. Users are justifiably wary of sharing sensitive information with cloud-based AI systems. This fear creates a significant barrier to using AI for personal, meaningful tasks like mental health support, journaling, or creative brainstorming.
Tree of Trust provides a sanctuary for private thoughts:
- Therapeutic AI Companion — Empathetic, supportive conversations
- 100% Offline — Works without internet after model is loaded
- User-Controlled Data — Clear your history anytime
- Beautiful UX — Calm, focused interface designed for reflection
- Framework: React Native + Expo
- AI Model: Google Gemma 3N (2.9GB, int4 quantized)
- Inference: MediaPipe LLM via
react-native-llm-mediapipe - State: Zustand with AsyncStorage persistence
- Build: EAS Build (cloud) for bundling large model
- Node.js 18+
- pnpm (or npm/yarn)
- Expo CLI:
npm install -g expo-cli - EAS CLI:
npm install -g eas-cli - Expo account (free): https://expo.dev/signup
# Clone the repo
git clone https://github.com/Moes-AI/gemma-3n-impact-challenge.git
cd gemma-3n-impact-challenge
# Install dependencies
pnpm install
# Download the Gemma 3N model (2.9GB)
# Place it at: assets/models/gemma-3n-E2B-it-int4.task
# Model available from: https://www.kaggle.com/models/google/gemma-3nLocal builds fail due to the 2.9GB model file. Use EAS Build instead:
# Login to Expo
eas login
# Configure EAS for your project
eas build:configure
# Build for Android (development client)
eas build --platform android --profile development
# Or build a preview APK
eas build --platform android --profile previewThe build runs on Expo's cloud servers which handle large assets properly.
For development without the model:
# Start Metro bundler
pnpm start
# Run on Android (requires dev client from EAS)
pnpm androidrn/
├── src/
│ ├── App.tsx # Navigation setup
│ ├── screens/
│ │ ├── ChatScreen.tsx # Main therapeutic chat
│ │ ├── ModelLoadingScreen.tsx
│ │ └── SettingsScreen.tsx
│ ├── components/
│ │ ├── MessageList.tsx
│ │ ├── ChatInput.tsx
│ │ └── VoiceInput.tsx
│ ├── stores/
│ │ └── chatStore.ts # Zustand + persistence
│ └── utils/
├── GemmaBridge/
│ └── js/index.ts # Native module interface
├── assets/
│ └── models/ # Gemma 3N model goes here
└── android/ # Native Android code
Cloud-based AI requires sending your most private thoughts to distant servers. Even with encryption, data breaches happen. With Tree of Trust:
- No network = No leak — Airplane mode works fine
- No servers = No breach risk — Nothing to hack
- No logging = No regrets — Speak freely
- Voice input with on-device speech recognition
- iOS support
- Conversation export (encrypted)
- Custom persona/therapist styles
- Mood tracking integration
MIT
- Google Gemma team for the incredible on-device model
- Kaggle for hosting the Gemma 3N Impact Challenge
- MediaPipe team for the LLM inference framework