Loading...
Loading sources...
Fetches headlines from your configured RSS sources, then uses Gemini to create a broadcast-ready digest with audio.
Loading digests...
Loading...
Loading...
Loading...
Create a local CLI key for grn login <api-key>. New keys are shown once.
Loading keys...
Loading...
Loading...
Loading...
Loading...
Loading...
System Overview
High-level architecture and how each layer connects
Galactic Radio News is a FastAPI service that generates AI-written articles and broadcast-ready news digests. It serves browser users, command-line automation, and remote agents through the same backend.
Generation Pipeline
How news requests become articles and audio digests
Request Received
User submits an article topic or digest request. The API authenticates the caller and records a job.
POST /api/v1/news/generateFetch Inputs
Article generation uses user topic/context. Digest generation pulls enabled NewsData.io or RSS sources and selected DJ voice metadata.
RSSService / NewsDataServiceLLM Writing
Gemini writes a structured article or broadcast digest using prompt templates and user-provided instructions.
LLMService.generate_*Audio and Storage
Digest scripts can be converted to DJ audio and uploaded with a signed playback URL.
TTSService -> StorageServicePublish State
Articles and digests are stored in Firestore, exposed to user pages, business feeds, and optional network broadcast toggles.
ArticleRepository / DigestRepositoryAuthentication
Auth methods for browser, CLI, API, and service clients
Firebase OAuth
API Key
grn login <api-key>. The CLI stores it in ~/.grn/config.json and sends X-API-Key.Service API Keys
X-API-Key service credentials to access automation tools.Credits
Business-level usage accounting for generated content
Businesses hold credits that can be assigned and adjusted by admins. Generation features use credit checks through the shared credit service and transaction records.
MCP Server
JSON-RPC tool server for remote news agents
The News MCP endpoint exposes article, digest, source, and network tools to authenticated remote agents.
Available Tool Areas
Connection Config
{
"mcpServers": {
"galactic-radio-news": {
"type": "http",
"url": "https://YOUR_HOST/api/v1/news-mcp",
"headers": { "X-API-Key": "${GRN_SERVICE_API_KEY}" }
}
}
}Prompt Engineering
How the AI writes articles and digest scripts
prompts/news_writer.json and is managed through the prompt registry service.API Reference
Primary REST endpoints exposed by the News API
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/v1/health | Health check | None |
| POST | /api/v1/news/generate | Generate an article | Required |
| GET | /api/v1/news/jobs/{id} | Poll article job status | Required |
| GET | /api/v1/news/articles/mine | List user articles | Required |
| POST | /api/v1/digests/generate | Generate a digest | Required |
| GET | /api/v1/digests/ | List past digests | Required |
| GET | /api/v1/news-mcp/profile | MCP profile and tools | Required |
| POST | /api/v1/news-mcp | MCP JSON-RPC endpoint | Service key |
CLI Tool (grn)
Command-line interface for power users and automation
Install with pip install -e ".[cli]", then use grn from the terminal.
Setup
grn login grn_...Save an API key created from the web Account tab.
grn whoamiVerify the saved key against the API.
News Generation
grn generate "AI radio policy changes"Generate an article from a topic.
grn articles generate "Space economy" --style broadcast --length mediumGenerate with editorial controls.
grn digest --dj <uuid>Generate a digest with a DJ voice.
Management
grn articles mineList your articles.
grn digests listList past digests.
grn sources listList configured news sources.
Utilities
grn status <job_id> --watchPoll a generation job until complete.
grn djsList available DJ personalities.
grn configShow current token, API key, and base URL config.
Deployment
Cloud Build, Docker, and Cloud Run configuration
Project Structure
galactic-radio-news/
src/galactic_news/
app.py # FastAPI application factory
config.py # Settings from environment
api/v1/ # REST + MCP endpoints
services/ # LLM, TTS, storage, sources, digest
repositories/ # Firestore access
frontend/static/ # Browser app
cli/
main.py # Typer CLI entrypoint
commands/ # articles, digests, sources, auth
prompts/news_writer.json # Default prompts
cloudbuild.yaml # Cloud Build -> Cloud Run
pyproject.toml # Project metadata + grn scriptTech Stack
Primary tools and services in the system