https://github.com/vladpetriv/tg_scanner
Telegram message scanner
https://github.com/vladpetriv/tg_scanner
go kafka redis telegram
Last synced: about 2 months ago
JSON representation
Telegram message scanner
- Host: GitHub
- URL: https://github.com/vladpetriv/tg_scanner
- Owner: VladPetriv
- License: mit
- Created: 2022-03-01T12:25:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T18:35:07.000Z (over 3 years ago)
- Last Synced: 2025-01-06T03:42:43.770Z (over 1 year ago)
- Topics: go, kafka, redis, telegram
- Language: Go
- Homepage:
- Size: 326 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tg_scanner
tg_scanner is an application which can parse question and replies from your telegram groups.
Application will always create a few dirs:
- images - for saving and getting user, group, message and reply images before save to firebase. (The images will auto remove after saving to the Firebase)
- data - for saving and getting data from telegram before sent to message queue.
## Tech Stack
**Main:**
- gotd/td
- apache kafka
**Store:**
- redis
- firebase storage
## Features
- Get groups, user, message reply info from telegram.
- Save groups, user, replies and messages images into Firebase.
- Microservice communication with Apache Kafka.
- Caching messages and groups with Redis.
- Auto deleting log files after 22 days
## Environment Variables
To run this project, you will need to add the following environment variables to your `config/.config.env` file:
#### Telegram
- `APP_ID`- Telegram app id
- `APP_HASH`- Telegram app hash
- `PHONE` - Your phone number from telegram account
- `PASSWORD` - Your cloud password to telegram
#### Firebase
- `PROJECT_ID` - Firebase project id
- `STORAGE_BUCKET` - Firebase storage bucket
- `SECRET_PATH` - Path to firebase secret file
#### Logger
- `LOG_LEVEL` - Level which logger will process
- `LOG_FILENAME` - Filepath where logger will save logs
#### Redis
- `REDIS_ADDR` - Redis address
- `REDIS_PASSWORD` - Redis password
#### Kafka
- `KAFKA_ADDR` - Kafka address
## Run
Clone the project
```bash
git clone git@github.com:VladPetriv/tg_scanner.git
```
Go to the project directory
```bash
cd tg_scanner
```
Install dependencies
```go
go mod download
```
Start the application:
Before start you must create 2 topic in kafka: `groups` and `messages`
```bash
make run
```