USER
theunpartyuser
Location: unparty-app/theunpartyuser
Status: Active Development
Primary Purpose: iOS/iPadOS native user journaling and personal insights application
Overview
theunpartyuser is a native iOS/iPadOS application designed for personal thought journaling, content metrics tracking, and user profile management. The app provides a clean, intuitive interface for capturing thoughts, tracking content complexity, and gaining insights into personal writing patterns.
Tech Stack
- Framework: SwiftUI
- Language: Swift 5.0
- Database: Local Storage (File-based with JSON encoding)
- Platform: iOS 18.1+, iPadOS 18.1+
- Build Tool: Xcode 16.1
- Deployment Target: iOS 18.1
- Architecture Pattern: MVVM (Model-View-ViewModel)
Key Dependencies:
- SwiftUI for UI framework
- SwiftData (imported but not actively used - planned for future)
- Foundation for core system services
- Combine for reactive programming
Current Data Persistence: Custom JSON-based LocalStorageProvider (see Storage System section)
Key Features
1. Thought Management
- Create, edit, and delete personal thoughts/journal entries
- Rich text content with title and timestamp
- Persistent local storage with async/await pattern
- Draft management system for work-in-progress thoughts
- Calendar-based thought organization
- Thought cards with visual presentation
2. Content Metrics & Analytics
- Complexity Analysis: Automatic content complexity scoring
- Content Type Classification: Text, conversation, technical content, mixed content
- Metadata Tracking:
- Average content length
- Unique term counting
- Technical complexity measurement
- Language confidence scoring
- Optional embedding support for semantic analysis
- Visual Insights: Metrics cards, stat badges, and insight rows
- Dashboard View: Comprehensive overview of content metrics
3. User Interface
- Side Menu Navigation: Organized by user, build, and content sections
- Tab-Based Interface: Easy switching between Dashboard, Thoughts, Ideas, Mood, Store, Settings, and Recent
- Theme System: Custom theming with consistent visual design
- User Profile Components:
- User header with image and name display
- User label management
- Feed-based content organization
- Search and filtering capabilities
4. Content Organization
- Quick Thoughts: Fast entry creation for capturing ideas on the go
- Thought History: Browse past entries chronologically
- Favorites: Mark and access important thoughts
- Search: Find specific content quickly
- Feed Labels: Categorize and organize content
5. Data Management
- Storage Provider Pattern: Abstract storage interface for flexibility
- Local File System: JSON-based persistence
- Mock Storage: Testing and preview support
- Async Operations: Non-blocking storage operations
- Error Handling: Comprehensive storage error management
Architecture
Code
Native iOS App (Swift/SwiftUI)
├── App Layer
│ ├── UserProfileApp.swift (Main app entry point)
│ └── ContentView.swift (Root view)
│
├── Views
│ ├── UserProfileView.swift (Main profile interface)
│ ├── SideMenuView.swift (Navigation drawer)
│ ├── ThoughtsView.swift (Thought management)
│ ├── ContentMetricsView.swift (Analytics dashboard)
│ └── Component Views (Cards, Rows, Headers)
│
├── ViewModels (MVVM Pattern)
│ ├── ThoughtViewModel (Thought business logic)
│ ├── ContentMetricsViewModel (Metrics logic)
│ ├── ViewPresentationState (UI state management)
│ └── AppMetrics (App-level metrics)
│
├── Models
│ ├── Thought (Journal entry model)
│ ├── ContentMetrics (Complexity analysis)
│ ├── SideMenuOptionModel (Navigation structure)
│ ├── FeedLabelOptionModel (Content labels)
│ ├── ComplexityModel (Content complexity)
│ └── User/Feed Models (Profile data)
│
├── Storage
│ ├── StorageProvider (Protocol)
│ ├── LocalStorageProvider (Implementation)
│ └── MockStorageProvider (Testing)
│
└── Resources
├── Theme.swift (Visual styling)
├── Assets.xcassets (Images & colors)
└── Info.plist (App configuration)Data Models
Thought Model
swift
struct Thought: Codable, Identifiable {
let id: UUID
let title: String
let content: String
let timestamp: Date
}ContentMetrics Model
swift
struct ContentMetrics: Codable {
let isComplex: Bool
let contentType: ContentType // text, conversation, technical, mixed
let complexityScore: Double
let contentSize: Int
let metadata: ContentMetadata
let embeddings: [Float]? // Optional semantic embeddings
}Storage Provider Protocol
swift
protocol StorageProvider {
func saveThought(_ thought: Thought) async throws
func fetchThoughts() async throws -> [Thought]
func deleteThought(_ id: UUID) async throws
func updateThought(_ thought: Thought) async throws
}Project Structure
Code
theunpartyuser/
├── UserProfile/ # Main application source
│ ├── UserProfileApp.swift # App entry point
│ ├── ContentView.swift # Root view
│ ├── UserProfileView.swift # Main profile view
│ ├── Theme.swift # Theming system
│ │
│ ├── userThoughts/ # Thought management
│ │ ├── Models/ # Thought data models
│ │ ├── Views/ # Thought UI components
│ │ ├── Data/ # Thought data operations
│ │ ├── quickThoughts/ # Quick entry feature
│ │ ├── thoughtButton/ # Action buttons
│ │ ├── ThoughtViewModel.swift # Business logic
│ │ ├── ThoughtsView.swift # Main thought view
│ │ ├── ThoughtCalendar.swift # Calendar organization
│ │ ├── ThoughtCard.swift # Thought display card
│ │ └── ThoughtJournal.swift # Journal interface
│ │
│ ├── userMetrics/ # Content analytics
│ │ ├── ContentMetrics.swift # Metrics model
│ │ ├── ContentMetricsView.swift # Metrics dashboard
│ │ ├── ContentMetricsViewModel.swift # Metrics logic
│ │ ├── MetricsCard.swift # Metric display card
│ │ ├── InsightsRow.swift # Insight components
│ │ ├── StatBadge.swift # Stat display
│ │ └── MetricsInsightView.swift # Detailed insights
│ │
│ ├── userHeader/ # User profile header
│ │ ├── UserImageView.swift # Profile image
│ │ ├── UserNameView.swift # User name display
│ │ ├── UserLabelView.swift # User labels
│ │ └── userModel.swift # User data model
│ │
│ ├── feedHeader/ # Content feed
│ │ ├── FeedMenuView.swift # Feed navigation
│ │ ├── FeedMenuHeaderView.swift # Feed header
│ │ ├── FeedSearchView.swift # Search interface
│ │ ├── FeedNameView.swift # Feed naming
│ │ ├── FeedLabelMenuView.swift # Label management
│ │ ├── FeedLabelRowView.swift # Label display
│ │ ├── FeedLabelOptionModel.swift # Label options
│ │ └── feedModel.swift # Feed data model
│ │
│ ├── userComplexity/ # Complexity analysis
│ │ ├── Models/ # Complexity models
│ │ │ └── ComplexityModel.swift
│ │ └── Views/ # Complexity views
│ │ └── InitialComplexityRowView.swift
│ │
│ ├── appMetrics/ # App-level metrics
│ │ └── appMetricsModel.swift # App metrics model
│ │
│ ├── StorageProvider/ # Data persistence
│ │ ├── StorageProvider.swift # Storage protocol
│ │ └── LocalStorageProvider.swift # Local storage impl
│ │
│ ├── SideMenuView.swift # Side navigation menu
│ ├── SideMenuHeaderView.swift # Menu header
│ ├── SideMenuRowView.swift # Menu row component
│ ├── SideMenuOptionModel.swift # Menu structure model
│ ├── ViewPresentationState.swift # UI state management
│ ├── Item.swift # Generic item model
│ │
│ ├── Assets.xcassets/ # Images & colors
│ │ ├── AccentColor.colorset
│ │ └── AppIcon.appiconset
│ │
│ ├── Preview Content/ # SwiftUI previews
│ │ └── Preview Assets.xcassets
│ │
│ ├── Info.plist # App configuration
│ └── UserProfile.entitlements # App capabilities
│
├── UserProfile.xcodeproj/ # Xcode project
│ ├── project.pbxproj # Project configuration
│ └── project.xcworkspace/ # Workspace settings
│
├── .github/
│ └── workflows/ # CI/CD workflows
│ └── objective-c-xcode.yml # Build automation
│
├── docs/ # Documentation
│ └── theunpartyuser-workflow.md # Workflow documentation
│
├── theunparty-objective-c-xcode.yml # Enhanced workflow config
└── validate-project.sh # Project validation scriptIntegration Points
Internal Systems
- Local File System: JSON-based persistence for thoughts and metrics
- iOS Notifications: Background mode support for remote notifications
Development Tools
- Xcode 16.1: Development and debugging
- GitHub Actions: CI/CD pipeline for automated builds
- xcpretty: Build output formatting
- SwiftLint (potential): Code quality and style enforcement
Future Integration Opportunities
- CloudKit: Cloud sync for thoughts across devices
- Pinecone: Semantic search with embeddings
- Analytics: User behavior and engagement tracking
- Export/Import: Backup and data portability
Business Value
ABOUT: Understanding User Journey
- Personal Insights: Track writing patterns and content complexity over time
- Progress Visualization: See growth in writing frequency and depth through metrics
- Self-Reflection: Calendar and history views provide perspective on personal evolution
- Content Classification: Understand types of content being created (text, technical, conversational)
BUILD: Enabling Creation
- Frictionless Capture: Quick thoughts feature enables rapid idea capture
- Organized Storage: Structured thought management with categorization and search
- Complexity Analysis: Automatic metrics help users understand their content depth
- Draft System: Work on thoughts over time without losing progress
- Visual Feedback: Real-time metrics encourage consistent creation
CONNECT: Facilitating Sharing
- Structured Data: Well-defined models enable future export and sharing features
- Feed System: Organized content presentation ready for social features
- Label System: Categorization supports content discovery and recommendation
- Metrics Sharing: Potential to share insights and achievements with community
- Export Ready: Codable models support various export formats (JSON, CSV, etc.)
Relationship to UNPARTY Ecosystem
Data Flow
- theunpartyrunway: Cost tracking for development expenses and velocity measurement
- theunpartycrawler: Potential analytics on user-generated content patterns
- theunpartyapp: Complementary web experience for content management
- theunpartyunppp: Sister application - similar journaling focus but different implementation
Common Patterns
- Investigation Workflow: Uses structured development methodology
- Documentation Standards: Maintains workflow documentation and technical specs
- Quality Enforcement: Xcode build validation and GitHub Actions CI/CD
- MVVM Architecture: Consistent with Swift app patterns in ecosystem
Differentiation
- theunpartyunppp: Uses CloudKit for sync; focuses on journal + stories + chat
- theunpartyuser: Uses local storage; focuses on personal insights + metrics + complexity analysis
- Both apps share the UNPARTY philosophy of creator ownership, privacy, and cost-sensitivity
Development Setup
Prerequisites
- macOS: macOS 15.0 or later
- Xcode: 16.1 or later
- iOS Device/Simulator: iOS 18.1 or later
- Apple Developer Account: For device testing (optional)
Installation
- Clone the repository:
bash
git clone https://github.com/unparty-app/theunpartyuser.git
cd theunpartyuser- Open in Xcode:
bash
open UserProfile.xcodeproj-
Select Target Device:
- Choose iPhone or iPad simulator from Xcode scheme selector
- Or connect a physical device with iOS 18.1+
-
Build and Run:
- Press
Cmd+Ror click the Run button - Wait for build to complete and app to launch
- Press
Project Configuration
Bundle Identifier: UNPARTY.UserProfile
Development Team: LL65276K8C
Deployment Target: iOS 18.1
Supported Devices: iPhone and iPad (Universal)
Swift Version: 5.0
Building & Testing
Building Locally
bash
# Build for simulator
xcodebuild build \
-project UserProfile.xcodeproj \
-scheme UserProfile \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=18.1'
# Build and analyze (static analysis)
xcodebuild clean build analyze \
-project UserProfile.xcodeproj \
-scheme UserProfileRunning Tests
bash
# Run unit tests
xcodebuild test \
-project UserProfile.xcodeproj \
-scheme UserProfile \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=18.1'Continuous Integration
The project uses GitHub Actions for automated builds on push and pull requests:
Workflow: .github/workflows/objective-c-xcode.yml
- Runs on: macOS 15 (for Xcode 16.x compatibility)
- Triggers: Push to
mainbranch, pull requests - Steps:
- Checkout repository
- Setup Xcode environment
- Install build dependencies (xcpretty)
- Validate project configuration
- Detect build scheme
- Build and analyze with static analysis
- Generate formatted output
Validation Script: validate-project.sh
- Checks project structure integrity
- Validates Xcode configuration
- Ensures build scheme availability
SwiftUI Previews
The project extensively uses SwiftUI previews for rapid UI development:
swift
#Preview {
ContentView()
.environmentObject(ThoughtViewModel.preview)
.withTheme()
}Preview Support:
- Mock storage providers for isolated preview data
- Preview-specific ViewModels with sample data
- Theme modifiers for consistent styling
- Environment object injection for dependency testing
Storage System
Storage Provider Pattern
The app uses a protocol-based storage system for flexibility and testability:
StorageProvider Protocol:
swift
protocol StorageProvider {
func saveThought(_ thought: Thought) async throws
func fetchThoughts() async throws -> [Thought]
func deleteThought(_ id: UUID) async throws
func updateThought(_ thought: Thought) async throws
}Implementations:
- LocalStorageProvider: File-based JSON persistence for production
- MockStorageProvider: In-memory storage for previews and testing
Error Handling:
swift
enum StorageError: Error {
case saveFailed
case emptyContent
case contentTooShort
case contentLength
case fetchFailed
case updateFailed
case deleteFailed
}Data Persistence
- Location: App documents directory
- Format: JSON encoding via Codable
- Access Pattern: Async/await for non-blocking operations
- Concurrency: Thread-safe with Swift's actor model
- Migration Path: Ready for CloudKit integration
Navigation Structure
The app uses a three-section side menu navigation:
User Section (Primary Features)
- Dashboard: Content metrics overview and insights
- Thoughts: Main journaling interface with draft management
- Ideas: Idea capture and organization (planned)
- Mood: Mood tracking and analysis (planned)
- Store: In-app content or features (planned)
Build Section (Settings & Configuration)
- Settings: App preferences and configuration
Content Section (History & Organization)
- Recent: Recently accessed or modified content
Navigation Model: SideMenuOptionModel enum with icons, titles, and view builders
Content Metrics System
Complexity Analysis
The app automatically analyzes content for:
-
Content Classification:
- Text: Simple written content
- Conversation: Dialogue or chat-style content
- Technical Content: Code, technical writing, documentation
- Mixed Content: Combination of types
-
Metrics Collected:
- Complexity Score (0.0 - 1.0): Overall content sophistication
- Content Size: Character/word count
- Average Length: Typical entry length
- Unique Terms: Vocabulary diversity
- Technical Complexity: Specialized terminology usage
- Language Confidence: Content clarity measure
-
Optional Features:
- Embeddings: Semantic vector representations for similarity search
- Embedding Confidence: Accuracy of semantic representation
Metrics Visualization
- MetricsCard: Individual metric display with icons
- StatBadge: Quick stat indicators
- InsightsRow: Detailed metric breakdowns
- ContentMetricsView: Full dashboard with multiple metrics
Theme System
The app uses a centralized theming system:
Theme Application:
swift
.withTheme() // View modifier for consistent stylingCustomizable Elements:
- Color schemes
- Typography
- Spacing and layout
- Component styling
- Dark/light mode support
Known Limitations & Future Enhancements
Current Limitations
- No Cloud Sync: Local storage only, no cross-device synchronization
- No User Authentication: Single user, no multi-user support
- Limited Export: No built-in export/import functionality
- Placeholder Features: Ideas, Mood, and Store sections not yet implemented
- No Search Implementation: Search UI exists but functionality incomplete
Planned Enhancements
- Cloud Synchronization: CloudKit integration for cross-device sync
- Enhanced Search: Full-text search with semantic capabilities
- Export/Import: Backup and restore functionality (JSON, CSV, Markdown)
- Rich Text Editor: Markdown support, formatting, and media attachments
- Mood Tracking: Emotional state tracking with insights
- Idea Management: Dedicated idea capture and brainstorming tools
- Analytics Dashboard: Enhanced metrics with trends and predictions
- Share Extensions: Share to app from other iOS apps
- Widgets: Home screen widgets for quick access and insights
- iPad Optimization: Enhanced iPad UI with multi-column layouts
Contributing
Development Workflow
- Create a feature branch from
main - Make changes following existing code patterns
- Test locally with Xcode simulator and previews
- Ensure build passes with no warnings
- Submit pull request with clear description
- CI/CD will automatically validate the build
Code Style
- Follow Swift API Design Guidelines
- Use SwiftUI best practices
- Maintain MVVM architecture pattern
- Write descriptive comments for complex logic
- Use async/await for asynchronous operations
- Leverage Swift's type system and safety features
Testing Requirements
- Add unit tests for new ViewModels
- Create mock data for previews
- Test on multiple device sizes (iPhone/iPad)
- Verify both light and dark mode appearance
- Test error handling paths
Documentation
- Workflow Documentation:
docs/theunpartyuser-workflow.md- Comprehensive CI/CD and build documentation - Project Configuration:
UserProfile.xcodeproj/project.pbxproj- Xcode build settings - Enhanced Workflow:
theunparty-objective-c-xcode.yml- GitHub Actions configuration - Validation Script:
validate-project.sh- Build validation automation
Security & Privacy
Data Protection
- Local Storage: All data stored locally on device
- No Analytics: No tracking or telemetry by default
- No Network Calls: Completely offline-capable
- User Control: Users own and control all their data
Code Signing
- Development Team: LL65276K8C
- Automatic Signing: Enabled for development builds
- Entitlements: Background mode for notifications (future use)
Privacy Philosophy
Aligned with UNPARTY ecosystem values:
- Creator Ownership: Users own their content
- Privacy First: No data collection or sharing
- Cost Sensitivity: Efficient local storage, no cloud costs
Troubleshooting
Common Issues
Build Fails on Xcode Version Mismatch:
bash
# Ensure Xcode 16.1 or later
xcodebuild -version
# Select correct Xcode if multiple installed
sudo xcode-select -s /Applications/Xcode.app/Contents/DeveloperSimulator Not Found:
bash
# List available simulators
xcrun simctl list devices
# Create new simulator if needed
xcrun simctl create "iPhone 15" "iPhone 15" "iOS 18.1"Storage Errors:
- Check app has write permissions to documents directory
- Verify disk space available
- Check console logs for specific error messages
Preview Crashes:
- Clean build folder (Cmd+Shift+K)
- Restart Xcode
- Check for missing mock data or environment objects
License
Copyright © 2025 UNPARTY LLC
All rights reserved.
Contact & Support
- Organization: UNPARTY LLC
- Repository: github.com/unparty-app/theunpartyuser
- Related Projects:
- theunpartyapp - Web platform
- theunpartyunppp - iOS journaling app
- theunpartyrunway - Development automation
- theunpartycrawler - Analytics intelligence
Changelog
Version 1.0 (Current)
- Initial release
- Thought management with CRUD operations
- Content metrics and complexity analysis
- Side menu navigation
- Dashboard with insights
- Local storage with async operations
- SwiftUI-based interface
- Theme system
- GitHub Actions CI/CD
Status: ✅ Active Development
Last Updated: 2025-01-29
iOS Version: 18.1+
Xcode Version: 16.1+
Swift Version: 5.0
Focus: Personal journaling with automated content insights, prioritizing user privacy, data ownership, and local-first architecture.