A Firebase Firestore plugin for MultiCommentViewer that enables real-time storage of YouTube Live chat data.
Version 1.1.0 - Now fully integrated with MultiCommentViewer framework!
- Real-time Data Storage: Automatically stores YouTube Live comments, user information, and connection events to Firebase Firestore
- Configurable Collections: Customize Firestore collection names for different data types
- User Management: Tracks and stores YouTube user profiles with automatic updates
- Connection Logging: Records connection and disconnection events for analytics
- Easy Setup: Simple configuration through MultiCommentViewer's plugin interface
- MultiCommentViewer (compatible version)
- Firebase project with Firestore enabled
- Firebase service account JSON file
- Visual Studio 2019+ or .NET SDK (for building from source)
As of v1.1.0, this plugin is designed for seamless integration with MultiCommentViewer:
-
Clone MultiCommentViewer
git clone https://github.com/CommentViewerCollection/MultiCommentViewer.git cd MultiCommentViewer -
Add the Plugin as Submodule
git submodule add https://github.com/alweiz/McvFirestorePlugin.git McvFirestorePlugin
-
Update Solution File
- Open
MultiCommentViewer.slnin Visual Studio - Add the plugin project: Right-click solution → Add → Existing Project
- Select
McvFirestorePlugin/McvFirestorePlugin.csproj
- Open
-
Add Project Reference
- Right-click on
MultiCommentViewerproject → Add → Project Reference - Select
McvFirestorePluginfrom the list
- Right-click on
-
Configure Build Integration
- The plugin automatically integrates with MultiCommentViewer's build system
- Post-build events will copy files to
plugins/McvFirestore/directory
-
Build the Solution
dotnet build --configuration Debug
-
Integration Notes
- Uses MultiCommentViewer's interface framework (no duplicate interfaces)
- Compatible with Alpha, Beta, and Release build configurations
- Leverages Microsoft.Toolkit.Mvvm for improved MVVM support
-
Download Release
- Download from Releases page
- Extract
McvFirestorePlugin.dlland dependencies
-
Manual Installation
- Place all files in
MultiCommentViewer/Output/Debug/plugins/McvFirestorePlugin/ - Note: This method may have dependency issues
- Place all files in
-
Firebase Configuration
- Create a Firebase project at Firebase Console
- Enable Firestore Database
- Generate a service account key (JSON file)
- Note your Firebase Project ID
-
Plugin Configuration
- Launch MultiCommentViewer
- Go to Plugin settings and find "Firestore連携"
- Configure the following settings:
- Firebase Project ID: Your Firebase project ID
- Firebase Config JSON Path: Path to your service account JSON file
- Collection Paths: Customize Firestore collection names (optional)
The plugin stores data in the following Firestore collections:
{
userIconUrl: string,
userDisplayName: string,
messageType: string,
messageId: string,
text: string,
postedAt: timestamp
}{
id: string,
iconUrl: string,
displayName: string,
postedAt: timestamp
}{
text: string,
messageType: string // "Connected" or "Disconnected"
}| Setting | Description | Default Value |
|---|---|---|
| Firebase Project ID | Your Firebase project identifier | "Your project ID" |
| Firebase Config JSON Path | Path to service account JSON | %APPDATA%/MultiCommentViewer/McvFirestorePlugin/your-project-id-XXXXXXXXXXXX.json |
| YouTube Live Comment Collection | Firestore collection for chat messages | "youTubeLiveChatMessages" |
| YouTube User Collection | Firestore collection for user data | "youTubeUsers" |
| Connection Log Collection | Firestore collection for connection events | "youTubeLiveConnectionLogs" |
- Authentication: Uses Firebase service account for secure access
- Data Privacy: Only processes public YouTube Live chat data
- Local Storage: Configuration stored locally in MultiCommentViewer settings
- No Data Collection: This plugin does not collect personal data beyond public chat information
# Clone the repository
git clone https://github.com/alweiz/McvFirestorePlugin.git
cd McvFirestorePlugin
# Build the project
dotnet build
# Run tests
dotnet test McvFirestorePluginTests/
# The compiled plugin will be in bin/Debug/The project includes comprehensive unit tests covering:
- Options Management: Configuration serialization/deserialization
- Plugin Lifecycle: Loading, initialization, and cleanup
- Data Validation: Input validation and error handling
To run tests locally within MultiCommentViewer integration:
cd MultiCommentViewer
dotnet test McvFirestorePluginTests/- .NET Framework 4.6.2 or later
- Visual Studio 2019+ or .NET SDK
Core Dependencies:
- Google.Cloud.Firestore (3.8.0)
- Newtonsoft.Json (13.0.3)
- Extended.Wpf.Toolkit (4.6.1)
- Microsoft.Toolkit.Mvvm (7.1.2)
- System.ComponentModel.Composition (8.0.0)
- System.ServiceModel.Primitives (4.10.3)
MultiCommentViewer Integration (v1.1.0+):
- PluginCommon.csproj
- SitePlugin.csproj
- Plugin.csproj
- YouTubeLiveIF.csproj
- SitePluginCommon.csproj
- Seamless Integration: Direct integration with MultiCommentViewer's plugin framework
- No Duplicate Interfaces: Removed standalone interface definitions, now uses main project interfaces
- Framework Compatibility: Full compatibility with MultiCommentViewer's build system
- MVVM Framework Upgrade: Migrated from GalaSoft.MvvmLight to Microsoft.Toolkit.Mvvm
- Enhanced Type Safety: Improved Extensions.cs with proper IMessagePart type handling
- Build Configurations: Added Alpha and Beta build support to match MultiCommentViewer
- Extended.Wpf.Toolkit: 4.0.2 → 4.6.1
- Google.Cloud.Firestore: 3.0.0 → 3.8.0
- Newtonsoft.Json: 13.0.1 → 13.0.3
- Added: Microsoft.Toolkit.Mvvm 7.1.2
- Added: System.ServiceModel.Primitives 4.10.3
- Fixed interface conflicts with MultiCommentViewer
- Resolved Extensions.cs compilation errors
- Improved property change notifications
-
Plugin not loading
- Ensure
McvFirestorePlugin.dllis in the correct plugins directory - Check that all dependencies are available
- Ensure
-
Firebase connection errors
- Verify Firebase project ID is correct
- Ensure service account JSON file path is valid
- Check that Firestore is enabled in your Firebase project
-
Data not appearing in Firestore
- Confirm the plugin is enabled in settings
- Check collection names match your Firestore setup
- Verify service account has write permissions
- Check the Issues page for known problems
- Create a new issue if you encounter a bug
- Include relevant error messages and configuration details
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- MultiCommentViewer - The excellent multi-platform comment viewer
- Firebase - Real-time database platform
- Google Cloud Firestore - NoSQL document database