Skip to content

thacher/meaningful-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

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

Repository files navigation

๐Ÿง  Meaningful AI - Local-Only Behavioral Insight Engine ๐ŸŽฏ

A privacy-first, local-only AI conversation platform designed to uncover behavioral insights and identify mindful individuals through authentic, personality-driven interactions. Experience meaningful connection discovery with our advanced compatibility evaluation system, featuring modern UI/UX design, robust error handling, and complete data privacy - all data stays on your machine!

โœจ Core Mission Features

๐ŸŽฏ Behavioral Analysis Systems

  • ๐Ÿง  AI Personality Engine: Context-aware conversations with advanced personality modeling
  • ๐Ÿ“Š Compatibility Core: Automatic behavioral pattern recognition and scoring
  • ๐Ÿ›ก๏ธ Insight Shield: Comprehensive error handling with graceful fallbacks
  • ๐Ÿ“ Conversation Logs: Detailed interaction tracking and behavioral analysis
  • โš™๏ธ Profile Configuration: Easy-to-modify personality and evaluation parameters
  • ๐ŸŽฏ Type Safety: Full TypeScript implementation for enterprise-grade code quality
  • ๐Ÿš€ Fallback Systems: Automatic AI service switching for maximum reliability
  • ๐Ÿ”ง Input Validation: Advanced input validation and conversation sanitization

๐ŸŒŒ Modern Interface

  • ๐ŸŒŒ Communication Array: Beautiful web-based chat interface with glass morphism
  • ๐ŸŽจ Mindful Theme: Elegant design with gradient backgrounds and smooth animations
  • ๐Ÿ“ฑ Responsive Design: Works perfectly on desktop, tablet, and mobile
  • โœจ Modern UI/UX: Smooth transitions, hover effects, and intuitive navigation
  • ๐Ÿ”„ Real-time Updates: Live compatibility scoring and behavioral insights
  • ๐ŸŒ Offline Mode: Complete functionality with local storage fallback

๐Ÿค– Local AI Service Architecture

  • ๐Ÿ  Privacy-First Design: All AI processing happens locally - no data leaves your machine
  • ๐Ÿฆ™ Ollama Integration: Local LLM support with Llama 3.1, Mistral, and other models
  • ๐Ÿ“š Life Wisdom Engine: Comprehensive knowledge base for meaningful conversations
  • ๐Ÿ”„ Intelligent Fallback: Graceful degradation to wisdom-based responses when Ollama unavailable
  • โšก Performance Optimized: Fast local processing with minimal resource usage
  • ๐Ÿ›ก๏ธ Complete Privacy: No cloud AI services, no data transmission, no external dependencies

๐Ÿ›ก๏ธ Privacy-First: All AI processing happens locally with Ollama - no data ever leaves your machine!

๐Ÿš€ Quick Start

๐ŸŒŒ Behavioral Insight Engine (Recommended)

# Clone or download the project
cd meaningful-ai

# Launch the Insight Engine
npm install
npm run dev

# Optional: Setup Offline AI (Recommended for better conversations)
npm run setup:ollama

Access URL: http://localhost:3000

Offline AI Setup: The app works great with just the built-in wisdom system, but for enhanced conversations, run npm run setup:ollama to install Ollama with Llama 3.1 8B for offline AI conversations.

The Behavioral Insight Engine will automatically:

  • Initialize the AI personality system
  • Set up conversation tracking
  • Launch the modern web interface
  • Begin behavioral pattern analysis

๐Ÿ› ๏ธ Manual Setup

# 1. Install dependencies
npm install

# 2. Set up environment
cp env.template .env.local

# 3. Configure your AI personality
# Edit src/config/profile.json with your values and preferences

# 4. Add API keys to .env.local
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here  # Optional fallback

# 5. Launch the engine
npm run dev

๐ŸŽฎ Mission Protocol

๐ŸŒŒ Behavioral Analysis Interface

  1. ๐Ÿš€ Launch: Open http://localhost:3000 in your browser
  2. ๐Ÿ“ก Communication: Start conversations to analyze behavioral patterns
  3. ๐Ÿง  AI Analysis: Watch as the system evaluates compatibility and mindfulness
  4. ๐Ÿ“Š Insights: Review behavioral insights and compatibility scores
  5. ๐Ÿ”ฌ Admin Dashboard: Access detailed analytics at /admin (password: admin123)

๐Ÿ›ธ Example Behavioral Analysis Session

๐Ÿง  Meaningful AI - Behavioral Insight Engine
๐ŸŒŒ Welcome to authentic conversation analysis ๐ŸŒŒ

๐Ÿ“ก User: Hi! I'm really interested in personal growth and mindfulness.
๐Ÿš€ AI Analysis: [Analyzing response patterns...]

๐ŸŒŒ Behavioral Insights:
๐Ÿ‘ค User: Hi! I'm really interested in personal growth and mindfulness.
๐Ÿค– AI Core: That's wonderful! I appreciate your openness about growth. What draws you to mindfulness? Is it something you've practiced for a while, or are you exploring new ways to connect with yourself?

๐Ÿ“Š Compatibility Score: 78/100
๐ŸŸข Green Flags: Growth mindset, Self-awareness, Authenticity
๐Ÿ”ด Red Flags: None detected

โš™๏ธ AI Personality Configuration

The Behavioral Insight Engine can be customized by modifying the ProfileConfig in src/config/profile.json:

{
  "name": "Your AI Personality",
  "values": [
    "authenticity",
    "growth mindset", 
    "emotional intelligence",
    "mindfulness"
  ],
  "filters": {
    "greenFlags": [
      "genuine curiosity",
      "self-awareness",
      "emotional maturity",
      "mindfulness practice"
    ],
    "redFlags": [
      "superficial interactions",
      "lack of empathy",
      "closed mindset"
    ]
  }
}

๐ŸŽจ Interface Customization

The web interface theme can be customized by modifying the CSS in src/app/globals.css:

  • Colors: Change the gradient backgrounds and accent colors
  • Fonts: Modify the Geist font family
  • Animations: Adjust transition effects and hover states
  • Layout: Customize the glass morphism panels

๐Ÿค– Behavioral Analysis Specifications

Current AI Personality Engine: Custom GPT-4o-mini with Claude-3 Haiku fallback

  • ๐Ÿง  Type: Advanced Conversational AI with Personality Modeling
  • ๐Ÿ“Š Parameters: Context-aware behavioral pattern recognition
  • ๐Ÿ’พ Memory Usage: Optimized conversation history management
  • โšก Response Time: ~1-3 seconds with fallback systems
  • ๐ŸŒŒ Capabilities: Compatibility scoring, behavioral insights, personality matching

๐Ÿ›ธ Evaluation Criteria

The system analyzes behavioral patterns across multiple dimensions:

Behavioral Factor Weight Description
Value Alignment 25% Core values and principles compatibility
Emotional Intelligence 20% Empathy, self-awareness, emotional maturity
Authenticity 20% Genuine self-expression vs. performative behavior
Communication Style 15% How they express thoughts and feelings
Growth Orientation 10% Openness to learning and personal development
Depth of Responses 5% Thoughtfulness and engagement level
Respectfulness 3% Basic human decency and consideration
Intellectual Curiosity 2% Question-asking and exploration behavior

๐Ÿ“ Behavioral Insight Engine Structure

meaningful-ai/
โ”œโ”€โ”€ ๐Ÿš€ src/
โ”‚   โ”œโ”€โ”€ ๐ŸŒŒ app/                 # Next.js app router
โ”‚   โ”‚   โ”œโ”€โ”€ admin/             # Behavioral analytics dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ api/chat/          # Conversation analysis endpoints
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx           # Main conversation interface
โ”‚   โ”œโ”€โ”€ ๐Ÿง  components/         # React conversation components
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š lib/               # Core behavioral analysis services
โ”‚   โ”‚   โ”œโ”€โ”€ ai-service.ts     # AI personality engine
โ”‚   โ”‚   โ”œโ”€โ”€ database.ts       # Behavioral data persistence
โ”‚   โ”‚   โ”œโ”€โ”€ evaluation-engine.ts # Compatibility scoring system
โ”‚   โ”‚   โ””โ”€โ”€ config.ts         # Configuration loader
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ types/             # TypeScript behavioral definitions
โ”‚   โ””โ”€โ”€ โš™๏ธ config/            # AI personality configuration
โ”œโ”€โ”€ ๐Ÿ› ๏ธ setup.sh               # Quick setup script
โ”œโ”€โ”€ ๐Ÿ“‹ env.template           # Environment variables template
โ”œโ”€โ”€ ๐Ÿ“– README.md             # Mission documentation
โ””โ”€โ”€ ๐Ÿšซ .gitignore            # Git ignore rules

๐Ÿ›ธ Core Components

  • ๐ŸŒŒ Chat Interface (ChatInterface.tsx): Modern conversation experience
  • ๐Ÿ“Š Admin Dashboard (admin/page.tsx): Behavioral analytics and insights
  • ๐Ÿง  AI Service (ai-service.ts): Personality-driven conversation engine
  • ๐Ÿ“ˆ Evaluation Engine (evaluation-engine.ts): Compatibility scoring system

๐Ÿ”ง Advanced Behavioral Analysis Features

๐Ÿ“ Conversation Logging System

The Behavioral Insight Engine creates detailed conversation logs:

  • ๐Ÿš€ AI personality initialization progress
  • โŒ Error messages and diagnostic traces
  • ๐Ÿ”„ Conversation history and pattern analysis
  • ๐Ÿ“Š Behavioral insights and compatibility metrics
  • ๐Ÿ›ธ Interaction session summaries

๐Ÿ›ก๏ธ Shield Systems (Error Handling)

  • ๐Ÿš€ AI Service Loading: Graceful failure with helpful diagnostic messages
  • ๐Ÿ”ง Input Validation: Advanced conversation sanitization and validation
  • โšก Generation Errors: Intelligent fallback responses when AI fails
  • ๐Ÿ’พ Memory Management: Automatic cleanup to prevent system crashes
  • ๐ŸŒ Network Issues: Offline mode resilience and error recovery

โšก Performance Optimization

  • ๐Ÿš€ Dual AI Services: OpenAI primary with Anthropic fallback
  • ๐Ÿ’พ Memory Management: Configurable conversation history limits
  • ๐Ÿ”ง Efficient Processing: Optimized text analysis algorithms
  • โšก Batch Processing: High-performance behavioral analysis
  • ๐ŸŒŒ Resource Monitoring: Real-time performance tracking

๐Ÿ› Behavioral Analysis Diagnostics

๐Ÿšจ Common Mission Issues

Issue ๐Ÿ› ๏ธ Solution
๐Ÿ’พ Memory Overload Reduce conversation history limits or use local storage
๐ŸŒ Slow Performance Check API key configuration and network connection
๐ŸŒ API Failures Verify OpenAI/Anthropic API keys and fallback systems
โŒ Import Errors Ensure all dependencies are properly installed
๐Ÿ”’ Admin Access Use default password admin123 or check environment config

โšก Performance Optimization

  • ๐Ÿš€ First Launch: Slower due to AI model initialization (~2-5 seconds)
  • ๐Ÿ”„ Subsequent Runs: Much faster as models are cached
  • ๐Ÿš€ API Users: Ensure valid API keys for optimal performance
  • ๐Ÿ’พ Memory Issues: Use local storage fallback for offline functionality
  • ๐ŸŒŒ Resource Monitoring: Check browser console for detailed diagnostics

๐Ÿงช Behavioral Analysis Testing

The Behavioral Insight Engine includes comprehensive testing protocols:

# Test behavioral analysis system
npm run build        # Test production build
npm run lint         # Test code quality
npm run dev          # Test development server

# Test fallback systems
npm run test:fallback # Test AI service fallback mechanisms

๐Ÿ“ฆ Behavioral Analysis Dependencies

  • ๐Ÿค– @anthropic-ai/sdk (โ‰ฅ0.60.0): Anthropic AI fallback service
  • โšก openai (โ‰ฅ5.15.0): OpenAI primary AI service
  • ๐ŸŒ next (โ‰ฅ15.5.0): Next.js web framework
  • ๐ŸŽจ tailwindcss (โ‰ฅ4.0.0): Modern styling framework
  • ๐Ÿ“Š @supabase/supabase-js (โ‰ฅ2.56.0): Optional cloud storage
  • ๐ŸŽญ framer-motion (โ‰ฅ12.23.12): Smooth animations and transitions

๐Ÿ“œ Behavioral Analysis License

This Behavioral Insight Engine uses AI services and libraries with their respective licenses:

  • ๐Ÿค– OpenAI API: OpenAI Terms of Service
  • ๐Ÿง  Anthropic API: Anthropic Terms of Service
  • ๐Ÿš€ Behavioral Analysis Implementation: MIT License

๐Ÿ“ž Behavioral Analysis Support

If you encounter any mission issues:

  1. ๐Ÿ” Check the Behavioral Analysis Diagnostics section above
  2. ๐Ÿ“ Review the browser console for detailed error logs
  3. ๐Ÿ”ง Ensure all dependencies and API keys are properly configured
  4. ๐Ÿš€ Try using the local storage fallback for testing
  5. ๐ŸŒ Check the GitHub issues for known behavioral analysis problems

๐Ÿง  Welcome to the Future of Meaningful Connection Discovery! ๐ŸŽฏ

About

A sophisticated behavioral analysis tool uncovering authentic personality traits through natural conversation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors