Skip to content

Spring Boot "Java Questions" Telegram bot with PostgreSQL database

Notifications You must be signed in to change notification settings

ArturShatailo/JavaQuestions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Telegram Bot

Java questions

This project is under development

This is an application that allows collect, share and get answers to Java interview questions. This bot is developed to help with interview preparation. Telegram Bot application is developed with Spring Boot framework and PostgreSQL database. Buttons and commands are presented as Controller endpoints, and logic is implemented in Service classes with JPA Repository injection.

Contents

  • Introduction

  • Technologies stack

  • Short classes and repositories structure overview

  • Functionality description

  • Database structure

  • Conclusion

Technologies stack

  • Spring boot

  • PostgreSQL

  • JUnit

  • Telegram Bot API

  • Amazon AWS

Short classes and repositories structure overview

There is a simple for code review structure that divides files according to their purpose and functionality:

  1. bot repository where all the classes and interfaces related to the Bot entity are placed, including session, messages sender implementation, model and configuration file.

  2. controller repository contains classes that allows to handle requests from UI as well as web controller class with endpoints for database administration.

  3. domain repository contains classes of POJO entities that is related to database development.

  4. repository contains interfaces that extend JpaRepository interface and may include custom SQL requests to database.

  5. service repository contains interfaces with methods related to the logic of the application. There are also classes with realisations of methods in service interfaces. Methods are related to requests from UI logic and also entities CRUD methods.

Functionality description

The list of commands allowed in this bot:

  • /start

    Allows begin working with the bot in telegram application

  • /reset

    Allows return to the main menu and reset all the requests before

  • /help

    Sends message with the functionality and main commands description

The list of possible actions that this bot can handle

  • Read Java questions and answers

    All questions divided into categories and levels.

  • Send request for adding new question

    Each user can be an author of questions by sending request for verification.

  • Pass an interview

    User can try to pass an interview and answer several questions from each topic according to user's level of knowledge.

Database structure

database structure

Conclusion

This project helps me to fill out my gaps before interviews and make my knowledge base stronger. Moreover, I practiced with Spring boot framework and tried to create clear and scalable application.

Releases

No releases published

Packages

No packages published

Languages