How ashwini1779/thedigest-ai--news-aggregator works
The Digest lets readers discover live news, save articles, then summarize, export, or index saved stories for cited RAG answers. The graph follows the documented UI/API workflow and the sampled service ownership; several backend feature links are supported by the README but their router/service source was not sampled, so those internal call details are not expanded.
Main entry points: router.tsx Web app · api.ts API client · main.py FastAPI app · ai.py AI routes
Components 27
Reader interface
- Web app
frontend/src/router.tsx - Discover feed
frontend/src/routes/index.tsx - News search
frontend/src/routes/search.tsx - Publisher browse
frontend/src/routes/publisher.tsx - Saved library
frontend/src/routes/saved.tsx - Ask AI
frontend/src/routes/ask.tsx - API client
frontend/src/lib/api.ts
Backend API
- FastAPI app
backend/main.py - News routes
backend/app/routers/news.py - Article routes
backend/app/routers/articles.py - AI routes
backend/app/routers/ai.py - Health routes
backend/app/routers/health.py
News discovery
- News normalization
backend/app/services/news_service.py - Provider access
backend/app/repositories/news_repository.py
Saved articles
- Article operations
backend/app/services/article_service.py - Article persistence
backend/app/repositories/article_repository.py - PostgreSQL
backend/app/models/article.py
AI and exports
- Text chunking
backend/app/services/chunk_service.py - Local embeddings
backend/app/services/embedding_service.py - FAISS index
backend/app/services/vector_store.py - RAG retrieval
backend/app/services/search_service.py - Gemini generation
backend/app/services/gemini_service.py - PDF generation
backend/app/services/pdf_service.py
Other components
- Reader
- News providers
- Gemini API
- Generated PDF
Connections 32
- Reader → Web app: uses
- Web app → Discover feed: routes to
- Web app → News search: routes to
- Web app → Publisher browse: routes to
- Web app → Saved library: routes to
- Web app → Ask AI: routes to
- Discover feed → API client: requests headlines
- News search → API client: searches news
- Publisher browse → API client: requests publisher
- Saved library → API client: manages articles
- Ask AI → API client: submits questions
- API client → FastAPI app: REST JSON
- FastAPI app → News routes: dispatches
- FastAPI app → Article routes: dispatches
- FastAPI app → AI routes: dispatches
- FastAPI app → Health routes: dispatches
- News routes → News normalization: handles news
- News normalization → Provider access: fetches data
- Provider access → News providers: requests
- Article routes → Article operations: handles articles
- Article operations → Article persistence: persists articles
- Article persistence → PostgreSQL: reads and writes
- AI routes → Text chunking: indexes text
- Text chunking → Local embeddings: chunks embedded
- Local embeddings → FAISS index: adds vectors
- AI routes → RAG retrieval: retrieves context
- RAG retrieval → Local embeddings: embeds question
- RAG retrieval → FAISS index: searches vectors
- AI routes → Gemini generation: generates answers
- Gemini generation → Gemini API: calls
- Article routes → PDF generation: exports article
- PDF generation → Generated PDF: writes PDF