How zzzaaanew/local_link works
L-Link is a journalist-facing backend for generating local-news pitches, turning selected pitches and reporting notes into drafts, and rewriting supplied articles. Its primary workflow runs through the API to a generation service and returns editorial material; separate capabilities provide government-schedule planning, press-release pitches, style guidance, and usage controls. An RSS ingestion pipeline extracts article knowledge into Neo4j for graph-backed reporting context. Source excerpts support the RSS stages and parts of the planning and desk flows; other connections below rely on the SOURCE INDEX references, so unsampled internals are not inferred.
Main entry points: main.py FastAPI endpoints · source_pipeline.py Weekly plan pipeline · desk.py Pitch and draft desk · rewrite.py Article rewriting
Components 25
API and identity
- FastAPI endpoints
L_link_backend/main.py - Access authentication
L_link_backend/auth.py
Editorial workflows
- Pitch and draft desk
L_link_backend/desk.py - Press-release pitches
L_link_backend/press_pitches.py - Source pitches
L_link_backend/source_pitches.py - Weekly plan pipeline
L_link_backend/source_pipeline.py - Government schedule
L_link_backend/weekly_schedule.py - Plan documents
L_link_backend/plan_doc.py - Article rewriting
L_link_backend/rewrite.py - Rewrite targets
L_link_backend/rewrite_targets.py - Pitch suggestions
L_link_backend/suggestions.py - Trend discovery
L_link_backend/trends.py - Naver trends
L_link_backend/naver.py - Article collectors
L_link_backend/collectors.py
AI and policy
- Prompt builder
L_link_backend/prompts/builder.py - Claude generation
L_link_backend/llm.py - Editorial stylebook
L_link_backend/stylebook.py
Application state
- Quota and usage
L_link_backend/usage.py - Supabase records
L_link_backend/db.py
Knowledge ingestion
- RSS pipeline runner
rss_pipeline/main.py - Feed fetch and scrape
rss_pipeline/fetcher.py - Graph extraction
rss_pipeline/extractor.py - Neo4j graph loader
rss_pipeline/loader.py - Neo4j knowledge graph
Other components
- Journalist
Connections 39
- Journalist → FastAPI endpoints: requests
L_link_backend/main.py - FastAPI endpoints → Access authentication: verifies access
L_link_backend/main.py - FastAPI endpoints → Pitch and draft desk: routes desk work
L_link_backend/main.py - FastAPI endpoints → Press-release pitches: generates pitches
L_link_backend/main.py - FastAPI endpoints → Source pitches: requests source pitches
L_link_backend/main.py - FastAPI endpoints → Weekly plan pipeline: requests weekly plan
L_link_backend/main.py - FastAPI endpoints → Plan documents: routes plan documents
L_link_backend/main.py - FastAPI endpoints → Article rewriting: rewrites articles
L_link_backend/main.py - FastAPI endpoints → Rewrite targets: finds rewrite targets
L_link_backend/main.py - FastAPI endpoints → Pitch suggestions: routes suggestions
L_link_backend/main.py - FastAPI endpoints → Trend discovery: routes trends
L_link_backend/main.py - FastAPI endpoints → Editorial stylebook: serves style rules
L_link_backend/main.py - FastAPI endpoints → Quota and usage: checks and logs
L_link_backend/main.py - Pitch and draft desk → Prompt builder: builds draft message
L_link_backend/desk.py - Pitch and draft desk → Claude generation: generates draft
L_link_backend/desk.py - Pitch and draft desk → Editorial stylebook: applies rules
L_link_backend/desk.py - Pitch and draft desk → Supabase records: stores desk records
L_link_backend/desk.py - Press-release pitches → Prompt builder: uses prompt builder
L_link_backend/press_pitches.py - Press-release pitches → Claude generation: generates pitches
L_link_backend/press_pitches.py - Press-release pitches → Neo4j knowledge graph: reads graph context
L_link_backend/press_pitches.py - Weekly plan pipeline → Government schedule: loads schedule
L_link_backend/source_pipeline.py - Weekly plan pipeline → Claude generation: filters and generates
L_link_backend/source_pipeline.py - Weekly plan pipeline → Neo4j knowledge graph: fetches graph facts
L_link_backend/source_pipeline.py - Weekly plan pipeline → Article collectors: uses collectors
L_link_backend/source_pipeline.py - Weekly plan pipeline → Prompt builder: loads prompts
L_link_backend/source_pipeline.py - Article rewriting → Prompt builder: builds rewrite prompt
L_link_backend/rewrite.py - Article rewriting → Claude generation: generates rewrite
L_link_backend/rewrite.py - Article rewriting → Editorial stylebook: applies style rules
L_link_backend/rewrite.py - Article rewriting → Supabase records: reads records
L_link_backend/rewrite.py - Rewrite targets → Article collectors: collects candidates
L_link_backend/rewrite_targets.py - Rewrite targets → Prompt builder: loads prompt
L_link_backend/rewrite_targets.py - Rewrite targets → Claude generation: generates targets
L_link_backend/rewrite_targets.py - Trend discovery → Naver trends: retrieves trends
L_link_backend/trends.py - Pitch suggestions → Supabase records: reads suggestions
L_link_backend/suggestions.py - Quota and usage → Supabase records: reads and writes logs
L_link_backend/usage.py - RSS pipeline runner → Feed fetch and scrape: fetches and scrapes
rss_pipeline/main.py - RSS pipeline runner → Graph extraction: extracts graph data
rss_pipeline/main.py - RSS pipeline runner → Neo4j graph loader: loads extracted graph
rss_pipeline/main.py - Neo4j graph loader → Neo4j knowledge graph: writes graph
rss_pipeline/loader.py