From 82d856a21dadd3b97859a75c80cb0332d9f9d08c Mon Sep 17 00:00:00 2001 From: ImBenji Date: Thu, 16 Apr 2026 22:45:58 +0100 Subject: [PATCH] first commit --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0b1727a --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# duriin_api + +Node.js Fastify server that ingests news articles from RSS, SEC EDGAR 8-K filings, Alpha Vantage News Sentiment, Finnhub company news, and GDELT into a local SQLite archive. + +## Setup + +1. Install dependencies: + ```bash + npm install + ``` +2. Edit `config.json` with your API keys, including `openRouter.apiKey`, tickers, RSS feeds, and schedules. +3. Start the server: + ```bash + npm start + ``` + +## API + +- `GET /articles?q=&source=&from=&to=&limit=&offset=` +- `GET /articles?similar_to={id}&limit=` +- `GET /articles?topic={query}&limit=` +- `GET /articles/:id` +- `GET /status` + +## Notes + +- SQLite archive file defaults to `./archive.sqlite`. +- Deduplication is enforced on `url` and normalized title. +- Article body extraction runs asynchronously after insertion, with hourly retries for rows still missing content. +- Main article images are stored as ultra-compressed base64 WebP. +- Embeddings are generated asynchronously with OpenRouter `perplexity/pplx-embed-v1-0.6b` and indexed in `sqlite-vec` for similarity search. +- Topic search caches normalized query embeddings in SQLite and falls back to OpenRouter on cache miss. +- SEC requests use the configured `User-Agent`.