Skip to content

team-npc/MindHatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  MindHatch - AI-Powered Dream Analyzer

MindHatch is a beautiful, intuitive mobile app that helps users record, analyze, and understand their dreams using AI-powered interpretation and advanced analytics.

โœจ Features

๐Ÿ†“ Free Tier

  • Dream Journal: Log dreams with title, content, and mood rating
  • Basic Mood Tracking: Simple mood indicators and streak tracking
  • Keyword Extraction: Basic symbol identification from dream content
  • Daily Prompts: Inspiring questions to encourage dream recall

๐Ÿ’Ž Premium (MindHatch+)

  • AI Dream Interpretation: Deep symbolic analysis using GPT-4
  • Voice Recording: Narrate dreams with voice-to-text transcription
  • Advanced Analytics: Beautiful charts and trend visualization
  • Guided Reflections: Therapy-style questions for self-discovery
  • Cloud Sync: Secure backup and multi-device synchronization
  • Lucid Dreaming Guide: Educational content and techniques

๐ŸŽจ Design

MindHatch features a stunning dark theme with:

  • Deep purple/navy gradient backgrounds
  • Pink/blue accent colors with glowing effects
  • Glassmorphic cards with rounded corners
  • Smooth animations and micro-interactions
  • Fintech-inspired UI elements

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React Native (Expo)
  • Navigation: Expo Router with tab-based layout
  • Database: Supabase (PostgreSQL with real-time features) + AsyncStorage fallback
  • Authentication: Supabase Auth + Local fallback
  • UI Components: Custom components with Linear Gradients
  • Charts: React Native Chart Kit
  • Icons: Lucide React Native
  • Animations: React Native Reanimated
  • Subscriptions: RevenueCat SDK
  • AI Integration: OpenAI API (GPT-4)

๐Ÿš€ Getting Started

Option 1: Quick Demo (No Setup Required)

  1. Install Dependencies

    npm install
  2. Start Development Server

    npm run dev
  3. Use Demo Account

    • Email: demo@mindhatch.com
    • Password: demo123!
    • The app will work with local storage (AsyncStorage)

Option 2: Full Setup with Supabase

  1. Install Dependencies

    npm install
  2. Set up Supabase

    • Create a new project at supabase.com
    • Copy your project URL and anon key
    • Run the migration file in the Supabase SQL editor (copy from supabase/migrations/)
  3. Configure Environment Variables Create a .env file with your API keys:

    EXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
    EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
    EXPO_PUBLIC_OPENAI_API_KEY=your_openai_key
    EXPO_PUBLIC_REVENUECAT_API_KEY=your_revenuecat_key
    
  4. Start Development Server

    npm run dev
  5. Open in Expo Go

    • Scan the QR code with Expo Go app
    • Or run on iOS/Android simulator

๐Ÿ“ฑ App Structure

app/
โ”œโ”€โ”€ (tabs)/
โ”‚   โ”œโ”€โ”€ index.tsx          # Home Dashboard
โ”‚   โ”œโ”€โ”€ new-dream.tsx      # Dream Entry
โ”‚   โ”œโ”€โ”€ analytics.tsx      # Analytics & Trends
โ”‚   โ””โ”€โ”€ profile.tsx        # User Profile
โ”œโ”€โ”€ login.tsx              # Authentication
โ”œโ”€โ”€ onboarding/            # User Onboarding Flow
โ”œโ”€โ”€ _layout.tsx            # Root Layout
โ””โ”€โ”€ +not-found.tsx         # 404 Screen

components/
โ”œโ”€โ”€ PaywallModal.tsx       # RevenueCat Paywall
โ”œโ”€โ”€ OnboardingGuard.tsx    # Onboarding Protection
โ””โ”€โ”€ AnimatedSparkle.tsx    # UI Animations

services/
โ”œโ”€โ”€ supabase.ts            # Supabase Client & Types
โ”œโ”€โ”€ database.ts            # Database Operations (Supabase + AsyncStorage)
โ”œโ”€โ”€ dreamAnalyzer.ts       # AI Analysis Logic
โ””โ”€โ”€ userInitialization.ts # User Management

supabase/
โ””โ”€โ”€ migrations/
    โ””โ”€โ”€ *.sql              # Database Schema Migrations

๐Ÿ—„๏ธ Database Schema

Core Tables (Supabase)

  • users: User profiles, preferences, permissions
  • dreams: Dream entries with mood and sleep quality
  • dream_analyses: AI-generated dream interpretations
  • user_sessions: Session management
  • monthly_reports: Generated insights and reports
  • user_stats: Aggregated user statistics

Key Features

  • Row Level Security (RLS): Users can only access their own data
  • Real-time subscriptions: Live updates when data changes
  • Automatic triggers: Stats update when dreams are added/modified
  • Data validation: Constraints ensure data integrity
  • AsyncStorage Fallback: Works without Supabase for demo purposes

๐Ÿ”ฎ AI Dream Analysis

The app uses advanced AI to analyze dreams and provide:

  • Symbol Interpretation: Meaning of dream elements
  • Emotional Analysis: Mood patterns and triggers
  • Psychological Insights: Deeper subconscious exploration
  • Guided Questions: Reflection prompts for self-discovery

๐Ÿ” Authentication & Security

  • Supabase Auth: Secure email/password authentication (when configured)
  • Local Fallback: AsyncStorage-based auth for demo mode
  • Row Level Security: Database-level access control (Supabase)
  • Session Management: Secure token-based sessions
  • Data Encryption: All data encrypted at rest and in transit (Supabase)

๐Ÿ’ฐ Monetization

MindHatch uses RevenueCat for subscription management:

  • Free Trial: 7 days full access
  • Monthly Plan: $2.99/month
  • Yearly Plan: $11.99/year (67% savings)
  • One-time Analysis: $1.99 per deep interpretation

๐ŸŽฏ Target Audience

  • Dream Enthusiasts: People interested in dream interpretation
  • Wellness Seekers: Users focused on mental health and self-discovery
  • Journal Keepers: People who enjoy reflective writing
  • Spiritual Explorers: Those interested in subconscious exploration

๐ŸŒŸ Key Differentiators

  1. AI-Powered Analysis: Advanced GPT-4 dream interpretation
  2. Beautiful Design: Fintech-inspired dark UI with smooth animations
  3. Voice Integration: Speak your dreams instead of typing
  4. Comprehensive Analytics: Detailed mood and pattern tracking
  5. Therapeutic Approach: CBT-style guided reflections
  6. Flexible Backend: Works with or without Supabase
  7. Demo Mode: Full functionality without setup required

๐Ÿ” Privacy & Security

  • Dreams are stored securely (Supabase with encryption or local AsyncStorage)
  • Row Level Security ensures data isolation (Supabase)
  • GDPR compliant data handling
  • Optional data export for backup
  • Local-first approach available

๐ŸŽจ Design System

Colors

  • Primary: #e94560 (Pink/Red)
  • Secondary: #4f46e5 (Blue/Purple)
  • Background: #0f0c29 to #24243e (Dark Gradient)
  • Success: #10b981 (Green)
  • Warning: #f59e0b (Yellow)
  • Error: #ef4444 (Red)

Typography

  • Headers: Bold, 24-32px
  • Body: Regular, 14-16px
  • Captions: Medium, 12-14px

Spacing

  • Base Unit: 8px
  • Small: 4px, 8px, 12px
  • Medium: 16px, 20px, 24px
  • Large: 32px, 40px, 48px

๐Ÿ“ˆ Analytics & Insights

The app provides rich analytics including:

  • Mood Trends: Daily, weekly, monthly mood patterns
  • Dream Categories: Frequency of different dream types
  • Symbol Analysis: Most common dream symbols
  • Sleep Correlation: Relationship between sleep and dream quality
  • Lucid Dream Tracking: Progress in lucid dreaming practice

๐Ÿ”ง Development Features

  • Dual Backend Support: Supabase for production, AsyncStorage for development
  • Error Handling: Comprehensive error handling and fallbacks
  • Type Safety: Full TypeScript integration
  • Real-time Updates: Live data synchronization (Supabase)
  • Offline Support: Works without internet connection
  • Demo Mode: No setup required for testing

๐Ÿ”ฎ Future Enhancements

  • Dream Visualization: AI-generated art from dream descriptions
  • Community Features: Share anonymous dreams with others
  • Therapist Integration: Export dreams for professional analysis
  • Wearable Integration: Sleep cycle and dream correlation
  • Meditation Integration: Guided dream incubation sessions

๐Ÿค Contributing

MindHatch is designed for rapid development and easy customization. The modular architecture makes it simple to:

  • Add new dream analysis features
  • Customize the UI theme
  • Integrate additional AI services
  • Expand analytics capabilities
  • Switch between Supabase and local storage

๐Ÿšจ Setup Instructions

For Demo/Development:

  1. Clone the repository
  2. Run npm install
  3. Run npm run dev
  4. Use demo account: demo@mindhatch.com / demo123!

For Production:

  1. Set up Supabase project
  2. Run database migrations
  3. Configure environment variables
  4. Deploy to your preferred platform

๐Ÿ“„ License

This project is for demonstration purposes. Replace with your actual license.


MindHatch - Unlock the wisdom of your subconscious ๐ŸŒ™โœจ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors