Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

BrainFreeze ❄️

A Flutter app that provides mindful reflection when attempting to open distracting apps, powered by AI conversation and text-to-speech technology.

Overview

BrainFreeze intercepts iOS app launches and provides AI-powered mindful reflection through voice conversations. When you try to open apps like Instagram, TikTok, or other potentially distracting applications, BrainFreeze pauses the launch and engages you in a thoughtful conversation about your intentions.

Key Features

  • App Interception: Seamlessly intercepts iOS app launches using Shortcuts automation
  • AI-Powered Conversations: Google Gemini AI provides personalized reflection questions
  • Text-to-Speech: ElevenLabs TTS speaks AI responses for hands-free interaction
  • Voice Recognition: Speech-to-text for natural conversation flow
  • Mindful Design: Icy blue theme with snowflake branding to promote calm reflection
  • Smart Loop Prevention: Prevents automation loops when AI approves app access

Technologies Used

Core Frameworks

  • Flutter: Cross-platform mobile development framework
  • Provider: State management pattern for reactive UI updates
  • Swift: Native iOS integration for Shortcuts and App Intents

AI & Speech Technologies

  • Google Gemini AI: Conversational AI for generating reflection questions and responses
  • ElevenLabs: High-quality text-to-speech API for AI voice output
  • Speech-to-Text: Flutter's built-in speech recognition for user input

iOS Integration

  • iOS Shortcuts: Automation system for app interception
  • App Intents: Swift framework for deep system integration
  • URL Schemes: Custom app launching and inter-app communication

Audio & Media

  • AudioPlayers: Flutter package for audio playback management
  • AVAudioSession: iOS audio session configuration for reliable speech output
  • Camera: Real-time camera preview for immersive experience

Data & Storage

  • SharedPreferences: Local storage for user settings and loop prevention
  • HTTP & Dio: Network clients for API communication
  • Permission Handler: Runtime permission management

Development Tools

  • Cursor IDE: AI-powered code editor used for development
  • Claude Code: AI assistant for code generation and debugging
  • Xcode: iOS development environment for Swift components

Architecture

The app follows a clean architecture pattern with:

  • Views: Flutter UI components with camera overlay and chat interface
  • Services: AI chatbot service, TTS service, and URL scheme handlers
  • Models: App state management and settings persistence
  • ViewModels: Business logic for speech recognition and reflection flow

Team

  • Maulik Verma - Lead Developer
  • Ian Suh - iOS Integration Specialist
  • Faris Faizal - AI & Speech Technology Integration

Getting Started

Prerequisites

  • Flutter SDK (3.7.2 or higher)
  • iOS development environment (Xcode 15+)
  • ElevenLabs API key for text-to-speech functionality
  • Google Gemini API key for AI conversations

Installation

  1. Clone the repository
  2. Install Flutter dependencies:
    flutter pub get
  3. Configure API keys in the app settings
  4. Build and run on iOS device:
    flutter run

iOS Setup

  1. Install the companion Swift app for BrainFreeze intent functionality
  2. Set up Shortcuts automation to trigger BrainFreeze when opening target apps
  3. Grant necessary permissions for camera, microphone, and speech recognition

Usage

  1. Configure target apps in the settings
  2. When you attempt to open a configured app, BrainFreeze will intercept the launch
  3. Engage in voice conversation with the AI assistant
  4. Reflect on your intentions and decide mindfully whether to proceed
  5. The AI may approve immediate access based on your responses

Technical Highlights

  • Real-time Audio Processing: Custom AudioPlayer management with session configuration
  • iOS System Integration: Deep integration with iOS Shortcuts and automation
  • AI Conversation Flow: Context-aware dialogue that adapts to user responses
  • Robust Error Handling: Comprehensive error management for audio and network operations
  • Performance Optimization: Efficient state management and memory handling

Built with ❄️ by the BrainFreeze team using cutting-edge AI and mobile technologies.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages