An Intelligent Telegram Reminder Assistant powered by Google Gemini and Containerized Architecture.
RemindMe uses a modern Event-Driven Architecture to ensure responsiveness and reliability. It is fully containerized and uses a split-service design.
graph LR
User -->|Message| Telegram
Telegram -->|Webhook| Server[Flask Server]
Server -->|Enqueue| Queue[(Redis Queue)]
Queue -->|Process| Worker[AI Worker]
Worker -->|Reply| Telegram
Scheduler[Scheduler] -->|Trigger| DB[(Database)]
DB -->|Reminder| Telegram
- Natural Language Understanding: Just say "Remind me to call Mom in 10 mins" and it understands.
- Asynchronous Processing: Webhooks return instantly; AI processing happens in the background.
- Reliable Scheduling: Dedicated scheduler service ensures reminders are sent on time.
- Cloud Database: Persisted in AWS RDS (PostgreSQL).
- Containerized: Redis and Services are ready for Docker deployment.
- Python 3.10+
- Docker (for Redis)
- Ngrok (for local development)
Create a .env file in the backend/ directory:
TELEGRAM_BOT_TOKEN=your_token
GEMINI_API_KEY=your_key
POSTGRES_DB_URL=postgresql://postgres:password@localhost:5432/remindme
REDIS_URL=redis://localhost:6379
DEV_URL=https://your-ngrok-url.ngrok-free.appStart the Redis and PostgreSQL containers:
docker compose up -dYou need to run 3 separate terminals to simulate the microservices architecture:
Terminal 1: Web Server (Receives Messages)
source backend/venv/bin/activate
python3 backend/app.pyTerminal 2: Worker (Processes AI)
source backend/venv/bin/activate
python3 backend/worker.pyTerminal 3: Scheduler (Checks Time)
source backend/venv/bin/activate
python3 backend/scheduler.pyThis project initially used a serverless architecture with AWS Lambda (for the worker) and Amazon EventBridge (for scheduling).
While we migrated to a containerized worker and scheduler for portability, the original cloud-native code is preserved in the aws/ directory for reference. It demonstrates how to implement:
- AWS Lambda: Serverless execution of Python logic.
- Amazon EventBridge: Cron-style triggers in the cloud.
- AWS RDS: Managed PostgreSQL database for cloud persistence.
| Component | Technology | Purpose |
|---|---|---|
| Brain | Google Gemini 2.5 Flash | Fast, cost-effective NLU |
| Orchestration | LangChain | AI Logic & Prompt Management |
| Backend | Flask | Lightweight Webhook handler |
| Queue | Redis + RQ | Async task management |
| Database | PostgreSQL (Docker) | Persistent storage |
| Scheduler | Python Schedule | Periodic checks (Cron replacement) |