This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
maple-brief-aggregator/.env.example
T
krisf 1010f27f44 MapleBrief: production Canadian news aggregator
Next.js 14 + TypeScript + Tailwind + Prisma/SQLite.
- LLM synthesis abstraction (OpenAI/Anthropic/Ollama) + admin settings UI
- RSS ingestion pipeline (parser + cheerio content) + node-cron worker
- AdSense AdUnit placements (header/in-feed/in-article/sidebar)
- Sources analysis attribution, nofollow links, canonical/OG, sitemap/robots
- Admin auth (ADMIN_API_KEY, timingSafeEqual, fail-closed 401)
- Multi-cell lady-ga-ga marker, sitemap, robots, legal pages
- Comprehensive README (setup, LLM config, AdSense, migrations, deploy)
2026-08-15 16:07:07 -04:00

66 lines
4.0 KiB
Bash

# ─────────────────────────────────────────────────────────────────────────────
# MapleBrief — environment configuration
# Copy to `.env` and fill in the values you need. Only the entries marked
# REQUIRED need to be set for the app to boot; everything else has a sane
# fallback or is managed from the /admin/settings UI (stored in the database).
# ─────────────────────────────────────────────────────────────────────────────
# ---------------------------------------------------------------------------
# Database (REQUIRED)
# SQLite by default — zero-config for local dev. For PostgreSQL, change
# provider in prisma/schema.prisma and point DATABASE_URL at a postgres URL.
# ---------------------------------------------------------------------------
DATABASE_URL="file:./dev.db"
# ---------------------------------------------------------------------------
# Site (public — inlined into the browser)
# ---------------------------------------------------------------------------
NEXT_PUBLIC_SITE_NAME="MapleBrief"
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
NEXT_PUBLIC_SITE_DESCRIPTION="Independently synthesized briefings on the news that matters across Canada. A neutral, source-attributed daily digest of Canadian headlines from CBC, CTV, Global, the Globe and more."
# ---------------------------------------------------------------------------
# Content reliability — used as fallback identity for feed fetches
# ---------------------------------------------------------------------------
FEED_USER_AGENT="MapleBrief/1.0 (+https://localhost:3000; rss reader)"
# ---------------------------------------------------------------------------
# Background ingestion scheduler
# TURN these off to run by hand (see README "Running the worker").
# ---------------------------------------------------------------------------
RUN_SCHEDULER="true" # set to "false" to disable the node-cron worker
CRON_SCHEDULE="*/35 * * * *" # every 35 minutes (spec: 30-60 minute cadence)
MAX_SYNTH_PER_RUN="24" # cap LLM syntheses per run to limit API spend
FETCH_CONTENT="true" # set to "false" to skip original HTML fetch
HTTP_TIMEOUT_MS="12000" # per-request timeout for HTML fetches
# ---------------------------------------------------------------------------
# LLM providers (fallback defaults; the /admin/settings UI overrides all of
# these at runtime and stores the active choices in the database).
# API keys referenced here are used only when the admin UI has NOT stored a
# value for that provider. Never commit real keys to .env in a shared repo.
# ---------------------------------------------------------------------------
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""
OLLAMA_BASE_URL="http://localhost:11434"
OLLAMA_MODEL="llama3.2:3b"
# ---------------------------------------------------------------------------
# Administration (protects the /admin/settings UI and /api/settings,
# /api/refresh endpoints). Must be a strong random string in production.
# ---------------------------------------------------------------------------
ADMIN_API_KEY="change-me-to-a-32-char-random-string"
# ---------------------------------------------------------------------------
# Google AdSense (public — publisher id + per-unit ad slots).
# NEXT_PUBLIC_ADSENSE_CLIENT_ID looks like: ca-pub-1234567890123456
# Slot ids are the numeric "slot" values from your AdSense Ad units UI.
# Leave a slot blank and the <AdUnit /> renders a labelled placeholder —
# perfect for local preview before your AdSense account is approved.
# ---------------------------------------------------------------------------
NEXT_PUBLIC_ADSENSE_CLIENT_ID=""
NEXT_PUBLIC_ADSENSE_SLOT_HEADER=""
NEXT_PUBLIC_ADSENSE_SLOT_INFEED=""
NEXT_PUBLIC_ADSENSE_SLOT_INARTICLE=""
NEXT_PUBLIC_ADSENSE_SLOT_SIDEBAR=""