No description
  • HTML 48.2%
  • Go 34.3%
  • CSS 16.1%
  • JavaScript 1%
  • Shell 0.4%
Find a file
2026-05-30 01:16:49 +02:00
design Initialize orbit with design system and conventions (#1) 2026-04-07 09:27:48 +02:00
docs Initialize orbit with design system and conventions (#1) 2026-04-07 09:27:48 +02:00
scrapers refactor: table-driven content fetchers, eliminate 14 files 2026-03-30 14:50:54 +02:00
scripts Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
static feat: match frontpage exactly to design — edition header, nav, animations 2026-03-30 11:58:28 +02:00
templates feat: WebAuthn login/register page 2026-03-30 13:41:00 +02:00
ai_worker.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
ai_worker_test.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
analyzer.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
auth.go feat: WebAuthn auth layer with ceremonies, sessions, middleware 2026-03-30 13:41:05 +02:00
auth_test.go feat: WebAuthn auth layer with ceremonies, sessions, middleware 2026-03-30 13:41:05 +02:00
CLAUDE.md Replace tea with forge in merge instruction (#2) 2026-04-24 10:22:02 +02:00
cluster.go fix: raise cluster threshold to 3, limit AI to 8 specific keywords 2026-03-30 12:12:59 +02:00
cluster_test.go fix: raise cluster threshold to 3, limit AI to 8 specific keywords 2026-03-30 12:12:59 +02:00
config.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
config_test.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
content_worker.go feat: extract and store article metadata (section, description, image, tags, modified_at) 2026-03-30 14:44:10 +02:00
content_worker_test.go refactor: split content worker into ContentFetcher and AIAnalyzer 2026-03-30 09:28:29 +02:00
conventions.yaml Initialize orbit with design system and conventions (#1) 2026-04-07 09:27:48 +02:00
db.go feat: extract and store article metadata (section, description, image, tags, modified_at) 2026-03-30 14:44:10 +02:00
db_articles.go refactor: remove dead code, wire DeleteExpiredSessions 2026-03-30 14:46:39 +02:00
db_auth.go refactor: split db.go into domain files 2026-03-30 14:40:25 +02:00
db_editions.go refactor: split db.go into domain files 2026-03-30 14:40:25 +02:00
db_metadata.go refactor: rename journalist → author tables and methods 2026-03-30 14:42:07 +02:00
db_scrapers.go refactor: remove dead code, wire DeleteExpiredSessions 2026-03-30 14:46:39 +02:00
db_test.go refactor: remove dead code, wire DeleteExpiredSessions 2026-03-30 14:46:39 +02:00
edition.go refactor: move edition formatting helpers from server.go to edition.go 2026-03-30 14:46:16 +02:00
edition_test.go feat: AI-generated keywords for clustering, switch to qwen3:14b 2026-03-30 09:25:11 +02:00
fallback.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
fallback_test.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
go.mod feat: WebAuthn auth layer with ceremonies, sessions, middleware 2026-03-30 13:41:05 +02:00
go.sum feat: WebAuthn auth layer with ceremonies, sessions, middleware 2026-03-30 13:41:05 +02:00
main.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
ollama.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
ollama_test.go feat: AI-generated keywords for clustering, switch to qwen3:14b 2026-03-30 09:25:11 +02:00
openai.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
openai_test.go Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
README.md Use fox for AI summaries with cube as fallback (#4) 2026-05-30 01:16:49 +02:00
scheduler.go refactor: remove dead code, wire DeleteExpiredSessions 2026-03-30 14:46:39 +02:00
scheduler_test.go feat: edition generation at 6am and 6pm 2026-03-29 21:45:59 +02:00
server.go refactor: move edition formatting helpers from server.go to edition.go 2026-03-30 14:46:16 +02:00
server_test.go feat: wire WebAuthn — protect /desk, add /login routes 2026-03-30 13:43:53 +02:00
smoke_test.go feat: wire WebAuthn — protect /desk, add /login routes 2026-03-30 13:43:53 +02:00

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

  1. Scrapes the front pages of NRK, VG, TV2, Dagbladet, ABC Nyheter, and Aftenposten every 10 minutes
  2. Tracks which stories stay near the top and appear across multiple sites
  3. At 6am and 6pm, generates an edition of the top 10 stories
  4. 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:26b served by llama-swap over the OpenAI-compatible /v1/chat/completions API (AI_API=openai).
  • Fallback — cube: qwen3:14b served by Ollama's native /api/chat API (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)