BETA
theunpartybeta
Location: https://github.com/unparty-app/theunpartybeta/
Status: Active Development
Primary Purpose: iOS/macOS native machine learning application with on-device text classification, clustering, and perceptron-based intelligence
Tech Stack
- Framework: SwiftUI
- Language: Swift 5.0
- Platform: iOS 14+, macOS 11+ (Universal - iPhone, iPad)
- ML Framework: Core ML, Create ML, Natural Language
- Graphics: Metal Shaders
- Database: SwiftData (local persistence)
- Key Tools: Xcode, Create ML
Key Features
Machine Learning & Intelligence
- Custom Perceptron Service: On-device binary text classification (action vs non-action)
- Text Classification Model: UNPARTYTextClassifier trained with Create ML
- K-Means Clustering: Enhanced clustering service with multiple distance metrics
- Word Embeddings: Custom word embedding service for semantic analysis
- Adaptive Configuration: Device-aware ML configuration based on memory and capabilities
- Training Management: Comprehensive training data collection and model refinement
Neural Network Visualization
- Neuron Activation View: Interactive visualization of neural network activations
- Custom Neuron Components: Modular neuron implementation with activation functions
- Hidden Layer Architecture: Multi-layer neural network support
- Metal Shaders: Hardware-accelerated background animations and visual effects
User Experience
- Entry System: Rich text entry creation and management
- Search Functionality: Semantic search across user entries with caching
- Quiz System: Interactive quiz interface for training model preferences
- Store Interface: Content storage and retrieval system
- User Profile: Photo management and personalization
- Settings Management: Comprehensive configuration options
Storage & Persistence
- Local Storage Provider: File-based persistence for ML models and user data
- SwiftData Integration: Modern data persistence with @Model and @Query
- Training Data Management: Organized storage for ML training examples
- Model Persistence: Save and load trained ML models
Architecture
Code
Native App (Swift + SwiftUI)
├── Models
│ ├── ClusterModel - Clustering data structures
│ ├── EntryModel - User entry management
│ ├── MoodModel - Sentiment tracking
│ ├── ContentMetrics - Performance analytics
│ └── TrainTextModel - ML training data
├── ViewModels (MVVM Pattern)
│ ├── Entry - Entry lifecycle management
│ ├── Text - Text processing and classification
│ ├── Cluster - Clustering coordination
│ ├── Action - Action detection logic
│ ├── Mood - Mood tracking
│ ├── Search - Search functionality
│ └── Stats - Analytics and metrics
├── Views (SwiftUI)
│ ├── ContentView - Main navigation split view
│ ├── EntryView - Entry creation/editing
│ ├── SearchView - Search interface
│ ├── StoreView - Content store
│ ├── SettingsView - Configuration
│ ├── QuizView - Training quiz interface
│ ├── NeuronActivationView - Neural network visualization
│ ├── TextClassifier - ML classification views
│ └── TrainingStats - Analytics dashboard
├── Services (Business Logic)
│ ├── ActionPerceptronService - Binary text classification
│ ├── KMeansClusteringService - K-Means implementation
│ ├── EnhancedKMeansClusteringService - Advanced clustering
│ ├── ModelTrainerService - ML model training orchestration
│ ├── WordEmbeddingService - Text embeddings
│ ├── TextTokenizationService - Text preprocessing
│ ├── MoodService - Sentiment analysis
│ ├── SimilarityService - Semantic similarity
│ ├── DeviceCapabilityProvider - Hardware capability detection
│ └── EmbeddingConfiguration - Dynamic ML configuration
├── Managers
│ ├── TrainingDataManager - Training example management
│ ├── ModelPersistenceManager - Model save/load
│ └── QuizManager - Quiz state management
├── Storage
│ ├── StorageProvider - Storage abstraction protocol
│ └── LocalStorageProvider - File-based implementation
├── Neuron (Custom Neural Network)
│ ├── Neuron - Base neuron implementation
│ ├── NeuronViewModel - Neuron state management
│ ├── ActivationFunctions - Sigmoid, ReLU, Tanh, etc.
│ ├── Components - Neuron building blocks
│ ├── HiddenLayers - Multi-layer architecture
│ └── Wrappers - Neuron wrapper utilities
└── ML Assets
├── UNPARTYTextClassifier.mlproj - Create ML project
├── UNPARTYTextClassifier.mlmodel - Trained model
└── BackgroundShaders.metal - Metal compute shadersIntegration Points
- Core ML: On-device machine learning inference and training
- Natural Language: Text analysis and linguistic feature extraction
- Metal: GPU-accelerated shaders for visual effects
- SwiftData: Modern Apple data persistence framework
- CloudKit: Potential cloud sync (infrastructure ready)
Business Value
ABOUT: Understanding User Patterns
- Perceptron Classification: Automatically categorizes user input as actionable or informational
- Clustering Intelligence: Groups similar entries to reveal patterns in user behavior and thought processes
- Mood Tracking: Provides sentiment insights across user entries
- Training Analytics: Visualizes model performance and learning progress
BUILD: Content Creation & Intelligence
- Entry System: Rich text entry creation with ML-powered classification
- Model Training: Users can train and refine their personal ML models through entries and quizzes
- Search Intelligence: Semantic search enables quick retrieval based on meaning, not just keywords
- Custom Neural Networks: Extensible neuron architecture for future AI capabilities
CONNECT: User Journey & Feedback
- Interactive Quizzes: Engages users in training their personal ML models
- Visual Feedback: Neuron activation view provides transparency into ML decision-making
- Training Stats: Comprehensive analytics dashboard shows model improvement over time
- Store System: Organized content management for sharing and review
Relationship to UNPARTY Ecosystem
Position in Ecosystem
theunpartybeta is a native iOS/macOS application focused on on-device machine learning and intelligent text processing. It represents an experimental branch of the UNPARTY platform, exploring:
- Personal ML model training without cloud dependencies
- On-device privacy-first intelligence
- Custom neural network implementations
- Hardware-accelerated visualizations
Data Flow
Ecosystem Alignment
| Aspect | theunpartybeta | Ecosystem Role |
|---|---|---|
| Privacy | ✅ On-device processing | Core principle: User data stays local |
| Cost | ✅ No cloud API costs | Budget-conscious ML |
| Ownership | ✅ User-trained models | Creator ownership of intelligence |
| Platform | iOS/macOS Native | Complements web platform |
Distinguishing Features
Unlike theunpartyunppp (CloudKit-based journal app) or theunpartyapp (Next.js web platform), theunpartybeta focuses on:
- Experimental ML: Testing perceptron and clustering algorithms for eventual integration
- On-Device Intelligence: Privacy-first ML without cloud dependencies
- Neural Network Visualization: Educational interface for understanding AI decisions
- Hardware Acceleration: Metal shaders for performance-critical operations
Development Setup
Prerequisites
- macOS: Ventura (13.0) or later
- Xcode: 14.0 or later
- Swift: 5.0 or later
- Target Devices: iOS 14+, macOS 11+
Getting Started
-
Clone the repository
bash
git clone https://github.com/unparty-app/theunpartybeta.git cd theunpartybeta -
Open in Xcode
bash
open unpartyappbeta.xcodeproj -
Configure Signing
- Select the
unpartyappbetatarget - Update Team to your Apple Developer account
- Bundle Identifier:
UNPARTY.unpartyappbeta
- Select the
-
Build and Run
- Select target device (iOS Simulator or Mac)
- Press
⌘Rto build and run
Project Structure
unpartyappbeta/- Main application source codeunpartyappbeta.xcodeproj/- Xcode project configurationUNPARTYTextClassifier.mlproj/- Create ML training projectBackgroundShaders.metal- Metal shader source
Machine Learning Details
Text Classification Pipeline
- Input: User enters text in entry view
- Preprocessing: TextTokenizationService extracts features
- Classification: ActionPerceptronService or UNPARTYTextClassifier processes text
- Result: Binary classification (action/non-action) with confidence score
Clustering Workflow
- Data Collection: Entries stored via LocalStorageProvider
- Embedding: WordEmbeddingService generates vector representations
- Clustering: KMeansClusteringService groups similar entries
- Visualization: ClusterView displays results
Training Process
- User Feedback: Quiz responses and manual classifications
- Data Storage: TrainingDataManager persists examples
- Model Update: ModelTrainerService retrains perceptron
- Persistence: ModelPersistenceManager saves updated weights
Device Adaptation
swift
// Automatic configuration based on device capabilities
let config = try EmbeddingConfiguration.from(
device: DeviceCapabilityProvider.current,
userPreferences: .default,
contentMetrics: ContentMetrics.default
)Key Technologies Explained
Perceptron Service
- Type: Binary linear classifier
- Algorithm: Weighted sum with threshold
- Features: Action keywords, imperative tone detection
- Training: Online learning from user feedback
- Use Case: Categorizing text as actionable vs informational
K-Means Clustering
- Implementation: Enhanced with multiple distance metrics (Euclidean, Cosine, Manhattan)
- Initialization: K-Means++ for better convergence
- Adaptation: Dynamic K selection based on data characteristics
- Use Case: Grouping similar entries for pattern discovery
Metal Shaders
- File:
BackgroundShaders.metal - Purpose: Hardware-accelerated background animations
- Integration: SwiftUI with Metal compute kernels
- Performance: GPU-based rendering for smooth 60fps visuals
Testing & Quality
ML Model Validation
- Training data integrity checks
- Classification accuracy tracking
- Clustering quality metrics (silhouette score)
- Device capability testing
UI Testing Targets
- Entry creation and editing flow
- Search functionality
- Quiz interaction
- Settings management
- Neuron visualization rendering
Future Roadmap
Planned Features
- Export trained models for use in other UNPARTY apps
- Cloud sync option while maintaining privacy (encrypted)
- Transformer-based embeddings for improved semantic understanding
- Multi-class classification beyond binary action detection
- Collaborative filtering for content recommendations
- Integration with theunpartyapp web platform
Research Areas
- Federated learning across user devices
- Differential privacy in model training
- On-device large language model fine-tuning
- Neural architecture search for optimal model size
Contributing
Code Style
- SwiftLint: Enforces Swift style guide (when configured)
- Architecture: MVVM pattern with protocol-oriented design
- Naming: Descriptive names following Swift conventions
- Comments: Document complex ML algorithms and business logic
Pull Request Process
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-ml-feature) - Commit changes with descriptive messages
- Test on both iOS and macOS targets
- Submit pull request with detailed description
License
Copyright © 2024 UNPARTY LLC
All rights reserved. This is proprietary software for the UNPARTY ecosystem.
Related Documentation
- theunpartyapp: Web platform with content management (Next.js + PostgreSQL)
- theunpartyunppp: CloudKit-based journaling app (Swift + SwiftUI)
- theunpartyrunway: Development automation and intelligence (Python + Bash)
- theunpartycrawler: Analytics intelligence and conversation processing (Python)
Contact & Support
- Developer: UNPARTY LLC
- Bundle ID:
UNPARTY.unpartyappbeta - Version: 1.0
- Platform: iOS 14+, macOS 11+
Status: 🔬 Experimental - Active ML Research & Development
Focus: Privacy-first, on-device machine learning with creator ownership and cost-sensitivity
Metrics
| Metric | Value |
|---|---|
| Language | Swift 5.0 |
| UI Framework | SwiftUI |
| ML Models | 3 (Perceptron, TextClassifier, K-Means) |
| Services | 20+ specialized services |
| Views | 15+ SwiftUI views |
| Storage | Local file system + SwiftData |
| Target Platforms | iOS, iPadOS, macOS |
Last Updated: 2025-10-29
Part of the UNPARTY Ecosystem - Measurable user progress through ABOUT → BUILD → CONNECT while protecting creator ownership, privacy, and cost-sensitivity.