Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Deveel.Messaging.Model.sln
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Messaging.Connector.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Messaging.Connector.Firebase.XUnit", "test\Deveel.Messaging.Connector.Firebase.XUnit\Deveel.Messaging.Connector.Firebase.XUnit.csproj", "{FAA38244-1DFE-A70C-4F12-3012E65A9779}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Messaging.Connector.Facebook", "src\Deveel.Messaging.Connector.Facebook\Deveel.Messaging.Connector.Facebook.csproj", "{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deveel.Messaging.Connector.Facebook.XUnit", "test\Deveel.Messaging.Connector.Facebook.XUnit\Deveel.Messaging.Connector.Facebook.XUnit.csproj", "{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -191,6 +195,30 @@ Global
{FAA38244-1DFE-A70C-4F12-3012E65A9779}.Release|x64.Build.0 = Release|Any CPU
{FAA38244-1DFE-A70C-4F12-3012E65A9779}.Release|x86.ActiveCfg = Release|Any CPU
{FAA38244-1DFE-A70C-4F12-3012E65A9779}.Release|x86.Build.0 = Release|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Debug|x64.ActiveCfg = Debug|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Debug|x64.Build.0 = Debug|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Debug|x86.ActiveCfg = Debug|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Debug|x86.Build.0 = Debug|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Release|Any CPU.Build.0 = Release|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Release|x64.ActiveCfg = Release|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Release|x64.Build.0 = Release|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Release|x86.ActiveCfg = Release|Any CPU
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26}.Release|x86.Build.0 = Release|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Debug|x64.ActiveCfg = Debug|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Debug|x64.Build.0 = Debug|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Debug|x86.Build.0 = Debug|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Release|Any CPU.Build.0 = Release|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Release|x64.ActiveCfg = Release|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Release|x64.Build.0 = Release|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Release|x86.ActiveCfg = Release|Any CPU
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -208,6 +236,8 @@ Global
{99577C80-2B4C-47DD-A274-788A5CF86B68} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{3931E0C7-2B09-5C0A-1EDF-1EB97A545F93} = {0F91077D-AC47-4319-96FF-09CA6EE50CC6}
{FAA38244-1DFE-A70C-4F12-3012E65A9779} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{BAA0E8C8-0BAF-3908-4ACE-48FCDDB9BD26} = {0F91077D-AC47-4319-96FF-09CA6EE50CC6}
{6DE730ED-C03C-7F63-E5C3-06920CD5B0FE} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64BF9420-C7A8-4D2B-804F-41EB2E83437F}
Expand Down
43 changes: 34 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ This directory contains comprehensive documentation for the Deveel Messaging Fra
|-----------|----------|------|---------------|
| **Twilio SMS** | Twilio | SMS | [?? Complete Guide](connectors/twilio-sms-connector.md) |
| **Twilio WhatsApp** | Twilio | WhatsApp | [?? Complete Guide](connectors/twilio-whatsapp-connector.md) |
| **Facebook Messenger** | Facebook | Messenger | [?? Complete Guide](connectors/facebook-messenger-connector.md) |
| **Firebase FCM** | Firebase | Push | [?? Complete Guide](connectors/firebase-push-connector.md) |
| **SendGrid Email** | SendGrid | Email | [?? Complete Guide](connectors/sendgrid-email-connector.md) |

Expand All @@ -39,14 +40,14 @@ Each connector guide includes:

### ?? Quick Connector Comparison

| Feature | SMS | WhatsApp | Push | Email |
|---------|-----|----------|------|-------|
| **Send Messages** | ? | ? | ? | ? |
| **Receive Messages** | ? | ? | ? | ? |
| **Templates** | ? | ? | ? | ? |
| **Media Support** | ? | ? | ? | ? |
| **Batch Operations** | ? | ? | ? | ? |
| **Interactive Elements** | ? | ? | ? | ? |
| Feature | SMS | WhatsApp | Facebook Messenger | Push | Email |
|---------|-----|----------|-------------------|------|-------|
| **Send Messages** | ? | ? | ? | ? | ? |
| **Receive Messages** | ? | ? | ? | ? | ? |
| **Templates** | ? | ? | ? | ? | ? |
| **Media Support** | ? | ? | ? | ? | ? |
| **Batch Operations** | ? | ? | ? | ? | ? |
| **Interactive Elements** | ? | ? | ? | ? | ? |

## ?? Quick Navigation

Expand All @@ -68,6 +69,17 @@ Each connector guide includes:

## ?? Latest Framework Features

### ?? Facebook Messenger Platform Integration
- **Interactive Messaging**: Complete Facebook Messenger connector with quick replies and media support
- **Bidirectional Communication**: Send and receive messages via Facebook webhooks
- **Graph API v21.0**: Full compliance with the latest Facebook Graph API version
- **RestSharp Integration**: Modern HTTP client with proper error handling and validation
- **Quick Replies**: Interactive quick reply buttons (up to 13 per message)
- **Media Attachments**: Images, videos, audio, and file sharing
- **Health Monitoring**: Built-in connection testing and comprehensive health checks

**?? [Complete Facebook Messenger Documentation](connectors/facebook-messenger-connector.md)**

### ?? Firebase Cloud Messaging (FCM) Support
- **Push Notifications**: Complete Firebase connector for mobile and web push notifications
- **Device Targeting**: Send to specific device tokens or broadcast to topics
Expand Down Expand Up @@ -169,6 +181,18 @@ var whatsAppSchema = new ChannelSchema("Twilio", "WhatsApp", "2.1.0")
ChannelCapability.MediaAttachments);
```

### Facebook Messenger
```csharp
var messengerSchema = new ChannelSchema("Facebook", "Messenger", "1.0.0")
.AllowsMessageEndpoint(EndpointType.FacebookUserId)
.AddContentType(MessageContentType.PlainText)
.AddContentType(MessageContentType.Media)
.WithCapabilities(
ChannelCapability.SendMessages |
ChannelCapability.ReceiveMessages |
ChannelCapability.MediaAttachments);
```

### Push Notifications
```csharp
var pushSchema = new ChannelSchema("Firebase", "Push", "1.0.0")
Expand Down Expand Up @@ -285,9 +309,10 @@ The framework provides excellent development experience:
### Connector Capabilities Matrix

| Connector | Send | Receive | Status | Batch | Templates | Media | Health |
|-----------|------|---------|--------|-------|-----------|-------|---------|
|-----------|:----:|:-------:|:------:|:-----:|:---------:|:-----:|:------:|
| Twilio SMS | ? | ? | ? | ? | ? | ? | ? |
| Twilio WhatsApp | ? | ? | ? | ? | ? | ? | ? |
| Facebook Messenger | ? | ? | ? | ? | ? | ? | ? |
| SendGrid Email | ? | ? | ? | ? | ? | ? | ? |
| Firebase FCM | ? | ? | ? | ? | ? | ? | ? |

Expand Down
56 changes: 35 additions & 21 deletions docs/connectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This directory contains comprehensive documentation for all available connectors
|-----------|----------|------|---------------|---------|
| **Twilio SMS** | Twilio | SMS | [?? Complete Guide](twilio-sms-connector.md) | `Deveel.Messaging.Connector.Twilio` |
| **Twilio WhatsApp** | Twilio | WhatsApp | [?? Complete Guide](twilio-whatsapp-connector.md) | `Deveel.Messaging.Connector.Twilio` |
| **Facebook Messenger** | Facebook | Messenger | [?? Complete Guide](facebook-messenger-connector.md) | `Deveel.Messaging.Connector.Facebook` |
| **Firebase FCM** | Firebase | Push | [?? Complete Guide](firebase-push-connector.md) | `Deveel.Messaging.Connector.Firebase` |
| **SendGrid Email** | SendGrid | Email | [?? Complete Guide](sendgrid-email-connector.md) | `Deveel.Messaging.Connector.Sendgrid` |

Expand All @@ -27,6 +28,13 @@ dotnet add package Deveel.Messaging.Connector.Twilio
```
?? **[Complete WhatsApp Business Setup Guide](twilio-whatsapp-connector.md)**

### Facebook Messenger
**Install and configure Facebook Messenger Platform:**
```bash
dotnet add package Deveel.Messaging.Connector.Facebook
```
?? **[Complete Facebook Messenger Setup Guide](facebook-messenger-connector.md)**

### Push Notifications
**Install and configure Firebase Cloud Messaging:**
```bash
Expand All @@ -45,7 +53,7 @@ dotnet add package Deveel.Messaging.Connector.Sendgrid

Each connector documentation provides comprehensive coverage:

### ? **Installation & Setup**
### ?? **Installation & Setup**
- NuGet package installation instructions
- Required dependencies and prerequisites
- Configuration parameter setup
Expand Down Expand Up @@ -83,16 +91,13 @@ Each connector documentation provides comprehensive coverage:

## ?? Connector Capabilities Matrix

| Capability | Twilio SMS | Twilio WhatsApp | Firebase FCM | SendGrid Email |
|------------|------------|------------------|--------------|----------------|
| **Send Messages** | ? | ? | ? | ? |
| **Receive Messages** | ? | ? | ? | ? |
| **Status Tracking** | ? | ? | ? | ? |
| **Batch Operations** | ? | ? | ? | ? |
| **Templates** | ? | ? | ? | ? |
| **Media Attachments** | ? | ? | ? | ? |
| **Health Monitoring** | ? | ? | ? | ? |
| **Webhook Support** | ? | ? | ? | ? |
| Connector | Send Messages | Receive Messages | Status Tracking | Batch Operations | Templates | Media Attachments | Health Monitoring | Webhook Support | Quick Replies | Interactive Elements |
|-----------|:-------------:|:----------------:|:---------------:|:----------------:|:---------:|:-----------------:|:-----------------:|:---------------:|:-------------:|:--------------------:|
| **Twilio SMS** | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
| **Twilio WhatsApp** | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
| **Facebook Messenger** | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
| **Firebase FCM** | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
| **SendGrid Email** | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |

## ?? Use Case Recommendations

Expand All @@ -104,31 +109,35 @@ Each connector documentation provides comprehensive coverage:
| **SMS Verification** | [Twilio SMS](twilio-sms-connector.md) | High delivery rates, global reach |
| **Push Notifications** | [Firebase FCM](firebase-push-connector.md) | Real-time, cross-platform |
| **WhatsApp Business** | [Twilio WhatsApp](twilio-whatsapp-connector.md) | High engagement, rich media |

### Marketing Campaigns

| Use Case | Recommended Connector | Why |
|----------|----------------------|-----|
| **Email Newsletters** | [SendGrid Email](sendgrid-email-connector.md) | Advanced tracking, templates |
| **SMS Campaigns** | [Twilio SMS](twilio-sms-connector.md) | Bulk messaging, opt-out handling |
| **App Promotions** | [Firebase FCM](firebase-push-connector.md) | Topic messaging, segmentation |
| **WhatsApp Marketing** | [Twilio WhatsApp](twilio-whatsapp-connector.md) | Interactive elements, templates |
| **Facebook Messenger** | [Facebook Messenger](facebook-messenger-connector.md) | Interactive, quick replies |

### Customer Support

| Use Case | Recommended Connector | Why |
|----------|----------------------|-----|
| **Support Tickets** | [SendGrid Email](sendgrid-email-connector.md) | Threading, attachments |
| **Live Chat** | [Facebook Messenger](facebook-messenger-connector.md) | Real-time conversation |
| **Urgent Alerts** | [Twilio SMS](twilio-sms-connector.md) | Immediate delivery |
| **App Notifications** | [Firebase FCM](firebase-push-connector.md) | In-app alerts |
| **WhatsApp Support** | [Twilio WhatsApp](twilio-whatsapp-connector.md) | Two-way conversation |

### Marketing Campaigns

| Use Case | Recommended Connector | Why |
|----------|----------------------|-----|
| **Email Newsletters** | [SendGrid Email](sendgrid-email-connector.md) | Advanced tracking, templates |
| **SMS Campaigns** | [Twilio SMS](twilio-sms-connector.md) | Bulk messaging, opt-out handling |
| **App Promotions** | [Firebase FCM](firebase-push-connector.md) | Topic messaging, segmentation |
| **WhatsApp Marketing** | [Twilio WhatsApp](twilio-whatsapp-connector.md) | Interactive elements, templates |
| **Facebook Engagement** | [Facebook Messenger](facebook-messenger-connector.md) | Quick replies, interactive |

## ?? Multi-Connector Patterns

### Installation for Multiple Providers
```bash
# Install multiple connectors for comprehensive messaging
dotnet add package Deveel.Messaging.Connector.Twilio # SMS + WhatsApp
dotnet add package Deveel.Messaging.Connector.Facebook # Facebook Messenger
dotnet add package Deveel.Messaging.Connector.Firebase # Push notifications
dotnet add package Deveel.Messaging.Connector.Sendgrid # Email delivery
```
Expand All @@ -138,6 +147,7 @@ dotnet add package Deveel.Messaging.Connector.Sendgrid # Email delivery
public class NotificationService
{
private readonly TwilioSmsConnector _smsConnector;
private readonly FacebookMessengerConnector _facebookConnector;
private readonly SendGridEmailConnector _emailConnector;
private readonly FirebasePushConnector _pushConnector;

Expand All @@ -148,6 +158,9 @@ public class NotificationService
case NotificationChannel.SMS:
await _smsConnector.SendMessageAsync(CreateSmsMessage(user, message));
break;
case NotificationChannel.FacebookMessenger:
await _facebookConnector.SendMessageAsync(CreateFacebookMessage(user, message));
break;
case NotificationChannel.Email:
await _emailConnector.SendMessageAsync(CreateEmailMessage(user, message));
break;
Expand Down Expand Up @@ -213,14 +226,15 @@ public async Task SendMessage_RealProvider_DeliversMessage()
| Provider | Documentation | Console | Support |
|----------|---------------|---------|---------|
| **Twilio** | [Docs](https://www.twilio.com/docs) | [Console](https://console.twilio.com) | [Support](https://support.twilio.com) |
| **Facebook** | [Docs](https://developers.facebook.com/docs/messenger-platform) | [Console](https://developers.facebook.com) | [Support](https://developers.facebook.com/support) |
| **Firebase** | [Docs](https://firebase.google.com/docs) | [Console](https://console.firebase.google.com) | [Support](https://firebase.google.com/support) |
| **SendGrid** | [Docs](https://docs.sendgrid.com) | [Console](https://app.sendgrid.com) | [Support](https://support.sendgrid.com) |

## ?? Contributing New Connectors

Planning to add a new connector? Each guide follows our standard template:

1. **? Installation** - Package installation and setup
1. **?? Installation** - Package installation and setup
2. **?? Configuration** - Schema and parameter setup
3. **?? Usage Examples** - Basic to advanced usage patterns
4. **?? Integration** - Webhooks and bidirectional messaging
Expand Down
Loading
Loading