Skip to content

Sunagatov/Yulia-Lingo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

137 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


πŸ‡¬πŸ‡§ Yulia Lingo

A Telegram English learning bot β€” study irregular verbs, build your word list, and translate on the go.

πŸ’¬ Community Β· 🟒 Good First Issues Β· πŸ› Issues

License: CC BY-NC 4.0 Docker Pulls GitHub Stars GitHub Issues


πŸš€ Quick Start

πŸ“‹ Prerequisites: Go 1.21+, PostgreSQL 17+, Docker Desktop, Telegram Bot Token (from @BotFather)

# 1. πŸ“₯ Clone
git clone https://github.com/Sunagatov/Yulia-Lingo.git && cd Yulia-Lingo

# 2. πŸ”§ Fill in your credentials
# edit TELEGRAM_BOT_TOKEN and POSTGRESQL_PASSWORD in .env

Option A β€” Local Go + infra in Docker (recommended for development)

# Start only PostgreSQL
docker compose up -d postgres

Then run the app from the terminal:

go run cmd/app/main.go

Option B β€” Everything in Docker

docker compose up -d --build

Production:

# Fill in .env.prod, then:
docker compose -f docker-compose.prod.yml up -d --build

πŸ§ͺ Run the tests:

go test ./...

πŸ€” What is this?

Yulia Lingo is a Telegram bot that helps you learn English interactively. Practice irregular verbs with quizzes, build a personal vocabulary list, and get instant word translations β€” all without leaving Telegram.


πŸ› οΈ Tech Stack

πŸ“‚ Category πŸ”§ Technology
πŸ’» Language Go 1.21
πŸ—„οΈ Database PostgreSQL 17
πŸ€– Telegram go-telegram-bot-api v5
πŸ“ Logging Logrus (structured JSON)
🚒 Deployment Docker (multi-stage build)

✨ Features

Feature Description Spec
πŸ“– Irregular Verbs Browsable reference list of 295 verbs organized by letter docs/features/irregular-verbs.md
πŸ“ My Word List Save, browse, filter, and rate your personal vocabulary docs/features/my-word-list.md
🏷️ Browse Mode Explore words by Category, Letter, POS, Confidence, or Date with smart filters docs/features/browse-mode-design.md
πŸ€– AI Categorization Auto-categorize words with OpenAI (Azure AI compatible) -
πŸ” Translate Instant word translation with multiple meanings and auto-save docs/features/translate.md
🌐 Language Switch between English and Russian interface docs/features/language.md

Each feature has a comprehensive spec covering user stories, functional requirements, bot flows, data models, security, and acceptance criteria.


πŸ€– Commands

🎯 Command πŸ“ Description
/start Welcome message and main menu
/irregular_verbs Start irregular verbs practice
/my_word_list View and manage your word list
/translate Translate a word
/cancel Cancel the current operation

πŸ“ Project Structure

cmd/app/                 # Application entry point
internal/
β”œβ”€β”€ config/             # Environment-based configuration
β”œβ”€β”€ database/           # PostgreSQL connection and pooling
β”œβ”€β”€ logger/             # Structured logging
β”œβ”€β”€ telegram/           # Bot setup and update routing
β”‚   └── handlers/       # Command and callback handlers
β”œβ”€β”€ irregular_verbs/    # Irregular verbs domain
β”œβ”€β”€ my_word_list/       # Personal word list domain
β”œβ”€β”€ translate/          # Translation service
└── util/               # Shared utilities

βš™οΈ Environment Variables

Variable Required Description
TELEGRAM_BOT_TOKEN βœ… Token from @BotFather
POSTGRESQL_PASSWORD βœ… Database password
POSTGRESQL_HOST ❌ Defaults to localhost
POSTGRESQL_PORT ❌ Defaults to 5432
POSTGRESQL_USER ❌ Defaults to postgres
POSTGRESQL_DATABASE_NAME ❌ Defaults to yulia_lingo
LOG_LEVEL ❌ debug, info, warn, error
IRREGULAR_VERBS_FILE_PATH ❌ Path to irregular verbs Excel file
OPENAI_API_KEY ❌ OpenAI/Azure AI API key for categorization
OPENAI_API_URL ❌ API endpoint (default: OpenAI, supports Azure AI)
OPENAI_MODEL ❌ Model name (default: gpt-4o-mini)
OPENAI_MAX_CALLS_PER_USER_DAY ❌ Daily AI limit per user (default: 50)
OPENAI_MAX_CALLS_PER_USER_HOUR ❌ Hourly AI limit per user (default: 10)
OPENAI_MAX_CALLS_GLOBAL_DAY ❌ Global daily AI limit (default: 500)

See .env for local defaults and .env.prod for the production template.


🀝 Contributing

πŸŽ‰ Contributions are welcome.

🎯 Situation πŸš€ Action
πŸ› Found a bug Open an issue with the bug label
πŸ’‘ Want a feature Start a Discussion first
πŸ‘¨β€πŸ’» Ready to code Pick a good first issue, comment "I'm on it"
πŸ”§ Big change Comment on the issue before writing code β€” tickets may have hidden constraints

πŸ“„ License

πŸ“œ CC BY-NC 4.0 β€” free for educational and personal use with author attribution. Commercial use requires explicit written permission from the author ([email protected]).


πŸ“ž Contact

❀️

About

Yulia-Lingo telegram bot can help you to learn new English vocabulary.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors