๐ Enhanced InsideOut Platform - macOS Deployment Guide
๐ OVERVIEW
This comprehensive guide provides step-by-step instructions for deploying the Enhanced InsideOut Platform on macOS systems. The platform is specifically designed for Indian law enforcement with complete legal framework compliance, multilingual support, and global platform integration.
๐ฏ QUICK START (Automated Deployment)
One-Command Installation:
curl -fsSL https://raw.githubusercontent.com/bot-text/SentinentalBERT/main/setup_insideout_macos.sh | bash
Manual Download and Run:
# Download the deployment script
curl -O https://raw.githubusercontent.com/bot-text/SentinentalBERT/main/setup_insideout_macos.sh
# Make it executable
chmod +x setup_insideout_macos.sh
# Run the deployment
./setup_insideout_macos.sh
๐ง SYSTEM REQUIREMENTS
Minimum Requirements:
- macOS: 10.15 (Catalina) or later
- RAM: 8GB (16GB recommended)
- Storage: 5GB free space
- Architecture: Intel x86_64 or Apple Silicon (M1/M2)
- Internet: Stable broadband connection
Recommended Requirements:
- macOS: 12.0 (Monterey) or later
- RAM: 16GB or more
- Storage: 10GB free space
- Processor: Multi-core (4+ cores recommended)
๐ฆ WHAT GETS INSTALLED
Development Tools:
- โ Xcode Command Line Tools - Essential development utilities
- โ Homebrew - Package manager for macOS
- โ Git - Version control system
- โ Essential CLI Tools - curl, wget, jq, tree, htop
Programming Languages:
- โ Python 3.11 - Core platform language
- โ Node.js 18 - JavaScript runtime for web components
- โ pip & npm - Package managers
Containerization:
- โ Docker Desktop - Container platform
- โ Docker Compose - Multi-container orchestration
Databases:
- โ PostgreSQL 14 - Primary database
- โ Redis - Caching and session storage
Python Libraries:
- โ Streamlit - Web dashboard framework
- โ Pandas, NumPy - Data processing
- โ Matplotlib, Seaborn, Plotly - Visualization
- โ Scikit-learn - Machine learning
- โ Transformers, PyTorch - NLP and AI models
- โ NLTK, spaCy - Natural language processing
- โ Indic-NLP - Indian language processing
- โ Requests, BeautifulSoup - Web scraping
- โ Cryptography - Security and encryption
- โ FastAPI, Flask - API frameworks
๐ DEPLOYMENT PROCESS
Phase 1: System Preparation
- System Requirements Check
- Verifies macOS version compatibility
- Checks available disk space (5GB minimum)
- Validates system architecture (Intel/Apple Silicon)
-
Tests internet connectivity
-
Development Tools Installation
- Installs Xcode Command Line Tools
- Sets up Homebrew package manager
- Installs essential CLI utilities
Phase 2: Runtime Environment Setup
- Python Environment
- Installs Python 3.11 via Homebrew
- Creates virtual environment
- Installs all required Python packages
-
Downloads NLTK data and spaCy models
-
Node.js Environment
- Installs Node.js 18 and npm
-
Installs global packages (yarn, pm2, nodemon)
-
Docker Installation
- Downloads and installs Docker Desktop
- Configures Docker for the platform
- Installs Docker Compose
Phase 3: Database Setup
- Database Services
- Installs and configures PostgreSQL 14
- Installs and configures Redis
- Creates InsideOut database
- Starts database services
Phase 4: Platform Deployment
- Repository Setup
- Clones Enhanced InsideOut Platform repository
- Sets up project structure
-
Configures environment variables
-
Configuration
- Creates .env configuration file
- Sets up logging directories
- Configures security settings
- Prepares evidence storage
Phase 5: Testing & Validation
- Integration Testing
- Runs comprehensive test suite
- Validates all components
- Verifies legal framework compliance
-
Tests multilingual support
-
Final Setup
- Creates desktop shortcuts
- Generates launch scripts
- Provides access instructions
๐ง MANUAL INSTALLATION STEPS
If you prefer manual installation or need to troubleshoot:
Step 1: Install Xcode Command Line Tools
xcode-select --install
Step 2: Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 3: Install Python and Dependencies
# Install Python
brew install python@3.11
# Create project directory
mkdir -p ~/InsideOut-Platform
cd ~/InsideOut-Platform
# Clone repository
git clone https://github.com/bot-text/SentinentalBERT.git .
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt # If requirements.txt exists
# Or install manually:
pip install streamlit pandas numpy matplotlib seaborn plotly
pip install scikit-learn transformers torch
pip install nltk spacy textblob langdetect indic-nlp-library
pip install requests beautifulsoup4 selenium
pip install cryptography sqlalchemy redis fastapi
Step 4: Install Node.js
brew install node@18
npm install -g yarn pm2 nodemon
Step 5: Install Docker Desktop
# Download Docker Desktop from https://www.docker.com/products/docker-desktop/
# Or use Homebrew cask:
brew install --cask docker
Step 6: Install Databases
# Install PostgreSQL
brew install postgresql@14
brew services start postgresql@14
createdb insideout_db
# Install Redis
brew install redis
brew services start redis
Step 7: Configure Environment
# Create .env file with your configuration
cp .env.example .env # If example exists
# Edit .env with your API keys and settings
Step 8: Run Tests
cd ~/InsideOut-Platform
source venv/bin/activate
python test_enhanced_integration.py
Step 9: Start Platform
streamlit run enhanced_viral_dashboard.py --server.port 8080
๐ CONFIGURATION
Environment Variables (.env file):
# Application Settings
APP_NAME=InsideOut
APP_VERSION=2.0
DEBUG=true
# Server Configuration
HOST=0.0.0.0
PORT=8080
# Database URLs
DATABASE_URL=postgresql://localhost:5432/insideout_db
REDIS_URL=redis://localhost:6379
# Security Keys (auto-generated)
SECRET_KEY=your_secret_key
JWT_SECRET=your_jwt_secret
ENCRYPTION_KEY=your_encryption_key
# Legal Framework
LEGAL_FRAMEWORK_ENABLED=true
EVIDENCE_STORAGE_PATH=./evidence_storage
CHAIN_OF_CUSTODY_ENABLED=true
# Multilingual Support
DEFAULT_LANGUAGE=en
SUPPORTED_LANGUAGES=en,hi,bn,ta,te
UI_TRANSLATION_ENABLED=true
# Platform API Keys (Add your keys)
TWITTER_API_KEY=your_twitter_api_key
TWITTER_API_SECRET=your_twitter_api_secret
FACEBOOK_ACCESS_TOKEN=your_facebook_token
INSTAGRAM_ACCESS_TOKEN=your_instagram_token
YOUTUBE_API_KEY=your_youtube_api_key
KOO_API_KEY=your_koo_api_key
SHARECHAT_API_KEY=your_sharechat_api_key
API Keys Setup:
- Twitter/X API: https://developer.twitter.com/
- Facebook API: https://developers.facebook.com/
- Instagram API: https://developers.facebook.com/docs/instagram
- YouTube API: https://developers.google.com/youtube/
- Koo API: Contact Koo developer support
- ShareChat API: Contact ShareChat developer support
๐ STARTING THE PLATFORM
Method 1: Desktop Shortcut
- Double-click "InsideOut Platform" app on Desktop
- Platform will open in Terminal and browser
Method 2: Command Line
cd ~/InsideOut-Platform
source venv/bin/activate
streamlit run enhanced_viral_dashboard.py --server.port 8080
Method 3: Launch Script
~/InsideOut-Platform/launch_insideout.sh
Access URLs:
- Main Dashboard: http://localhost:8080
- API Documentation: http://localhost:8080/docs (if FastAPI is running)
๐งช TESTING
Run All Tests:
cd ~/InsideOut-Platform
source venv/bin/activate
python test_enhanced_integration.py
Test Components:
- โ Legal Framework Test - Authorization, evidence collection, chain of custody
- โ Multilingual Support Test - Language detection, UI translation
- โ Global Platform Test - Content extraction, viral analysis
- โ Integration Test - End-to-end workflow validation
Expected Results:
๐ Starting Enhanced InsideOut Platform Integration Tests
======================================================================
๐ Testing Indian Legal Framework...
โ
Legal authorization created
โ
Evidence collected
โ
Evidence integrity verified
โ
Chain of custody entry added
โ
Court report generated
๐ Testing Enhanced Multilingual Support...
โ
Language detection successful: hi, bn, ta, te, en
โ
UI translations available for all languages
โ
Multilingual analysis successful
๐ Testing Global Platform Support...
โ
Platform support comprehensive: 7 platforms supported
โ
Content extraction successful for all platforms
โ
Platform features well supported
๐ Testing Component Integration...
โ
All services initialized successfully
โ
Integration test: Cross-platform analysis successful
======================================================================
๐ TEST RESULTS SUMMARY
======================================================================
Legal Framework โ
PASSED
Multilingual Support โ
PASSED
Global Platform Support โ
PASSED
Integration โ
PASSED
----------------------------------------------------------------------
Overall Success Rate: 4/4 (100.0%)
๐ ALL TESTS PASSED! Enhanced InsideOut Platform is ready for deployment.
๐ง TROUBLESHOOTING
Common Issues and Solutions:
1. Xcode Command Line Tools Installation Fails
# Try manual installation
sudo xcode-select --reset
xcode-select --install
2. Homebrew Installation Issues
# For Apple Silicon Macs, ensure correct PATH
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
3. Python Virtual Environment Issues
# Recreate virtual environment
rm -rf venv
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
4. Docker Desktop Not Starting
- Ensure Docker Desktop is installed in /Applications/
- Start Docker Desktop manually from Applications folder
- Wait for Docker to fully initialize before continuing
5. Database Connection Issues
# Restart PostgreSQL
brew services restart postgresql@14
# Restart Redis
brew services restart redis
# Check if services are running
brew services list | grep -E "(postgresql|redis)"
6. Port Already in Use
# Find process using port 8080
lsof -i :8080
# Kill process if needed
kill -9 <PID>
# Or use different port
streamlit run enhanced_viral_dashboard.py --server.port 8081
7. Permission Issues
# Fix permissions for project directory
chmod -R 755 ~/InsideOut-Platform
chown -R $(whoami) ~/InsideOut-Platform
8. Missing Dependencies
# Reinstall Python dependencies
cd ~/InsideOut-Platform
source venv/bin/activate
pip install --upgrade --force-reinstall -r requirements.txt
๐ PERFORMANCE OPTIMIZATION
System Optimization:
- Memory Management
- Close unnecessary applications
- Monitor memory usage with Activity Monitor
-
Consider increasing swap space if needed
-
Database Performance
- Regularly vacuum PostgreSQL database
- Monitor Redis memory usage
-
Configure appropriate cache sizes
-
Network Optimization
- Use stable internet connection
- Configure firewall to allow required ports
- Monitor API rate limits
Platform Optimization:
# Set environment variables for better performance
export STREAMLIT_SERVER_MAX_UPLOAD_SIZE=200
export STREAMLIT_SERVER_MAX_MESSAGE_SIZE=200
export PYTHONUNBUFFERED=1
๐ SECURITY CONSIDERATIONS
Security Best Practices:
- API Keys Management
- Store API keys in .env file (never commit to git)
- Use environment-specific keys
-
Regularly rotate API keys
-
Database Security
- Use strong passwords for database connections
- Enable SSL for database connections in production
-
Regular database backups
-
Evidence Security
- Enable encryption for evidence storage
- Implement proper access controls
-
Maintain audit logs
-
Network Security
- Use HTTPS in production
- Configure proper firewall rules
- Monitor for suspicious activities
๐ ADDITIONAL RESOURCES
Documentation:
- Platform Summary:
~/InsideOut-Platform/ENHANCED_PLATFORM_SUMMARY.md
- Change Catalog:
~/InsideOut-Platform/CHANGE_CATALOG.md
- API Documentation: Available in code comments
- Legal Framework Guide: Integrated in platform
Support Files:
- Deployment Log:
~/InsideOut-Platform/deployment.log
- Test Reports:
~/InsideOut-Platform/enhanced_integration_test_report.json
- Environment Config:
~/InsideOut-Platform/.env
External Resources:
- GitHub Repository: https://github.com/bot-text/SentinentalBERT
- Streamlit Documentation: https://docs.streamlit.io/
- Python Documentation: https://docs.python.org/3.11/
- Docker Documentation: https://docs.docker.com/
๐ SUPPORT
Getting Help:
- Check Logs: Review deployment.log for error details
- Run Tests: Execute test suite to identify issues
- Documentation: Refer to platform documentation
- Community: Check GitHub issues and discussions
Reporting Issues:
- Gather Information:
- macOS version and architecture
- Error messages and logs
-
Steps to reproduce the issue
-
Create Issue:
- Use GitHub issue tracker
- Provide detailed description
- Include relevant logs and screenshots
๐ SUCCESS INDICATORS
Deployment Success:
- โ All system requirements met
- โ All dependencies installed successfully
- โ Database services running
- โ All tests passing (100% success rate)
- โ Dashboard accessible at http://localhost:8080
- โ All features operational
Platform Ready:
- โ Legal framework compliance active
- โ Multilingual UI functional
- โ Global platform support operational
- โ Evidence collection system ready
- โ Cross-platform analysis working
- โ Real-time monitoring active
๐ NEXT STEPS
After successful deployment:
- Configure API Keys
- Add your social media platform API credentials
-
Test platform connections
-
Legal Setup
- Configure legal authorization settings
- Set up evidence storage policies
-
Train officers on legal compliance features
-
Operational Deployment
- Set up monitoring and alerting
- Configure backup procedures
-
Establish maintenance schedules
-
Training
- Train law enforcement officers
- Provide user manuals and guides
- Set up support procedures
This deployment guide ensures a complete, secure, and legally compliant installation of the Enhanced InsideOut Platform on macOS systems, specifically designed for Indian law enforcement operations.