Skip to content

banchan01/TESY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TESY

TESY is an AI English chatting assistant built to help users express themselves more clearly on Telegram when English expressions don’t come to mind.
Instead of repeatedly checking translators or LLMs, TESY provides natural expression suggestions directly within Telegram, along with a web service for reviewing and learning from past mistakes.

🧩 Telegram Bot Example

Users can ask TESY to improve unclear English expressions directly in Telegram.

Telegram Bot Example


🎯 Quiz Example

TESY turns corrected sentences into fill-in-the-blank quizzes so users can actively learn from their mistakes.

Quiz Example


Features

TESY consists of two main features.

🤖 Telegram Bot

1-1. Getting Started

  • Users can start the bot with the /start command to view basic usage instructions.

image

1-2. Signup Verification

  • During signup, users receive a verification code via the bot.
  • The signup button is activated once the verification is completed.
Before Signup After Signup
회원가입전 회원가입후

1-3. Expression Correction

  • Users can mention @TESY2_bot with an unclear English sentence and use /help to request a correction.
  • TESY suggests a more natural expression, which can be sent directly to the chat by tapping the popup.
  • 👉 See the example here: Telegram Bot Example

🕸️ Website

2-1. Quiz-Based Learning

  • TESY provides fill-in-the-blank quizzes based on corrected sentences from the Telegram bot.
  • This allows users to actively review and learn from their past mistakes.
  • 👉 See the example here: Quiz Example

Architecture

아키텍쳐
  • The service is deployed on a single AWS EC2 instance including docker containers.
  • Nginx runs inside the frontend container and serves as the unified entry point for all external traffic.
    • / → Serves the React SPA (static files)
    • /api → Proxies requests to the Rails backend container
  • All external traffic enters the system via HTTPS, with HTTP automatically redirected to HTTPS.

Installation

⚙️ Environment Setup

Create a .env file in the project root and configure the following variables:

# External API
TELEGRAM_BOT_TOKEN=
GEMINI_KEY=

# Database Configuration
DATABASE_HOST=
DATABASE_USERNAME=
DATABASE_PASSWORD=

🤖 Telegram Bot Setup

Step 1: Create Your Bot

  1. Open Telegram and search for @BotFather.
  2. Start a chat and send /newbot.
  3. Follow the instructions to set the bot name and username.
  4. Copy the token provided — this will be used in your .env file.

Step 2: Enable Inline Mode

  1. Go to @BotFather > /mybots
  2. Choose your bot > Bot Settings > Inline Mode
  3. Enable inline mode so your bot can be used in other chats via @yourbotname.

Step 3: Enable Inline Feedback

  1. In the same Bot Settings, go to Inline Feedback
  2. Enable this to allow the bot to receive feedback on inline results.

Step 4: Set Bot Commands

Use /setcommands in @BotFather and register the following:

/start #bot description
/code #auth code verification

🌐 Webhook Setup

To connect Telegram to your local server, you'll use ngrok to expose a public HTTPS URL.

Step 1: Start ngrok

Run this command to expose port 3000:

ngrok http 3000

and copy the generated HTTPS URL

Step 2: Set the Telegram Webhook

Set the webhook using the following format: https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/setWebhook?url=<YOUR_NGROK_URL>/webhook

📦 Dependency Installation

Backend (Rails)

cd backend
bundle install       #Installs Ruby gems
bin/rails db:prepare #Creates and migrates the database

Frontend (React)

cd frontend
npm install         #Installs frontend packages

🏃 Application Execution

Backend Server

cd backend
rails s

Frontend Development Server

cd frontend
npm run dev

Tech Stack

Backend
Ruby Rails

Frontend
TypeScript React Redux Toolkit

Database
PostgreSQL Redis

Deployment & Infra
AWS EC2 Docker Nginx

AI & Bot
Gemini AI Telegram Bot


License

MIT License

Copyright (c) 2026 banchan_01

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

AI English learning service & telegram chatting assistant

Resources

Stars

Watchers

Forks

Contributors