Git Product home page Git Product logo

notifierbot's Introduction

Oye, Beltalowda! I'm Maksim aka whiskels

Java Developer, Scrum master and O&G geologist

Passionate about development of cloud-native microservices

Check out my repos:

๐Ÿ“ซ Social

Telegram LinkedIn Mail LeetCode Codewars View counter

๐Ÿ‘จโ€๐Ÿ’ป Fancy badges

Some of the technologies I work with

Java Spring Postgres Oracle Apache Kafka Kubernetes Istio Junit Mockito GitHub Actions Jenkins Apache Maven Gradle Heroku

notifierbot's People

Contributors

dependabot[bot] avatar snyk-bot avatar whiskels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

notifierbot's Issues

Change telegram bot authorization logic

Current realization is to annotate method with @ Secured annotation and works only if one method in the class is annotated.
Would be better to add security as an optional attribute of @ BotCommand annotation to make it more understandable (handler-level security)

T-29: add customer birthday report

Implement slack reporter that will create daily/monthly reports about upcoming customer birthdays.

Data is loaded from Google Spreadsheets to inmemory storage daily.

T-2: Change packaging to feature-based

Classes are currently distributed between packages based on their functionality (domain, service, repository etc). It would be easier to make changes to the code if packages were created based on the features implemented (for example: payments package will include entity, dto, repository and service)

T-23: Employee events day before -> Employee events on

Change implementation of slack reporting from day before event to on event.
If current day is a working day and there is an event - send report. If current day is Friday - send report if there are events in range [Friday;Sunday]. There is no need to check national holidays in current realisation

Ex.:
Was: report on Friday if there is a birthday on Monday;
Will be: report on Monday if there is a birthday on Monday

T-25: add audition of slack payload execution result

Implement additional feature - audition of slack payload execution.

  • Refactoring - generic audition mechanism (data loading/payload execution). Use generic repositories, refactor JpaRepositories into Repositories with partial implementation of crud methods, maybe interface projections for DTO)
  • Persistence of execution results and metadata in db
  • Admin 'audit view' chat commands for Telegram

T-19: Store report date in data providers

Current realization: data used by reporters may be outdated if called in the morning before an update occurred. For payment report this leads to an empty report.

Proposed realization: add additional method that returns date of data retrieval. This will let us get a report for payments in telegram in the afternoon and then get the same report in the morning of the next day

T-20: birthday reporter to slack

Implement birthday reporter for HR.

  • last day of the month - all birthdays and work anniversaries for the next month
  • day before birthday/anniversary - message with notification about upcoming event
  • second week of the month - birthdays and anniversaries for the rest of the month

T-9: add LocalDateProvider

This will make a single point where server hour offset is applied and minimize the chances for any errors

T-17: use JpaSpecification for financial operations

Maybe it would be better not to have strict queries for financial operations like the one used to get revenue dto, but to use specifications to have more flexibility.
But there is a downside - this will lead to additional conversion from retrieved financial operation to dto in code

T-21: fix bug in revenue report

Bug is related to the stage of formation of revenue report. The pipeline for it is as follows:

  • When scheduler calls method that updates data in DB:
    • Receive and filter financial operations from external API
    • Save filtered events to DB if there are any
  • When scheduler calls method that creates report for slack:
    • Receive last update date and corresponding data from database

If there is a period of time where "data update" scheduled job returns no data to load to database, then a series of identical reports will be sent to slack, though it is expected to see one report with data which is followed by subsequent reports about no data.

Possible fix: change logic in DataProvider implementation to check whether current date (with timezone) is the same as the date of last update

T-3: Add Flyway

The database used in the project is not going to be changed frequently, but some improvements may require changes. As this project uses several databases based on current environment (dev, prod) - it would be better to use database migration tool.

T-11: Split telegram and slack reporters

Slack provides rich message design API so it would be better to split report creation logic between the modules in order to be able to create fantastic-looking messages for slack

T-7: Add demo with instructions

It would be better to have a profile with database initialization using dummy values and third-party API links being stubs to let anyone to try the bot by just adding bot credentials

T-28: Admin help message

Implement admin command description and additional Helper that returns admin panel in telegram

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.