https://github.com/trendyol/redis-slack-bot
Redis Slack Bot
https://github.com/trendyol/redis-slack-bot
clean-code java17 redis redis-slack-bot slack slack-bot spring spring-boot strategy-design-pattern
Last synced: 7 months ago
JSON representation
Redis Slack Bot
- Host: GitHub
- URL: https://github.com/trendyol/redis-slack-bot
- Owner: Trendyol
- License: mit
- Created: 2022-12-16T08:40:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-25T13:17:49.000Z (8 months ago)
- Last Synced: 2025-09-25T15:21:48.581Z (8 months ago)
- Topics: clean-code, java17, redis, redis-slack-bot, slack, slack-bot, spring, spring-boot, strategy-design-pattern
- Language: Java
- Homepage:
- Size: 630 KB
- Stars: 12
- Watchers: 10
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Redis Slack Bot
## Overview
* As Trendyol team we developed a new Slack bot to improve the usability of Redis.
### With the help of the Redis Slack bot, you can:
```
- GET key -> Returns the value of the key.
- SET key value -> Sets or updates a key's value in the cache. The ttl is not given, so it remains in
the cache indefinitely.
- SET key value ttl -> Sets or updates key's value which is in the cache. The ttl is given, so it stays
in the cache for the number of seconds you specify.
- DELETE key -> If the key is in the cache, it is deleted.
- LIST ALL -> Displays a list of all keys in the cache.
- HELP -> How to use redis slack bot ?
- PING -> What can i help you ?
```
### The following are some examples of each command:
```
- GET my_key_123
- SET my_key_123 "success"
- SET my_key_123 "{"name":"John","age":30,"car":null}"
- SET my_key_123 "{"name":"John","age":30,"car":null}" 30
- SET my_key_123 "success" 30
- DELETE my_key_123
- LIST ALL
- HELP
- PING
```
### NOTE that!
- When performing the commands, the same syntax should be used as in the examples. There should be only one space between "COMMAND key value ttl".
Otherwise, you will have entered an incorrect command.
- Also, do not forget to check your key-value pair after setting data by using the get command!
### Slack Bot Example:
- PING

- HELP

- SET

- GET

- DELETE

- SET_TTL

- LIST_ALL

---
##### Tech Stack
- Java 17
- Spring Boot 3.0 & Spring 6.0
- Redis
- Slack Api Client
##### Requirements
For building and running the application, you need:
- [JDK 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
- [Maven](https://maven.apache.org)
- [Lombok](https://projectlombok.org/)
- [Slack](https://slack.dev/java-slack-sdk/guides/web-api-basics)
- [Redis](https://redis.io/)
##### Build & Run
Environment Variables
```
SPRING_PROFILES_ACTIVE=prod
REDIS_HOST = Your redis host
REDIS_PASSWORD = Your redis password
NOTIFY_TOKEN = Your slack bot token
CHANNEL_ID = Your slack channel id
```
```
mvn clean install
mvn --projects redis-slack-bot spring-boot:run
```
##### Port
```
http://localhost:9723
```
##### License
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.