Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/badend777/chat-bridge
An npm package that makes it easier to integrate Facebook Messenger webhook management into your Node.js application.
https://github.com/badend777/chat-bridge
fastify messenger-platform nodejs npm-package undici webhooks
Last synced: 24 days ago
JSON representation
An npm package that makes it easier to integrate Facebook Messenger webhook management into your Node.js application.
- Host: GitHub
- URL: https://github.com/badend777/chat-bridge
- Owner: BadEnd777
- License: mit
- Created: 2024-01-10T06:49:40.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-21T10:50:38.000Z (5 months ago)
- Last Synced: 2024-10-12T22:02:54.283Z (24 days ago)
- Topics: fastify, messenger-platform, nodejs, npm-package, undici, webhooks
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/chat-bridge
- Size: 6.05 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Chat Bridge
Chat Bridge is an npm package that simplifies the integration of Facebook Messenger webhook handling into your Node.js applications. It offers a convenient way to interact with the Messenger Platform, handling incoming messages, postbacks, quick replies, and more. 🚀
### Table of Contents
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Acknowledgments](#acknowledgments)
- [License](#license)### Features
- **Easy Integration**: Simplifies the integration of Facebook Messenger webhook handling into your Node.js applications.
- **Incoming Events Handling**: Provides a convenient way to handle incoming events from users.
- **Customizable**: Offers flexibility for customization according to specific application needs.
- **Event Driven**: Built on an event-driven architecture, making it easy to listen for and respond to various events.
- **Simple API**: Provides a straightforward API for sending messages and interacting with users.
- **Scalable**: Designed to scale with your application, handling high volumes of incoming messages efficiently.
- **Open Source**: Licensed under the [MIT License](LICENSE), Chat Bridge is open source and free to use.### Installation
Ready to get started? Install Chat Bridge using [npm](https://www.npmjs.com/):
```bash
npm install chat-bridge
```> ⚠️ **Warning**: Chat Bridge is currently in alpha, and is not yet ready for production use. We recommend that you do not use it in production until it reaches a stable release.
### Usage
```js
// Import the Client class
const { Client } = require('chat-bridge');// Create a new client instance
const client = new Client({
accessToken: 'YOUR_ACCESS_TOKEN',
verifyToken: 'YOUR_VERIFY_TOKEN'
});// Listen for incoming messages events
client.on('message', (event) => {
const { sender, message } = event;// Send a text message back to the sender
client.sendTextMessage(sender.id, `You wrote: ${message.text}`);
});// Start the client
client.start(async () => {
console.log(`Listening on ${client.page.name} (${client.page.id})`);
});
```### Documentation
You can read additional documents at [Chat Bridge](https://chat-bridge.pages.dev/)
### Contributing
We welcome contributions!
Fixing a bug, adding a new feature, or improving the documentation — we're always happy to see your work.
Read up on our [contributing guidelines](CONTRIBUTING.md) and then check out one of our [issues](https://github.com/BadEnd777/Chat-Bridge/issues).
### Acknowledgments
- [fastify](https://www.fastify.io/) — Fast and low overhead web framework, for Node.js
- [undici](https://undici.nodejs.org/) — HTTP/1.1 client, written from scratch for Node.js### License
Chat Bridge [is licensed under the MIT License](LICENSE) unless otherwise specified.
---