Skip to content

Technical guide · Overview

Page status: Active

NutsNews Documentation

Welcome to the NutsNews documentation hub.

Visual overview

Primary diagram

System map

Welcome to the NutsNews documentation hub.

Render the repository-owned system map when you need it.

Diagram is not rendered yet.

View as text
NutsNews Documentation

Welcome to the NutsNews documentation hub.

flowchart TD
  accTitle: NutsNews Documentation
  accDescr {
    Welcome to the NutsNews documentation hub.
  }
  hub["README hub"] --> start["Start Here"]
  hub --> product["Product and Reader Experience"]
  hub --> platform["Platform and Data"]
  hub --> ai["AI and Automation"]
  hub --> ops["Operations and Release Management"]
  hub --> quality["Quality, Security, and Regression Tests"]
  hub --> history["History and Updates"]

  start --> project["Project"]
  start --> architecture["Architecture"]
  start --> opsdoc["Operations"]
  start --> infra["Infra Platform docs"]
  start --> troubles["Troubleshooting"]

  product --> public["Public site"]
  product --> admin["Admin experience"]
  platform --> core["Core platform"]
  platform --> recovery["Recovery and data protection"]
  ai --> providers["AI providers"]
  ai --> workers["Automation and workers"]
  ops --> release["Deploy & release"]
  ops --> incidents["Monitoring and incidents"]
  quality --> tests["Testing and QA"]

NutsNews Documentation

Fullscreen diagram view.

Welcome to the NutsNews documentation hub.

This repository is the canonical documentation home for NutsNews web, NutsNews Worker, and NutsNews iOS. Keep product, operations, deployment, cache, automation, and environment documentation here instead of in the application repositories so documentation-only updates do not trigger app deployments.

This folder is organized by what you are trying to do: understand the product, change the platform, operate production, monitor risk, or debug problems.


GoalStart here
Learn what NutsNews isProject Overview
Understand the systemArchitecture
Run the platformOperations
Understand the VPS operating modelInfra Operations Platform
Bootstrap the VPS baselineVPS Ansible Bootstrap
Bootstrap the backend serverBackend Bootstrap
Bootstrap backend credentialsBackend Credential Bootstrap
Run the protected backend apply workflowBackend Protected Apply
Route backend.nutsnews.comBackend Cloudflare Routing
Run the backend drift checkBackend Drift Check
Review backend host security baselineBackend Security Baseline
Review backend backup and restore baselineBackend Backup and Restore
Review backend monitoring baselineBackend Monitoring
Review backend health report automationBackend Health Report
Understand database resiliency and failover readinessDatabase Resiliency
Run backend cleanup report or dry-runBackend Cleanup Maintenance
Run fixed backend recovery checks or actionsBackend Recovery
Review backend OpenAI maintenance robotBackend OpenAI Maintenance Robot
Review backend service baseline attestationBackend Service Baseline
Operate the Supabase standby restricted probeSupabase Standby Restricted Probe
Reconcile the existing Supabase standby bootstrapBackend Postgres Failover
Find the worker-uplift operation owner mapWorker-Uplift Operation Map
Review worker-uplift RabbitMQ capacity and securityWorker-Uplift RabbitMQ Capacity And Security
Provision worker-uplift RabbitMQWorker-Uplift RabbitMQ Provisioning
Operate worker-uplift RabbitMQ drift, smoke, and canary workflowsWorker-Uplift RabbitMQ Operations
Rebuild, restore, or upgrade worker-uplift RabbitMQWorker-Uplift RabbitMQ Recovery
Operate worker-uplift services on the backend hostWorker-Uplift Service Runtime
Verify worker-uplift RabbitMQ metrics collectionWorker-Uplift RabbitMQ Metrics
Run the protected VPS baseline workflow or trigger an on-demand reportProtected Ansible Apply; Operations Portal v1
Run protected VPS package maintenance or rebootVPS Maintenance
Synchronize reviewed Vercel Production variables to the VPSVercel-to-VPS environment synchronization
Understand the VPS service foundationVPS Service Foundation
Review production/staging VPS runtime isolationVPS Runtime Environment Isolation
Review same-host staging capacity and safeguardsVPS Staging Capacity Budget
Rehearse or approve an immutable staging deploymentVPS Immutable Staging Deployment
Qualify an isolated deployed staging candidateVPS Immutable Staging Deployment — Independent Off-VPS Qualification
Rehearse staging gate failures and bypass closureProtected Ansible Apply — Gate Rehearsal And Bypass Inventory
Configure the protected staging hostname and credential boundaryVPS Staging Access and Credential Boundary
Understand the VPS operations portalOperations Portal v1
Set up or restore encrypted VPS backupsVPS Backups; VPS Restore; VPS Disaster Recovery
Set up Grafana Cloud observabilityGrafana Cloud Observability
Ship a changeDeployment Checklist
Understand the current end-to-end release pipelineRelease Pipeline
Write or review production release notesRelease Notes Workflow
Understand the Vercel + VPS web delivery modelDual-Target Web Deployment
Prepare or operate VPS-primary Cloudflare DNS failoverDual-Target Web Deployment - Cloudflare DNS Failover Controller
Fix a production issueTroubleshooting
Check cost and quota riskFree-Tier Guardrails
Validate public API contractsPublic API Contract Tests
Plan a formal external public APIPublic API Plan
Work on translationsMulti-language Summaries; Multilingual Quality and Fallbacks
Work on local AIWorker Local AI Lock; see ramideltoro/nutsnews-worker
Operate the worker-uplift shadow runtimeWorker-Uplift Shadow Runtime
Investigate worker queue pressureWorker Backpressure and Lock Safety
Run regression testsWeb Offline E2E; Vercel Preview Smoke Test; Worker tests live in ramideltoro/nutsnews-worker
Review iOS notesiOS documentation and update notes

These docs explain the product and the system at a high level.

DocUse it for
Project OverviewProduct story, mission, reader experience, and current status
ArchitectureSystem components, data flow, and repository layout
OperationsDay-to-day operating model, admin portal, and maintenance tasks
Infra Operations PlatformVPS GitOps model, CI stability layer, Ops Portal goal, support-node rules, reports, and provider migration strategy
VPS Ansible BootstrapFirst Ubuntu VPS baseline, SSH lockout prevention, firewall, updates, logging, and recovery flow
Backend BootstrapBackend server host contract, runtime direction, repo boundaries, and initial Ansible scaffold
Backend Credential BootstrapProtected GitHub Environment setup, credential inventory, provider secret names, readiness workflow, and rollback
Backend Protected ApplyManual protected backend Ansible check/apply workflow, Environment secrets, blockers, and validation
Backend Cloudflare RoutingDNS-only Cloudflare backend route, Caddy /healthz, protected apply order, verification, and rollback
Backend Drift CheckProtected read-only drift workflow, classification semantics, current evidence, and rollback boundary
Backend Security BaselineBackend SSH hardening desired state, verification commands, and apply blocker
Backend Backup and RestoreBackend backup scope, retention, restore-test gate, secret boundary, and recovery order
Backend MonitoringBackend host smoke checks, alert thresholds, log retention, and alert-delivery blocker
Backend Health ReportScheduled read-only backend host reports from GitHub Actions, JSON artifacts, SMTP delivery, and rollback
Backend Cleanup MaintenanceFixed-purpose backend cleanup report, dry-run, protected apply, allowlists, and protected paths
Backend RecoveryFixed-purpose backend recovery checks, protected service actions, pre/postchecks, and last-run evidence
Backend OpenAI Maintenance RobotDaily OpenAI-assisted maintenance scan, scan labels, issue routing, artifacts, and safety boundaries
Backend Service BaselineRead-only live service inventory, public exposure policy, and re-attestation trigger
Supabase Standby Restricted ProbeZero-cost forced-command backend probe boundary, activation checks, incident response, and safe evidence for the protected standby readiness workflow
Backend Postgres FailoverExisting production Supabase standby reconciliation workflow, safe metadata report contract, protected backfill mode, and failover boundary
Worker-Uplift Operation MapBackend-owned old-to-new operation map for legacy Worker scripts, backend host operations, Grafana ownership, DNS failover separation, and worker-uplift runtime controls
Worker-Uplift RabbitMQ Capacity And SecurityRabbitMQ release pin, queue-type decision, hard limits, access boundary, benchmark path, and recovery model for the backend-owned worker-uplift broker
Worker-Uplift RabbitMQ ProvisioningProtected Ansible/Compose provisioning path, topology bootstrap, credential boundary, durable probe, host-restart verification, and rollback model for the backend-owned worker-uplift broker
Worker-Uplift RabbitMQ OperationsProtected RabbitMQ apply guardrails, read-only drift coverage, smoke checks, private canary checks, health-report integration, artifacts, and issue #84/#91 proof paths
Worker-Uplift RabbitMQ RecoverySanitized definition exports, clean rebuild drills, stopped-volume restore drills, upgrade procedure, and health signals for the backend-owned worker-uplift broker
Worker-Uplift Service RuntimeShadow-first backend worker service runtime framework, fixed protected operations, service manifest validation, and issue #85 proof plan
Worker-Uplift RabbitMQ MetricsBackend Alloy RabbitMQ scrape path, bounded queue metrics, Grafana Cloud remote-write boundary, and issue #87 proof plan
Backend PostgreSQL FailoverBackend PostgreSQL shadow target, worker/app compatibility boundaries, parity gates, and rollback boundary
Protected Ansible ApplyManual protected GitHub Actions workflow for check/apply runs against the VPS baseline, plus the separate on-demand health report workflow
VPS Service FoundationDocker, Compose, /opt/nutsnews, Caddy, and public infrastructure health routing
VPS Runtime Environment IsolationSeparate production/staging Compose identities, state, Caddy boundary, immutable digest rule, and #118 blocker
VPS Staging Capacity BudgetMeasured #118 capacity decision, fixed resource/test budgets, disk limitation, and post-apply verification
VPS Immutable Staging DeploymentCandidate schema, pre-secret trust checks, staging-only GitOps apply, deterministic non-destructive qualification, off-VPS attestation, audit evidence, and required live verification
VPS Staging Access and Credential BoundaryShared-host topology, Cloudflare Access, fixed deployment identity, secret onboarding, protected apply, rollback, and live verification
Dual-Target Web DeploymentOne application commit, Vercel and GHCR artifacts, immutable VPS promotion, staged validation, public opt-in, and rollback
Operations Portal v1Read-only VPS dashboard, local collector, public Google OAuth route, status JSON, and recovery notes
VPS Alert Email PolicyStable alert identity, cooldown/escalation behavior, backup freshness semantics, and read-only troubleshooting
VPS BackupsEncrypted restic backups to a dedicated OneDrive rclone remote, setup secrets, status, alerts, and validation
VPS MaintenanceProtected package maintenance, reboot approval, post-reboot validation, and failure handling
VPS RestoreRestoring encrypted VPS snapshots to staging, copying selected data/config, and restore testing
VPS Disaster RecoveryRebuilding on another VPS provider, restoring data, verifying, cutting over DNS, and rollback
Grafana Cloud ObservabilityGrafana Alloy telemetry, centralized OpenTofu-managed dashboards/alerts, Synthetic Monitoring, backend imports, and free-tier guardrails
TroubleshootingCommon failures, checks, and recovery steps
DocUse it for
Full Archive SearchSearch behavior and archive lookup flow
Multi-language SummariesSupported languages, storage, Worker generation, and API display behavior
Multilingual Quality and FallbacksTranslation coverage checks, English-leak detection, admin visibility, and fallback policy
Public Page TranslationsAbout, Contact, Privacy, and settings language behavior
Public Pages Theme ConsistencyTheme behavior across public pages
Privacy Analytics And ConsentGA4 consent gate, allowed event taxonomy, disallowed data, retention, and rollback
Publisher Attribution And Content UsePublisher credit, summary/excerpt limits, source removal workflow, and future digest/social requirements
Public API PlanFuture formal external public API use cases, fields, rate limits, caching, versioning, and privacy constraints
Sitemap Scaling StrategySitemap index, article sitemap shards, crawler discovery, cache policy, and SEO audit coverage
DocUse it for
Modern Theme UICurrent public visual direction
Cache Safety UpdateSafe public caching behavior
Feed Visibility Fade FixFeed rendering visibility behavior
Home Button UpdatePublic navigation home button behavior
Page Fade Appear UpdatePage transition polish
DocUse it for
Admin Article ReviewsAccepted/rejected stories, filters, and review investigation
Admin Audit LogProtected audit trail for sensitive admin changes, retention, privacy, and validation
Incident Response PolicySEV1/SEV2/SEV3 definitions, alert routing, incident checklist, and post-incident review template
Production Readiness DashboardAdmin green/yellow/red scorecard for shipping readiness across public API health, Worker freshness, DB growth, translations, images, backups, and CI
Responsive Admin DashboardsMobile-friendly admin dashboard patterns
Home Server Dashboard/admin/home-server setup and troubleshooting
DocUse it for
Worker ingestion, controller, and local AISee ramideltoro/nutsnews-worker
Worker Backpressure and Lock SafetyQueue visibility, Redis lock lease safety, backpressure thresholds, and worker report counters
Public Feed Snapshot and Edge FallbackSupabase snapshot reads, Cloudflare KV fallback, headers, admin status, and recovery checks
Runtime Feature FlagsProtected shared runtime switches for archive search and optional Worker edge-snapshot publishing, with no-redeploy rollback steps
Supabase RLS Regression TestsLocal Supabase allow/deny policy tests for public reads, denied anonymous writes, and service-role-only database surfaces
RSS Source QualityFeed quality scoring, ranking, and source decisions
Image DeliveryThumbnails, image optimization, cache TTL, and category-aware non-photo fallbacks
Secure Image Proxy/Cache DesignIssue #105 design for optional Cloudflare image proxy/cache, domain controls, quotas, rollout, and kill switches
Performance and ResiliencyCaching, pagination, indexes, sharding, and reliability
Homepage Performance BudgetHomepage LCP, JS, CSS, image, and transfer budgets
Web Visual Regression TestsPlaywright screenshot baselines for public page layout states
Cloudflare Cache ObservabilityCache policy dashboard, scheduled alerts, route expectations, and common fixes
DocUse it for
Database ResiliencyCurrent primary/standby topology, data synchronization, failover gates, backup layers, and improvement opportunities
Supabase Backup AutomationHome-server backups to encrypted OneDrive
VPS BackupsVPS restic backups to encrypted OneDrive storage through rclone
VPS RestoreVPS restic restore and restore-test procedure
VPS Disaster RecoveryProvider-agnostic VPS rebuild and cutover runbook
Worker-Uplift RabbitMQ OperationsRabbitMQ protected apply, drift, smoke, private canary, and health-report operating evidence
Worker-Uplift RabbitMQ RecoveryRabbitMQ topology rebuild, stopped-volume restore, and upgrade procedure
Worker-Uplift RabbitMQ MetricsRabbitMQ metrics collection, cardinality guardrails, and Grafana ownership boundary
Supabase Restore ProcedureRestore order, SQL import, and validation queries
Migration Release GateOrdered migrations, schema-drift readiness, deterministic staging fixtures, compatibility windows, and protected rollout
Free-Tier GuardrailsQuota, cost, and usage warning dashboard
DocUse it for
Worker Local AI LockWeb-side note for the Worker repo local-AI deployment lock
Worker Backpressure and Lock SafetyIngestion pressure controls, lock overlap safety, and queue/deferred report fields
Worker/local AI repositorySee ramideltoro/nutsnews-worker
Multi-language SummariesWebsite translation display and recovery context
Multilingual Quality and FallbacksQuality gates, daily reports, admin dashboard, and fallback behavior
DocUse it for
Cloudflare Turnstile Contact FormContact form bot protection
GitHub Actions AutomationCI and automation workflow overview
GitHub Pages Wiki PublishingPublishing docs to wiki.nutsnews.com
DocUse it for
Deployment ChecklistSafe release steps for web, DB, and cache
Release PipelineCurrent end-to-end commit, PR, Vercel, image, staging, qualification, protected promotion, production VPS, and verification pipeline
Release Notes WorkflowManual release-note format, cross-repo checklist, evidence, automation boundary, and rollback notes
Dual-Target Web DeploymentBuild identity, environment parity, image publishing, digest promotion, VPS-primary DNS failover, protected rollout, and rollback
Dependency Updatesnpm audit, safe upgrades, Dependabot, and validation
Mandatory NutsNews Docs PolicyRequired docs updates, release-note summaries, diagrams, and app/docs PR linkage for every NutsNews change
Platform Improvement BacklogPlanned platform improvement issues
DocUse it for
ObservabilityLogs, errors, dashboards, and health checks
VPS Production Runtime 500 IncidentCorrelated RSC 500 evidence, GitOps recovery, protected Supabase migration, and schema-compatible release promotion
Backend Health ReportDaily backend host health report, generated JSON, email delivery, and read-only evidence
Grafana Cloud ObservabilityVPS host/container/service/app/log dashboards, quota alerts, and Synthetic Monitoring setup
Cloudflare Cache ObservabilityExpected-vs-actual cache header reports and alerts
UptimeRobot OnboardingExternal uptime monitors
Grafana Backup MonitoringBackup freshness and success panels
PageSpeed InsightsProduction performance audits

6. Quality, Security, and Regression Tests

Section titled “6. Quality, Security, and Regression Tests”
DocUse it for
Homepage Performance BudgetBuild-size report, hard budgets, and common fixes
Web Visual Regression TestsScreenshot snapshots, update workflow, and failure artifacts
Supabase RLS Regression TestsDisposable local database tests for Supabase grants, RLS policies, and approved public/service-role access
Multilingual Quality and FallbacksTranslation coverage report, language-code checks, and fallback quality rules
Lighthouse CI OnboardingLighthouse CI setup and thresholds
PageSpeed InsightsManual production speed checks
axe Playwright Accessibility CIAccessibility regression checks
SEO Structured Data AuditSEO and structured data review
Sitemap Scaling StrategySitemap index and shard validation for large article archives
DocUse it for
CodeQL Security ScanGitHub CodeQL setup and usage
Snyk Security ScanSnyk dependency and code scanning
Security HardeningCSP, browser headers, admin no-store behavior, contact form controls, and CI validation
Security CI ScansCodeQL, Dependency Review, Dependabot, Gitleaks, OSV, actionlint, OpenSSF Scorecard, Lighthouse, ZAP, and manual GitHub security settings
Dependency UpdatesSafe package update routine
DocUse it for
Public API Contract TestsMocked contract checks for /api/articles, /api/search, /api/contact, sitemap, and robots
Web Offline E2E Regression TestFully mocked public web flow test before preview deploy
Web Public Reader Smoke TestPR Playwright smoke coverage for home feed, infinite scroll, language switching, contact validation, public pages, and article detail
Web Visual Regression TestsPublic-page screenshot snapshots for desktop/mobile and representative UI states
Vercel Preview Smoke TestLive PR preview checks after Vercel deploys
Worker Offline E2E Regression TestSee ramideltoro/nutsnews-worker
Worker Local AI LockWhy the Worker repo prevents accidental OpenAI-first deploys

Older one-off implementation notes are kept out of the main reading path.

AreaLocation
Archived root notesarchive/
Older update notesupdates/
iOS update notesios/

For a new contributor:

  1. Project Overview
  2. Architecture
  3. Operations
  4. Deployment Checklist
  5. Troubleshooting

For production support:

  1. Operations
  2. Observability
  3. Free-Tier Guardrails
  4. Troubleshooting
  5. Supabase Restore Procedure

For UI or reader-facing work:

  1. Full Archive Search
  2. Multi-language Summaries
  3. Image Delivery
  4. Web Offline E2E Regression Test

Keep docs:

  • Short at the top
  • Clear before detailed
  • Action-oriented
  • Easy to scan
  • Linked from this index when they matter
  • Archived when they become one-off notes

See Documentation Style Guide for naming, structure, and wording rules.

Vercel preview smoke test protection bypass

Section titled “Vercel preview smoke test protection bypass”

Protected Vercel preview deployments require the GitHub Actions secret VERCEL_AUTOMATION_BYPASS_SECRET, created from Vercel Project Settings -> Deployment Protection -> Protection Bypass for Automation. The live Playwright smoke test uses this secret only as an HTTP header and does not commit it to the repo.