Prerequire
Understand:
- UML - https://evergreens.com.ua/ua/articles/uml-diagrams.html
- Design Patter:
- Microservices Pattern - https://microservices.io
Concept
The bot that prepare user to read a book that user should upload or find in database of bot.
The user has:
- store knowing words
- book that can read
- study process
- study log
The bot has:
- users (describe all needed data about and for user)
- books (describe data about book like name, popularity etc.)
- study-process (describe user's study process)
- study-log (describe deep info about exist study-process)
- config? (describe info about project)
- session-history (describe session of client some cache/tmp-data)
- users-story (describe where a user stopped where from the user came. This is needed for deep understanding where bot should send the user)
Architecture
Config - https://github.com/knadh/koanf
DB provider - SQLite or PostgreSQL (in process of deciding)
How the event from Telegram will handle:
- For response on this question we should ask ourselves what is problem we want to solve
- The problem is every message should go to Gateway which must choose right controller for this event\message
- So we should parse message in right way.
3.1. If the message is command, It will handle as command
3.2. If the message is text, It will parse by reserved text message
3.3. If the message is replay, It will handle as text from replay
- So the algorithm is next first
What framework can handle with this task?
- it will be a go-routing approach named Regex Routing
Word type
should have:
strength - is count of syllables in word
frequency - in the book\article etc.
language - it needs to use translation in study
Book type
should has:
words - it's mean that all words in use
Translate pkg
Syllables pkg
Interesting resources
Libs fro telegram bot:
Approaches to HTTP routing:
Keyboard repository:
Algorithm for game
- get a word
- find synonyms
- translate every sysnonym and a word
- show translation of words
Hard words contain from 3 and more syllables
- frequency
- Exception
- disagree
DB migration
ORM
Language framework