An open API service indexing awesome lists of open source software.

https://github.com/mirvald-space/polishdom_bot

PolishDom Bot is a multifunctional Telegram bot designed to help users learn the Polish language and prepare for obtaining the Karta Polaka (Polish Card).
https://github.com/mirvald-space/polishdom_bot

aiogram bot language online-learning polish polski telegram-bot tutoring

Last synced: over 1 year ago
JSON representation

PolishDom Bot is a multifunctional Telegram bot designed to help users learn the Polish language and prepare for obtaining the Karta Polaka (Polish Card).

Awesome Lists containing this project

README

          

# PolishDom Bot 🤖

Telegram bot designed to help users prepare for Polish citizenship and Karta Polaka (Polish Card) interviews. The bot provides an interactive learning experience with AI-powered interview simulations and Polish language testing.

## Key Features

- 🎯 **AI-Powered Virtual Consul for Karta Polaka Preparation**:
- Simulates real interviews with a virtual Polish consul
- Generates dynamic questions based on typical Karta Polaka interview topics
- Provides instant and detailed feedback on user responses
- Offers personalized recommendations for interview success

- 📚 **Polish Language Level Test**:
- Comprehensive 36-question test to determine Polish language proficiency (A1-B2)
- Multiple choice and translation questions
- Detailed explanations for each answer
- Progress tracking and performance analytics

- 🤖 **Interview Management System**:
- Automated interview scheduling
- Real-time feedback collection
- Performance tracking and progress monitoring
- Detailed evaluation reports

- 📊 **Database Integration**:
- MongoDB for storing user progress and test results
- Efficient data retrieval and management
- User statistics and performance tracking

## Tech Stack

- Python 3.x
- aiogram 3.6.0
- MongoDB
- OpenAI API
- aiohttp
- APScheduler
- loguru

## Project Structure

```
polishdom_bot/
├── bot.py # Main bot file
├── config.py # Configuration settings
├── db.py # Database operations
├── handlers/ # Message handlers
│ ├── handlers.py # General command handlers
│ ├── interview.py # Interview simulation handlers
│ └── test.py # Language test handlers
├── keyboards/ # Custom keyboards
├── services/ # Business logic
├── requirements.txt # Dependencies
└── .env # Environment variables
```

## Setup

1. Clone the repository:
```bash
git clone https://github.com/yourusername/polishdom_bot.git
cd polishdom_bot
```

2. Create and activate virtual environment:
```bash
python -m venv .myenv
source .myenv/bin/activate # On Windows: .myenv\Scripts\activate
```

3. Install dependencies:
```bash
pip install -r requirements.txt
```

4. Create `.env` file:
```bash
cp .env_example .env
```

5. Configure your `.env` file with the following variables:
- `BOT_TOKEN`: Your Telegram bot token from @BotFather
- `WEBHOOK_HOST`: Your domain or ngrok URL
- `WEBHOOK_PATH`: Path for webhook (default: /bot)
- `OPENAI_API_KEY`: Your OpenAI API key
- `CHANNEL_ID`: Your Telegram channel ID
- `MONGO_URI`: MongoDB connection string
- `MONGO_DB_NAME`: Database name
- `MONGO_COLLECTION_NAME`: Collection name
- `TIMEZONE`: Your timezone (default: Asia/Tehran)
- `DEBUG`: Debug mode (True/False)

## Running the Bot

1. Start the bot:
```bash
python bot.py
```

2. For development with ngrok:
```bash
ngrok http 8000
```

## Features in Detail

### Interview Simulation
- AI-powered virtual consul for Karta Polaka preparation
- Dynamic question generation based on interview topics
- Real-time feedback and evaluation
- Performance tracking and progress monitoring
- Detailed evaluation reports with recommendations

### Language Testing
- Comprehensive Polish language proficiency test
- Multiple difficulty levels (A1-B2)
- Multiple choice and translation questions
- Detailed explanations for each answer
- Progress tracking and performance analytics

### Database Operations
- MongoDB integration for data persistence
- User progress tracking
- Test results storage
- Performance analytics
- Backup and recovery options

## Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Acknowledgments

- Thanks to the aiogram team for the excellent framework
- OpenAI for their powerful API
- MongoDB for reliable database solutions