π Read this in other languages: δΈζ
A cross-platform messaging SDK that supports sending notification messages to multiple platforms like Discord, Slack, Telegram, and more.
- Unified API: Provide a consistent interface for different messaging platforms
- Multi-language Support: Support Flutter, JavaScript, Python, Go, and other programming languages
- Easily Extensible: Simple plugin architecture for adding new platform support
- Developer Friendly: Clear documentation and examples for quick integration
NexusEvent/
βββ packages/ # SDK packages for different languages
β βββ nexusevent-core/ # Core type definitions
β βββ nexusevent_flutter/ # Flutter/Dart SDK
β βββ nexusevent-js/ # JavaScript/TypeScript SDK
βββ examples/ # Usage examples
β βββ flutter_demo/ # Flutter demo app
β βββ js-demo/ # JavaScript demo script
βββ README.md # Project documentation
import 'package:nexusevent_flutter/nexusevent.dart';
// Add Discord sender
NexusEvent.instance.addDiscordSender(
'main_discord',
'https://discord.com/api/webhooks/YOUR_WEBHOOK_URL'
);
// Send message
final message = EventMessage(
title: 'New Video Liked',
content: 'Flutter Development Guide',
url: 'https://example.com/video/123',
author: 'Channel Name',
);
await NexusEvent.instance.send('main_discord', message);import { NexusEvent, Platform } from '@i-vox/nexusevent-js';
// Get SDK instance
const nexus = NexusEvent.getInstance();
// Add Discord sender
nexus.addDiscordSender('main_discord', 'https://discord.com/api/webhooks/YOUR_WEBHOOK_URL');
// Send message
const message = {
title: 'New Video Liked',
content: 'JavaScript Development Guide',
url: 'https://example.com/video/123',
author: 'Channel Name',
timestamp: new Date(),
};
await nexus.send('main_discord', message);| Platform | Status | Flutter | JavaScript | Python | Go |
|---|---|---|---|---|---|
| Discord | β Supported | β | β | π§ | π§ |
| Slack | π§ In Development | π§ | π§ | π§ | π§ |
| Telegram | π Planned | π | π | π | π |
| Teams | π Planned | π | π | π | π |
| Custom Webhook | π Planned | π | π | π | π |
- β Core architecture design completed
- β Flutter SDK Discord support
- β JavaScript SDK Discord support
- β Basic demo applications
- π§ JavaScript SDK in development
- π Other language SDKs planned
Add to your pubspec.yaml:
dependencies:
nexusevent_flutter: ^0.1.3First configure npm to use GitHub Packages:
npm config set @i-vox:registry https://npm.pkg.github.comThen install:
npm install @i-vox/nexusevent-js- π― Unified API Design: Consistent interface across different languages
- π‘οΈ Error Handling: Comprehensive exception handling mechanism
- π Configuration Validation: Automatic validation of webhook URLs and configurations
- π€ Broadcast Functionality: Send messages to multiple platforms simultaneously
- π¨ Rich Messages: Support for embedded messages, colors, authors, etc.
- π± Native Flutter Integration: Built specifically for Flutter/Dart
- π Backward Compatibility: Maintains compatibility with existing APIs
- π§ͺ Comprehensive Testing: Unit tests with 80%+ coverage
- π¦ TypeScript Support: Complete type definitions
- π Multiple Module Formats: Supports both CommonJS and ES Modules
- π― Singleton Pattern: Convenient SDK instance management
// Flutter
Future<void> sendLikeNotification({
required String videoTitle,
required String videoUrl,
required String author,
}) async {
final message = EventMessage(
title: 'New Video Liked π',
content: 'γ$videoTitleγ',
url: videoUrl,
author: author,
color: 0x33ccff,
timestamp: DateTime.now(),
);
await NexusEvent.instance.send('discord_main', message);
}// JavaScript
async function sendLikeNotification({ videoTitle, videoUrl, author }) {
const message = {
title: 'New Video Liked π',
content: `γ${videoTitle}γ`,
url: videoUrl,
author: author,
color: 0x33ccff,
timestamp: new Date(),
};
await nexus.send('discord_main', message);
}// Flutter
try {
await NexusEvent.instance.send('discord_main', message);
print('Message sent successfully');
} catch (e) {
print('Failed to send: $e');
// Handle error, e.g., retry or use backup sender
}// JavaScript
try {
await nexus.send('discord_main', message);
console.log('Message sent successfully');
} catch (error) {
console.error('Failed to send:', error);
// Handle error, e.g., retry or use backup sender
}We welcome all forms of contributions! Please see our Issue Templates for bug reports and feature requests.
- Clone the repository
git clone https://github.com/your-org/NexusEvent.git
cd NexusEvent- Flutter SDK Development
cd packages/nexusevent_flutter
flutter pub get
flutter analyze
flutter test- JavaScript SDK Development
cd packages/nexusevent-js
npm install
npm run build
npm testThis project is licensed under the Apache License 2.0.
Apache 2.0 is more restrictive than MIT and includes patent protection clauses, providing better legal protection for both contributors and users.
If you find this project useful, please consider giving it a star! β
- Documentation: Full Documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Flutter Package: pub.dev
- JavaScript Package: npm