No description
- HTML 48.2%
- Go 34.3%
- CSS 16.1%
- JavaScript 1%
- Shell 0.4%
| design | ||
| docs | ||
| scrapers | ||
| scripts | ||
| static | ||
| templates | ||
| ai_worker.go | ||
| ai_worker_test.go | ||
| analyzer.go | ||
| auth.go | ||
| auth_test.go | ||
| CLAUDE.md | ||
| cluster.go | ||
| cluster_test.go | ||
| config.go | ||
| config_test.go | ||
| content_worker.go | ||
| content_worker_test.go | ||
| conventions.yaml | ||
| db.go | ||
| db_articles.go | ||
| db_auth.go | ||
| db_editions.go | ||
| db_metadata.go | ||
| db_scrapers.go | ||
| db_test.go | ||
| edition.go | ||
| edition_test.go | ||
| fallback.go | ||
| fallback_test.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| ollama.go | ||
| ollama_test.go | ||
| openai.go | ||
| openai_test.go | ||
| README.md | ||
| scheduler.go | ||
| scheduler_test.go | ||
| server.go | ||
| server_test.go | ||
| smoke_test.go | ||
nyheter
A Norwegian news syndication app. Scrapes major news sites, tracks story prominence, and produces daily morning and evening editions of the 10 most important stories with AI-generated summaries.
How it works
- Scrapes the front pages of NRK, VG, TV2, Dagbladet, ABC Nyheter, and Aftenposten every 10 minutes
- Tracks which stories stay near the top and appear across multiple sites
- At 6am and 6pm, generates an edition of the top 10 stories
- Summaries are generated by a local model (fox/gemma4, with cube/qwen3 as fallback)
Stack
- Go
- SQLite
- HTMX
- Local LLMs (llama-swap / Ollama)
AI summaries
Summaries come from a primary backend with automatic fallback to a secondary one when the primary is unreachable. The two may speak different protocols:
- Primary — fox:
gemma4:26bserved by llama-swap over the OpenAI-compatible/v1/chat/completionsAPI (AI_API=openai). - Fallback — cube:
qwen3:14bserved by Ollama's native/api/chatAPI (AI_API=ollama).
Fallback is per request: every article tries the primary first, so a recovered
primary is used again immediately with no cooldown. Set AI_FALLBACK_URL="" to
disable the fallback and use only the primary.
Configuration
| Variable | Default | Description |
|---|---|---|
DATABASE_PATH |
news.db |
Path to SQLite database |
LISTEN_ADDR |
:8080 |
HTTP listen address |
AI_URL |
http://fox:11434 |
Primary AI backend base URL |
AI_MODEL |
gemma4:26b |
Primary model |
AI_API |
openai |
Primary protocol: openai or ollama |
AI_API_KEY |
— | Optional Bearer token for the primary backend |
AI_FALLBACK_URL |
http://cube:11434 |
Fallback backend base URL (empty disables) |
AI_FALLBACK_MODEL |
qwen3:14b |
Fallback model |
AI_FALLBACK_API |
ollama |
Fallback protocol: openai or ollama |
AI_FALLBACK_API_KEY |
— | Optional Bearer token for the fallback backend |
SCRAPE_INTERVAL |
10m |
Polling interval |
Routes
/— Current edition with navigation to past editions/desk— Admin interface (scraper status, article browser, ranking preview)