How nomado-nakama/ideas_manager works
Project type and purpose
• This is a backend-focused, microservice-style RAG (Retrieval-Augmented Generation) system packaged via Docker Compose.
• Its purpose is to let users send Instagram URLs to a Telegram bot, download and process that content (images, video, audio), store metadata in Postgres, and answer user queries by retrieving context via RAG.
File structure
Top-level directories & files:
• configs/ingestion_worker – Dockerfile & Python deps for the worker that processes new URLs
• configs/tgbot – Dockerfile & deps for the Telegram bot service
• docker-compose.yaml – orchestrates tgbot, ingestion_worker, Postgres
• migrations/ – SQL scripts to set up the database schema
• nn_ideas_manager/ – core Python package
– core/db/ – DB connection, config, helper functions
– core/tgbot/ – Telegram bot config and handlers (start, link)
– core/workers/process_undigested_urls/ – logic to consume undigested URLs, download content, write to DB
• main.py – entrypoint that picks service based on environment
README for additional insights
• High-level architecture calls out three main layers: Telegram Bot, Ingestion Worker, and Postgres + storage.
• External dependencies: Telegram API, Instagram endpoints for reels and posts, local file storage, subwhisperer for transcription.
• Future work notes around audio transcription & summarization.
Detail
• Migrations step during DB initialization.
• Volume mounts from containers to storage.
• Retry/queue logic in the ingestion worker.
• RAG retrieval path: “query → context builder → LLM embedding → DB lookup.”