Skip to content

ksilisk/leetty

Repository files navigation

leetty

Description

Leetty - is a Telegram-bot that helps you to interact with LeetCode platform.

This project was started as my bachelor's degree final project.

You also can read more about it by following the link: graduate-work-rus-lang

I may translate it to English someday :)

Architecture

leetty-architecture

leetty-auth-service

leetty-auth-service - is a Java-service that provides secure communication between leetty-telegram-bot instances and leetty-web-service.

It uses OAuth2 protocol, in particularly Client Credentials Flow, for M2M (Machine-2-Machine) communication.

Tech Stack

  • Java 17
  • Docker
  • Sprint Boot
    • Actuator
    • Micrometer
    • OAuth2 Authorization Server
    • Security
  • Lombok

leetty-web-service

leetty-web-service - is a Java-service that is the main backend of Leetty.

It interacts with LeetCode using GraphQL, stores user data to PostgreSQL and makes major computation.

Tech Stack

  • Java 17
  • Docker
  • Spring Boot
    • Actuator
    • Micrometer
    • Data JPA
    • OAuth2 Resource Server
    • Web
    • Security
  • Netflix DGS Framework
  • Flyway
  • PostgreSQL
  • H2
  • Lombok

leetty-telegram-bot

leetty-telegram-bot - is a Java-service that interacts with Telegam updates. It uses Redis as an in-memory DB for store cache date, such as user states and callback data.

Tech Stack

  • Java 17
  • Docker
  • Spring Boot
    • Actuator
    • Micrometer
    • Cloud Open Feign
    • OAuth2 Client
    • Security
    • Web
    • State Machine
    • Data Redis
    • Kafka
  • Flyway
  • Lombok
  • Redis

leetty-gateway

leetty-gateway - is a Golang-service implemented as a gateway between Nginx and Apache Kafka.

This service will be used if you use Webhook-schema to receive updates from Telegam.

Tech Stack

  • Golang
  • Docker
  • Makefile
  • Paketo Buildpacks
  • Nginx
  • Apache Kafka

Source code for leetty-gateway is here.

How to try it?

You can try Leetty by following the link: https://t.me/LeettyBot

Can I deploy it by myself? How?

Yes, you can.

Run locally

  • Clone project
  • Fill applicaiton.properties-files for every microservice
    • Actually, I didn't provide examples for application.properties, but I have task at backlog to do it someday
  • Run it and enjoy!

Deploy to remote server

  • Clone project
  • Fill application.properties-files
  • Fill docker-env-sample
  • Try run it in Docker locally
  • (Optional) Implement your own CI/CD pipeline
    • Deployment process, which I implemented using GitHub actions, may help you - here
  • Run it on remote server and enjoy!

Afterword

Finally, it took me about one year to develop this project.

I learnt wide range new information about how to create, support, deploy and architect applications using actual technologies and approaches.

Also, this project took the highest grade after the presentation at my university.

After all, Leetty - is a project that helped me to go deeper into computer science and increase my knowledge.

About

Bachelor’s Degree Final Project

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages