How ambedkargpt/social_media_post_generator works
This is a political-content platform whose central workflow turns current news and a transcript corpus into profile-specific social posts with transcript references. It also exposes user-facing authentication, profile/questionnaire, news, post, and chat capabilities, plus an operator pipeline for channel ingestion and artifact rebuilding. The README documents the core RAG stages; sampled CLI and retrieval code support the retrieval paths shown. Other API and orchestration internals are represented only where their paths and product roles are clear, not as asserted call chains.
Main entry points: pipeline_cli.py RAG runner · watch_handler.py Channel watcher · App.jsx Web application · app.py Pipeline console
Components 24
User interfaces
- Web application
frontend/src/App.jsx - Pipeline console
backend/streamlit_app/app.py
Accounts and content
- HTTP API
backend/api/v1 - Account and content services
backend/services - Application database
backend/db/mongo.py
News to posts
- RAG runner
backend/pipeline_cli.py - News acquisition
backend/pipeline/news_fetcher.py - Article extraction
backend/pipeline/news_scraper.py - Relevant arguments
backend/pipeline/retriever.py - Profile post generation
backend/pipeline/generator.py - Posts and references
backend/pipeline_cli.py
Corpus and retrieval
- Transcript parsing
backend/pipeline/transcript_parser.py - Argument chunking
backend/pipeline/chunker.py - Chunk embeddings
backend/pipeline/embedder.py - Vector retrieval
backend/pipeline/vector_store.py - Semantic graph retrieval
backend/semrag/runtime.py
Channel operations
- Stage orchestration
backend/pipeline/orchestration/runner.py - Channel watcher
backend/worker/watch_handler.py - Channel artifacts
backend/core/s3_loader.py
Other components
- Content creator
- NewsAPI
- YouTube feeds
- Gemini embeddings
- OpenAI generation
Connections 23
- Content creator → Web application: uses
- Content creator → Pipeline console: operates
- Web application → HTTP API: requests
- HTTP API → Account and content services: dispatches
- Account and content services → Application database: reads and writes
- RAG runner → News acquisition: fetches
- News acquisition → NewsAPI: requests news
- RAG runner → Article extraction: scrapes articles
- RAG runner → Transcript parsing: parses corpus
- Transcript parsing → Argument chunking: produces chunks
- Argument chunking → Chunk embeddings: embeds chunks
- Chunk embeddings → Gemini embeddings: requests embeddings
- RAG runner → Vector retrieval: loads or builds
- RAG runner → Relevant arguments: retrieves chunks
- Relevant arguments → Vector retrieval: searches
- RAG runner → Semantic graph retrieval: requests candidates
- RAG runner → Profile post generation: generates posts
- Profile post generation → OpenAI generation: requests completion
- RAG runner → Posts and references: outputs posts and citations
- Pipeline console → RAG runner: runs flow
- Channel watcher → YouTube feeds: checks uploads
- Channel watcher → Channel artifacts: reads and writes state
- Stage orchestration → Channel artifacts: loads artifacts