{"id":30686107,"url":"https://github.com/max21dev/banter","last_synced_at":"2025-09-01T22:44:08.892Z","repository":{"id":310517865,"uuid":"1040126731","full_name":"max21dev/banter","owner":"max21dev","description":"Lightning-Fast Native Group Chat over Nostr","archived":false,"fork":false,"pushed_at":"2025-08-18T15:16:12.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-18T17:28:26.949Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/max21dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-18T13:50:58.000Z","updated_at":"2025-08-18T15:16:15.000Z","dependencies_parsed_at":"2025-08-18T17:30:01.012Z","dependency_job_id":"320e1de8-221e-4bb6-8087-fdc4fef4b332","html_url":"https://github.com/max21dev/banter","commit_stats":null,"previous_names":["max21dev/banter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/max21dev/banter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max21dev%2Fbanter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max21dev%2Fbanter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max21dev%2Fbanter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max21dev%2Fbanter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/max21dev","download_url":"https://codeload.github.com/max21dev/banter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max21dev%2Fbanter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273203240,"owners_count":25063275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-01T22:44:07.785Z","updated_at":"2025-09-01T22:44:08.883Z","avatar_url":"https://github.com/max21dev.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Banter: Lightning-Fast Native Group Chat over Nostr\n\n\u003e **Note:** This is a work in progress and is not ready for public release.\n\nBanter is a native iOS/macOS application that implements the Nostr protocol for decentralized group chat. It delivers a seamless, instant messaging experience with real-time updates and smooth offline access, ensuring users enjoy responsive performance and uninterrupted conversations.\n\n## ✨ Features\n\n### Core Functionality\n- **NIP-29 Group Chat Support** - Full implementation of NIP-29 group chat specification\n- **Real-time Messaging** - Live message updates via WebSocket connections\n- **Flexible Relay Connections** - Connect to any NIP-29 Nostr relay of your choice with seamless relay switching\n- **User Profiles** - Rich user metadata with avatars and bios\n- **Group Management** - Join, leave, and manage group memberships\n\n### Advanced Caching System\n- **3-Tier Cache Architecture** - Memory, disk, and network caching\n- **Offline Support** - Access previously viewed content without internet\n- **Smart Prefetching** - Intelligent loading of user profiles and images\n- **Cache-First Loading** - Instant UI updates with background refresh\n- **Automatic \u0026 Manual Cleanup** - Intelligent cache management and expiration, with options for users to trigger manual cache clearing\n\n## 📱 Screenshots \u0026 Demos\n\n### App Screenshots\n\n#### macOS\n\n\u003cimg width=\"864\" height=\"500\" alt=\"mac_multipage\" src=\"https://github.com/user-attachments/assets/faf7ea97-1427-437c-88ae-3f24f96ee72c\" /\u003e\n\n#### iOS\n\n\u003cimg width=\"247\" height=\"528\" alt=\"iPhone_profile\" src=\"https://github.com/user-attachments/assets/1e7d2454-afb1-4c10-9889-ae7e0a9ae09d\" /\u003e\n\u003cimg width=\"245\" height=\"526\" alt=\"iPhone_messages\" src=\"https://github.com/user-attachments/assets/53e3992d-cd37-46bd-b1ad-cdd84a3c4e58\" /\u003e\n\u003cimg width=\"247\" height=\"524\" alt=\"iPhone_members\" src=\"https://github.com/user-attachments/assets/c1e4b869-72f8-4dd9-9e1f-f0448aba0647\" /\u003e\n\n### Screen Recordings\n\n#### macOS\n\n![mac_record](https://github.com/user-attachments/assets/52cf41ce-6392-46f3-a011-0cb3eca26b37)\n\n#### iOS\n\n![iPhone_record](https://github.com/user-attachments/assets/aa45f3c3-d4b1-4e01-b9c9-c8f0550e854e)\n\n## 🏗️ Architecture\n\n### Caching Components\n\n```\n┌─────────────────────┐\n│   SwiftUI Views     │\n├─────────────────────┤\n│  Cached Services    │ ← CachedGroupChatService, CachedUserMetadataService\n├─────────────────────┤\n│   Cache Managers    │ ← Group, Message, User, Image Cache Managers\n├─────────────────────┤\n│   Core Data Stack   │ ← SQLite persistent storage\n├─────────────────────┤\n│   Network Layer     │ ← NostrRelayManager, WebSocket connections\n└─────────────────────┘\n```\n\n### Key Files\n\n- **Services/**\n  - `CachedGroupChatService.swift` - Enhanced group chat with caching\n  - `CachedUserMetadataService.swift` - User profile caching\n  - `ImageCacheManager.swift` - Avatar and image caching\n  - `PersistenceManager.swift` - Core Data management\n  - `CachePolicyManager.swift` - Cache policies and cleanup\n\n- **Models/**\n  - `BanterDataModel.xcdatamodeld` - Core Data model\n  - `NostrModels.swift` - Nostr protocol models\n\n- **Views/**\n  - `CachedUserAvatarView.swift` - Cached avatar display\n  - `CacheStatusView.swift` - Cache monitoring UI\n\n## 🚀 Getting Started\n\n### Prerequisites\n- iOS 15.0+ / macOS 12.0+\n- Xcode 14.0+\n- Swift 5.7+\n- Basic understanding of Nostr protocol\n\n### Installation\n\n#### Option 1: Clone and Build\n```bash\n# Clone the repository\ngit clone https://github.com/max21dev/banter.git\ncd banter\n\n# Open in Xcode\nopen banter.xcodeproj\n\n# Build and run\n# Select your target device and press Cmd+R\n```\n\n#### Option 2: Build Server Setup (Advanced)\nFor advanced users who want to use the build server:\n\n```bash\n# Copy environment configuration\ncp env.example .env\n\n# Edit .env with your paths\nnano .env\n\n# Run setup script\nchmod +x setup-buildserver.sh\n./setup-buildserver.sh\n```\n\n### Configuration\nThe app automatically configures optimal caching settings. To customize:\n\n```swift\n// Modify cache policies in CachePolicyManager.swift\nstruct CachePolicy {\n    let userProfileExpiration: TimeInterval = 24 * 60 * 60 // 24 hours\n    let maxMessagesPerGroup: Int = 1000\n    let maxImageCacheSize: Int64 = 100 * 1024 * 1024 // 100 MB\n}\n```\n\n## 📖 Usage\n\n### Basic Operations\n- **Join Groups**: Connect to NIP-29 relays, discover, and join groups\n- **Send Messages**: Real-time messaging with other group members\n- **View Profiles**: See user information and avatars\n- **Search**: Find groups and messages across all cached content\n\n### Cache Management\n- **Automatic**: The app handles all caching automatically\n- **Manual Cleanup**: Use the settings to clear the cache\n\n## 🔧 Development\n\n### Project Structure\n```\nbanter/\n├── banter/                    # Main app source\n│   ├── Assets.xcassets/      # App icons and colors\n│   ├── Models/               # Data models\n│   ├── Network/              # Network layer\n│   ├── Services/             # Business logic\n│   ├── Utils/                # Utilities\n│   └── Views/                # SwiftUI views\n├── banterTests/              # Unit tests\n├── banterUITests/            # UI tests\n└── Documentation/             # Project docs\n```\n\n### Building from Source\n1. Ensure you have the latest Xcode version\n2. Open `banter.xcodeproj` in Xcode\n3. Select your target device (iOS Simulator, macOS, or physical device)\n4. Press `Cmd+B` to build\n5. Press `Cmd+R` to run\n\n### Testing\n```bash\n# Run unit tests\nxcodebuild test -project banter.xcodeproj -scheme banter -destination 'platform=iOS Simulator,name=iPhone 15'\n\n# Run UI tests\nxcodebuild test -project banter.xcodeproj -scheme banter -destination 'platform=iOS Simulator,name=iPhone 15' -only-testing:banterUITests\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n### Development Setup\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes\n4. Add tests if applicable\n5. Commit your changes: `git commit -m 'Add amazing feature'`\n6. Push to the branch: `git push origin feature/amazing-feature`\n7. Open a Pull Request\n\n### Code Style\n- Follow Swift API Design Guidelines\n- Use SwiftLint for code formatting\n- Write unit tests for new functionality\n- Update documentation for API changes\n\n## 📚 Technical Details\n\n### Nostr Protocol Support\n- **NIP-01**: Basic protocol implementation\n- **NIP-29**: Group chat specification\n- **WebSocket**: Real-time relay connections\n- **Cryptography**: Event signing and verification\n\n### Data Flow\n1. **Cache Check**: Always check cache first\n2. **UI Update**: Immediate display of cached data\n3. **Network Fetch**: Background refresh from relays\n4. **Cache Update**: Store new data for future use\n\n### Error Handling\n- Graceful fallbacks for network issues\n- Cache corruption recovery\n- Offline mode support\n- Connection retry logic\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n#### Build Errors\n- Ensure you have the correct Xcode version\n- Clean build folder: `Cmd+Shift+K`\n- Reset package caches: `File \u003e Packages \u003e Reset Package Caches`\n\n#### Runtime Issues\n- Check relay connectivity in settings\n- Verify Nostr identity is properly configured\n- Monitor cache status for storage issues\n\n#### Performance Issues\n- Check cache hit rates in the status view\n- Monitor memory usage\n- Verify relay response times\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Nostr protocol community and contributors\n- NIP-29 specification authors\n- Swift and SwiftUI development teams\n- All contributors and testers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmax21dev%2Fbanter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmax21dev%2Fbanter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmax21dev%2Fbanter/lists"}