Skip to content

J0SAL/RemindMe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧠 RemindMe Bot

An Intelligent Telegram Reminder Assistant powered by Google Gemini and Containerized Architecture.

Python Flask Redis Postgres Gemini LangChain Docker


🏗️ 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
Loading

✨ Features

  • 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.

📹 Demo

RemindMe Demo

�🚀 Getting Started

Prerequisites

  • Python 3.10+
  • Docker (for Redis)
  • Ngrok (for local development)

1. Environment Setup

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.app

2. Infrastructure

Start the Redis and PostgreSQL containers:

docker compose up -d

3. Run the Services

You 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.py

Terminal 2: Worker (Processes AI)

source backend/venv/bin/activate
python3 backend/worker.py

Terminal 3: Scheduler (Checks Time)

source backend/venv/bin/activate
python3 backend/scheduler.py

☁️ Legacy Cloud Infrastructure

This 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.

🛠️ Tech Stack Details

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)

About

A reminder for your daily needs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages