Skip to content

Markuysa/Wakashi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram bot - Wakashi

Role game - immerse yourself in the culture of Japan

Available roles

  • Administrator - creates all types of entities, cards, can bind card to other entities and get full information about entity
  • Shogun - can get information about the slaves, create cards and bind them to Daimyo, get information about slaves
  • Daimyo - can get all his cards, create replenishment request to collectors, can see the slaves list, get balances on the cards and can bind to Shogun
  • Samurai - can get the turnover per shift, can bind to Daimyo
  • Collector - handles Daimyo replenishment requests

Telegram greetings

img_1.png

Features

  • Observability with graylog, prometheus
  • Authorization server to make a start of microservice application (in the future)
  • Authorization with sessions and tokens - to provide multiuser communications and secure data access
  • Docker to containerize application
  • Clean architecture pattern - every layer encapsulates all the logic inside, and every layer provides an interface to others in order to provide isolation

Usage

There is some examples of endpoints:

    Default commands
  • /login password=your_password - login endpoint
  • /register password=your_password role=your_role- register endpoint
  • /status- to get your status
  • /exit- to log out
    • You can also login using a web page. Just type "Login" to bot, or press Login button in /start panel and click on the Login link, don't forget to save your token (you can use it to reset the password)

    img.png.png


    Admin commands
  • /admin_createCard number=4567344598433456 bank_id=1481 owner=tgUsername cvv=123 - create card
  • /admin_createEntity username=tgUsername password=qwerty role=shogun - create entity
  • /admin_bindSlave master_username=... slave_username=... - bind slave
  • /admin_bindCard cardNumber=... username=... - bind card to daimyo
  • /admin_entityData username=... - get entity data

  • Shogun commands
  • /shogun_getSlavesList - get all the slaves
  • /shogun_createCard number=4567344598433456 bank_id=1481 owner=tgUsername cvv=123 - create card
  • /shogun_getSlavesData slaveUsername=... - get slave data
    Daimyo commands
  • /daimyo_getCards - get all the slaves
  • /daimyo_increase number=4567344598433456 value=... - change the balance by value
  • /daimyo_getSamurai - get all samurai slaves
  • /daimyo_getTurnover samuraiUsername=... - get turnover of samurai in current shift
  • /daimyo_getCardsTotal -get the summary balance on cards
  • /daimyo_bindShogun shogunUsername=... - bind yourself to shogun
    Samurai commands
  • /samurai_getTurnover - get your turnover
  • /samurai_bindDaimyo daimyoUsername... - bind yourself to daimyo

  • Shogun commands
  • /collector_performInc requestID=... - handle the request
  • /collector_showTransactions - get all unhandled transactions

Contributing

If you want to contribute to this project, please follow these steps:

  1. Fork this repository
  2. Create a new branch for your changes
  3. Make your changes and commit them
  4. Push your changes to your forked repository
  5. Create a pull request

Links

Telegram bot link: https://t.me/InternTestTaskBot

Contact

If you have any questions or suggestions, please feel free to contact me at markusa.study@mail.ru.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages