Files · Automated Industry Newsletter Curator
64 (1 binary, 608.3 kB total)attempt 1
README.md·2846 B·markdown
markdown
# Automated Industry Newsletter Curator
> Curate a weekly newsletter from RSS feeds and internal updates with AI summaries.
A tutorialized reference solution from [reaatech.com](https://reaatech.com), demonstrating how to build production-grade AI systems with the `@reaatech/*` package family.
## Architecture
```
RSS Feeds → rss-fetcher → article-extractor (Readability + node-html-markdown) → RAG Pipeline (ingestion + hybrid retrieval) → LLM Service (scoring + summarization) → newsletter-compiler → Markdown Draft
```
## Quick Start
1. `pnpm install`
2. Copy `.env.example` to `.env`
3. Fill in at least `LLM_API_KEY` and `RSS_FEEDS`
4. `pnpm dev`
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| LLM_API_KEY | — | Provider-agnostic LLM API key |
| LLM_BASE_URL | https://api.openai.com/v1 | Any OpenAI-compatible endpoint |
| LLM_MODEL | gpt-5.2 | Model identifier |
| RSS_FEEDS | — | Comma-separated RSS feed URLs |
| QDRANT_URL | http://localhost:6333 | Qdrant vector DB URL |
| QDRANT_API_KEY | — | Qdrant API key |
| QDRANT_COLLECTION_NAME | newsletter-articles | Qdrant collection name |
| NEWSLETTER_MAX_ARTICLES | 15 | Max articles per newsletter |
| NEWSLETTER_OUTPUT_DIR | ./output | Directory for markdown drafts |
| LOG_LEVEL | info | Pino log level |
| PORT | 3000 | HTTP server port |
## Provider Agnostic
Set `LLM_BASE_URL` to any OpenAI-compatible endpoint (OpenAI, DeepSeek, Groq, OpenRouter, local LLM via vLLM, etc.) and `LLM_MODEL` to the model identifier accepted by that endpoint.
## API Reference
| Method | Path | Description |
|---|---|---|
| GET | /health | Server health + collection stats |
| POST | /api/newsletter/generate | Generate a newsletter draft |
| GET | /api/newsletter/latest | Get most recent draft |
| POST | /api/updates | Add internal update |
| GET | /api/updates | List internal updates |
| DELETE | /api/updates/:id | Delete internal update |
| POST | /api/sources | Add RSS feed source |
| GET | /api/sources | List RSS feed sources |
| DELETE | /api/sources/:id | Remove RSS feed source |
| POST | /api/pipeline/search | Search ingested articles |
| GET | /api/pipeline/stats | RAG pipeline collection stats |
## REAA Packages
| Package | Role |
|---|---|
| @reaatech/hybrid-rag | Core domain types, schemas, and validation |
| @reaatech/hybrid-rag-pipeline | RAG pipeline orchestrator (primary integration) |
| @reaatech/hybrid-rag-retrieval | BM25 search, reranker, and hybrid fusion |
| @reaatech/hybrid-rag-ingestion | Document loading, preprocessing, and chunking |
| @reaatech/hybrid-rag-observability | Structured logging, tracing, and metrics |
| @reaatech/hybrid-rag-mcp-server | MCP server for agent integration |
## Testing
```bash
pnpm test
pnpm typecheck
pnpm lint
```
## License
MIT — see [LICENSE](./LICENSE).