Telegram bot interface for Opencart
Project Description:
It is necessary to develop a Telegram bot for generating SEO texts for the Trast.ua website. The bot should accept a category or product URL, generate SEO text using the OpenAI API, and save the result in the database.
Main Requirements:
1. **Technology Stack**:
- Python 3.10
- Aiogram for Telegram bot
- Quart for the web server
- SQLite for the database
- Aiohttp for asynchronous HTTP requests
- BeautifulSoup4 for HTML parsing
- Pytest for writing tests
2. **Functional Requirements**:
- **Command /start**: Sending a welcome message with the "START" button.
- **Button "START"**: When pressed, the bot should request a category or product URL.
- **URL Processing**: The bot should accept the URL, check its validity, and generate SEO text using the OpenAI API.
- **Saving SEO Text**: The bot should save the generated SEO text in the database.
- **Sending SEO Text**: The bot should send the generated SEO text to the user.
3. **Non-functional Requirements**:
- **Performance**: The bot should process requests and generate SEO texts within 5 seconds.
- **Testing**: All core functions must be covered by tests using Pytest.
- **Documentation**: All code must be well-documented and accompanied by instructions for setup and configuration.
#### Task Details:
1. **Telegram Bot Development**:
- Setting up Aiogram.
- Implementing the `/start` command.
- Handling the "START" button press.
- Handling messages with URLs.
- Generating SEO text using the OpenAI API.
- Sending the generated text to the user.
2. **Web Server Development**:
- Setting up Quart.
- Implementing the `/generate` route for generating SEO text based on URL.
3. **Database Management**:
- Setting up SQLite.
- Creating tables to store categories and products.
- Functions for saving and retrieving data from the database.
4. **Testing**:
- Writing tests for core bot functions.
- Testing SEO text generation.
- Testing database operations.
5. **Documentation**:
- Installation and setup instructions.
- Instructions for running the bot and web server.
- Description of the database structure.
#### Project Structure Example:
```
project/
│
├── app.py # Quart application file
├── bot.py # Telegram bot file
├── db_manager.py # Database management
├── seo_generator.py # SEO text generation
├── config.py # Configuration parameters
├── gunicorn_conf.py # Gunicorn configuration
│
├── tests/ # Test folder
│ ├── test_app.py
│ ├── test_bot.py
│ ├── test_db_manager.py
│ └── test_seo_generator.py
│
├── requirements.txt # Project dependencies
├── wsgi.py # File for running the application
└── pytest.ini # Pytest configuration
```
#### Expected Results:
- Functional Telegram bot meeting the requirements.
- Quart web server handling requests for generating SEO texts.
- Properly functioning database.
- Comprehensive test coverage of core functions.
- Detailed project documentation.
If you have any questions or need clarification, please contact
Current freelance projects in the category Databases & SQL
Database synchronizationSynchronization of Microsoft Access programs and CRM SalesDrive. Data transfer from CRM to Microsoft Access in the first stage (changing the funnel status). Data transfer from Microsoft Access to CRM in the second stage (changing the status in the program). Databases & SQL ∙ 4 hours 4 minutes back ∙ 6 proposals |
Setting up a backup system and optimizing server infrastructureObjective of the work: Ensure reliable data storage for the CRM system and application by implementing an automated backup system, as well as carry out a series of server improvements to enhance the stability, security, and performance of the infrastructure. DevOps, Databases & SQL ∙ 1 day 2 hours back ∙ 23 proposals |
PIM system
223 USD
A PIM system needs to be created. The number of products is several million. There are several suppliers providing data in different formats: csv, xml, API. The data is limited, and often it is necessary to find product characteristics from other sources and supplement them. A… Databases & SQL, Web Programming ∙ 1 day 4 hours back ∙ 43 proposals |
Integration of BAS Shveyka 8
223 USD
Good day, it is necessary to integrate BAS Shveyka 8, connect the website and CRM Sales Drive, set up reports and other data. Databases & SQL ∙ 1 day 5 hours back ∙ 10 proposals |
Create a dashboard in https://airtable.com/ for the performance of advertising creatives from Facebook ads.Full specification https://docs.google.com/document/d/1_n_oYRNZWYxalUA---DM5AD1b5ZSrtePw5J4G42svGw/edit?usp=sharing Databases & SQL, Data Parsing ∙ 2 days back ∙ 17 proposals |