Slack bot for sending daily free random ebook from Packt Publishing.
- Parsing data from Packt Publishing website.
- Mapping ebook data to Slack message format.
- Executing POST request to Slack webhook url.
- Multiple slack workspaces handling.
- Backend: Java, Spring Boot, JPA, REST, Jsoup, Lombok, Maven, Swagger, H2 DB, Quartz
- Frontend: React, Ant Design, Axios, Moment
$ mvn clean install
$ java -jar target/ebook-0.0.1-SNAPSHOT.jar
$ mvn spring-boot:run
$ cd frontend && npm start
$ mvn test
- Configurable parameters in application.properties
- ReactJs web dashboard with configurable parameters
- Multiple Slack webhooks handling
- Configurable cron scheduler with Quartz support
- H2 single file database
- Save daily ebook to db, if exists for current day get from db instead of remote request
- Enums for styles, types, colors etc.
- Move cron expression to properties
- Job model with CRUD for managing multiple slack workspaces/channels
- Swagger UI for documenting REST API
- ReactJs as UI
- Frontend validation with notifications
- Free Ebook - Archive by day (db / page)
Example request packt ebook to slack everyday at 13:30 (1:30AM).
Create new slack job in db:
{
"active": true,
"botName": "Packt Publishing Bot",
"channel": "#ebook",
"createdDate": "2018-06-23T20:27:55.393Z",
"jobName": "CompanySlack",
"scheduler": "* 30 13 ? * * *",
"webhook": "https://hooks.slack.com/services/xxxxxxxxx/yyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzz"
}
More information in swagger (localhost:8099/swagger-ui.html):