Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

101 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Database Change Bot πŸ€–

The Database Change Bot is an innovative application designed to monitor changes in MongoDB and PostgreSQL databases and notify these changes through Telegram messages. This bot makes it easier to keep track of database modifications in real-time, enhancing monitoring and response strategies for database administrators and development teams. πŸš€

Features 🌟

  • Database Monitoring: Listen to changes (inserts, updates, deletions) in MongoDB and PostgreSQL databases. πŸ“ˆ
  • Telegram Notifications: Sends customized notifications to a Telegram group or channel to alert about the database changes. πŸ’¬
  • Configurable: Easily configure database connections and Telegram group IDs through a simple JSON configuration. βš™οΈ
  • Docker Support: Comes with Docker support for easy deployment and scalability. 🐳

Getting Started 🏁

Prerequisites

  • Node.js πŸ“¦
  • MongoDB and/or PostgreSQL πŸ—ƒοΈ
  • A Telegram bot token (create one through BotFather in Telegram) πŸ€–

Installation

  1. Clone the repository:
git clone https://github.com/dongtranthien/database-change-bot.git
  1. Install the dependencies:
cd database-change-bot
npm install
  1. Copy the .env.sample and config.json.sample files to .env and config.json respectively and update them with your actual configuration details.

  2. Start the bot:

node app.js

Docker Deployment 🐳

Build and run the Docker container using:

docker build -t database-change-bot .
docker run -d --name database-change-bot --env-file .env database-change-bot

Configuration βš™οΈ

Edit config.json to include your database connection details and Telegram group ID. Refer to config.json.sample for the sample configuration.

Environment Variables

  • TELEGRAM_GROUP_ID: Your Telegram group or channel ID where notifications will be sent. πŸ“¨

Usage πŸ“˜

Once the bot is running, it will start monitoring the specified databases for changes and send notifications to the configured Telegram group or channel.

Contributing 🀝

Contributions are welcome! Please feel free to submit a pull request.

License πŸ“„

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Monitors database changes, sends Telegram alerts. Supports MongoDB, PostgreSQL. Easy setup. πŸ€–πŸš€

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages