Experience poetry that adapts to the world around you
An intelligent iOS poetry app that curates daily poems and creates AI-generated verse based on real-world sentiment analysis. The app features dynamic background colors that respond to daily emotional vibes, creating an immersive and emotionally resonant poetry experience.
- Intelligent Color Adaptation: Background colors automatically change based on daily news sentiment analysis
- 10 Unique Mood Palettes: Each vibe (Hopeful, Energetic, Peaceful, etc.) has carefully crafted color schemes
- Light & Dark Mode Support: Adaptive colors for both system themes
- Smooth Transitions: Elegant 1.0-second animations between mood changes
- Intensity Scaling: Color vibrancy adjusts based on confidence and emotional intensity
- Daily Curated Poems: Hand-selected poetry updated daily
- Favorite Poems: Save and organize your favorite verses
- Share Functionality: Share poems with friends and social media
- Beautiful Typography: Optimized reading experience with serif fonts
- Accessibility Support: VoiceOver, Dynamic Type, and high contrast support
- Vibe-Based Poems: AI generates poetry matching the current daily mood
- Custom Prompts: Create personalized poems with your own topics
- Smart Context: AI considers current news sentiment and emotional tone
- Multiple Styles: Various poetry forms and styles available
- Real-time News Analysis: Processes current news to determine daily emotional tone
- 10 Distinct Vibes: Hopeful, Contemplative, Energetic, Peaceful, Melancholic, Inspiring, Uncertain, Celebratory, Reflective, Determined
- Sentiment Scoring: Advanced algorithms analyze positivity, energy, and complexity
- Visual Indicators: Color-coded vibe display with intensity feedback
- Home Screen Widgets: Display daily poems directly on your home screen
- Widget Synchronization: Real-time updates with the main app
- Multiple Sizes: Support for various widget configurations
- Background Updates: Automatic content refresh
- Privacy-First Telemetry: Optional usage analytics with full transparency
- Performance Monitoring: App performance and user experience tracking
- Debug Console: Advanced debugging tools for development
- Native SwiftUI: Pure SwiftUI implementation with iOS 18+ features
- MVVM Architecture: Clean separation of concerns with ViewModels
- Async/Await: Modern Swift concurrency throughout
- Combine Framework: Reactive data binding and state management
- Sentiment Analysis Engine: Custom algorithm for news emotion detection
- Keyword Extraction: Intelligent content analysis and categorization
- Confidence Scoring: Probabilistic assessment of mood classifications
- Background Color Intelligence: Dynamic color selection based on emotional state
- Core Data Integration: Persistent storage for favorites and user data
- News API Integration: Real-time news fetching and processing
- Caching Strategy: Intelligent data caching for offline functionality
- Migration Support: Seamless data migration between app versions
- 250+ Test Functions: Comprehensive test coverage across 27 test files
- Unit Tests (150 functions): Core logic, models, services, and AI components
- UI Tests (100 functions): Complete user interface and interaction testing
- Performance Tests: Memory usage, launch time, and responsiveness validation
- Accessibility Tests: VoiceOver, Dynamic Type, and inclusive design verification
Vibe | Light Mode | Dark Mode | Description |
---|---|---|---|
Hopeful | Sunrise gold & warm amber | Deep gold & rich amber | Warm, optimistic tones inspiring positivity |
Energetic | Vibrant orange & coral | Electric orange & crimson | High-energy colors that invigorate and motivate |
Peaceful | Soft sage & tranquil blue | Forest green & midnight blue | Calming nature-inspired hues for serenity |
Melancholic | Muted lavender & soft gray | Deep purple & charcoal | Gentle, introspective colors for contemplation |
Contemplative | Thoughtful blue & periwinkle | Navy & deep indigo | Intellectual tones encouraging deep thinking |
Inspiring | Rich gold & champagne | Bronze & burnished gold | Luxurious colors that spark creativity |
Celebratory | Bright coral & festive pink | Magenta & deep rose | Joyful, party-like colors for special moments |
Reflective | Soft indigo & lavender mist | Deep violet & midnight purple | Introspective shades for self-examination |
Determined | Strong teal & ocean blue | Steel blue & deep teal | Confident colors representing strength and resolve |
Uncertain | Gentle gray & cloudy blue | Storm gray & slate blue | Neutral tones reflecting ambiguity and questioning |
- Xcode 16.0+
- iOS 18.0+ deployment target
- macOS 14.0+ for development
- Apple Developer account (for device testing)
-
Clone the repository
git clone https://github.com/your-username/poem-of-the-day.git cd poem-of-the-day
-
Open in Xcode
open "Poem of the Day.xcodeproj"
-
Configure API Keys (Optional)
- Add news API credentials to
AppConfiguration.swift
- Configure AI service endpoints if using external providers
- Add news API credentials to
-
Build and Run
- Select your target device or simulator
- Press
Cmd+R
to build and run
Create a Config.plist
file with your API configurations:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NewsAPIKey</key>
<string>your-news-api-key</string>
<key>AIServiceEndpoint</key>
<string>your-ai-service-url</string>
</dict>
</plist>
All Tests
xcodebuild test -scheme "Poem of the Day" -destination "platform=iOS Simulator,name=iPhone 16"
Unit Tests Only
xcodebuild test -scheme "Poem of the Day" -destination "platform=iOS Simulator,name=iPhone 16" -only-testing:"Poem of the DayTests"
UI Tests Only
xcodebuild test -scheme "Poem of the Day" -destination "platform=iOS Simulator,name=iPhone 16" -only-testing:"Poem of the DayUITests"
Background Color Tests
xcodebuild test -scheme "Poem of the Day" -destination "platform=iOS Simulator,name=iPhone 16" -only-testing:"Poem of the DayTests/VibeAnalyzerTests"
- Core Logic: 95%+ coverage of business logic and data models
- UI Components: 100% coverage of user interface flows
- AI Features: Comprehensive testing of sentiment analysis and poem generation
- Background Colors: Complete validation of vibe-based color system
- Accessibility: Full VoiceOver and Dynamic Type support verification
- Performance: Memory usage, launch time, and responsiveness benchmarks
- Edge Cases: Error handling, network failures, and data corruption scenarios
Poem of the Day/
βββ π± App/
β βββ Poem_of_the_DayApp.swift # App entry point
β βββ AppConfiguration.swift # Configuration and environment setup
βββ π¨ Views/
β βββ Screens/
β β βββ ContentView.swift # Main app interface with dynamic backgrounds
β β βββ VibeGenerationView.swift # AI poem generation interface
β β βββ TelemetryDebugView.swift # Analytics debug console
β βββ Components/
β βββ LoadingView.swift # Loading states and animations
β βββ ErrorView.swift # Error handling and recovery
βββ π§ Models/
β βββ Poem.swift # Core poem data model
β βββ VibeModels.swift # Vibe analysis and color definitions
β βββ PoemError.swift # Error types and handling
βββ βοΈ Services/
β βββ VibeAnalyzer.swift # AI sentiment analysis and color calculation
β βββ PoemGenerationService.swift # AI poem creation
β βββ NewsService.swift # News fetching and processing
β βββ PoemRepository.swift # Data persistence and favorites
β βββ TelemetryService.swift # Analytics and performance monitoring
β βββ NetworkService.swift # HTTP networking and API calls
βββ π― ViewModels/
β βββ PoemViewModel.swift # Main app state and business logic
βββ π§ͺ Tests/
β βββ Core/ # Unit tests for business logic
β βββ Platform/ # Device and platform-specific tests
β βββ Security/ # Security and input validation tests
β βββ Performance/ # Performance and optimization tests
β βββ Localization/ # Multi-language support tests
β βββ Migration/ # Data migration and compatibility tests
β βββ Background/ # Background processing tests
β βββ EdgeCases/ # Edge case and error scenario tests
βββ π§ͺ UITests/
βββ VibeBackgroundColorUITests.swift # Background color system validation
βββ AIFeaturesUITests.swift # AI functionality user interface tests
βββ AccessibilityUITests.swift # Accessibility and inclusive design tests
βββ PerformanceUITests.swift # UI performance and responsiveness tests
- β¨ New Vibe-Based Backgrounds: 10 unique color palettes responding to daily mood
- π¨ Intelligent Color Intensity: Dynamic color strength based on sentiment confidence
- π Enhanced Dark Mode: Adaptive color schemes for both light and dark themes
- β‘ Smooth Animations: 1-second transitions between background changes
- π§ͺ Comprehensive Testing: 20+ new tests for color system validation
- π€ AI-Powered Poems: Generate custom poetry based on current vibe
- π° News Sentiment Analysis: Real-time mood detection from current events
- π― Custom Prompts: User-directed poem generation
- π Advanced Analytics: Enhanced telemetry and performance monitoring
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
xcodebuild test
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow Swift API Design Guidelines
- Use SwiftLint for code formatting
- Include comprehensive test coverage
- Document public APIs with Swift DocC
This project is licensed under the MIT License - see the LICENSE file for details.
- Poetry Database: Curated collection of public domain poetry
- News APIs: Real-time news sentiment analysis providers
- AI Services: Machine learning models for text generation and analysis
- Open Source Community: Libraries and frameworks that made this possible
- π Bug Reports: Create an issue
- π‘ Feature Requests: Discussion board
- π§ Contact: [email protected]
- π Documentation: Wiki
Made with β€οΈ and Swift