Galaxy

engineering-readme · engineering · org · 2026-06-01 10:19

# productgalaxy Shared backend (Postgres + REST API + MCP) behind 4 existing SabaIdea apps + 1 new docs product. - **ABtest-dashboard** — A/B test management - **Product-Audits** — UX + health audits, walkthroughs, AI insights - **product

engineering-plan · engineering · org · 2026-06-01 10:19

# productgalaxy — shared DB + APIs + MCP behind 4 existing apps ## Context Four sibling tools under `/Users/parhumm/Projects/SabaIdea/product/` track complementary slices of the same businesses (Televika, Filimo, Aparat, Forsi, and compet

engineering-packages-db-migrations-readme · engineering/packages/db/migrations · org · 2026-06-01 10:19

# Drizzle migrations ## Naming convention - `0000_*.sql` through `8999_*.sql` — auto-generated by `drizzle-kit generate`. Append-only; never edit a committed migration. (CLAUDE.md §6 + drizzle-kit/README.md docs cache.) - `9000_*.sql` t

engineering-packages-clients-ts-pm-client-readme · engineering/packages/clients-ts/pm-client · org · 2026-06-01 10:19

# @galaxy/pm-client Generated TypeScript client for the productgalaxy PM API (`/api/v1/pm-tasks` + `/api/v1/pm-pipeline`). Consumed by the legacy product-decisions React/Vite app during the data-layer swap. ## Generate ```bash docker com

engineering-packages-clients-ts-audits-client-readme · engineering/packages/clients-ts/audits-client · org · 2026-06-01 10:19

# @galaxy/audits-client Generated TypeScript client for the productgalaxy Audits API. Consumed by the legacy Product-Audits React/Vite app during its data-layer swap. ## Install The Product-Audits team adds it to their `package.json` as

engineering-packages-clients-ts-abtests-client-readme · engineering/packages/clients-ts/abtests-client · org · 2026-06-01 10:19

# @galaxy/abtests-client Generated TypeScript client for the productgalaxy A/B test API (`/api/v1/abtests`). Consumed by the legacy ABtest-dashboard team during the data-layer swap. **ABtest-dashboard is vanilla JS (no bundler)** — the si

engineering-packages-clients-py-galaxy-comments-readme · engineering/packages/clients-py/galaxy-comments · org · 2026-06-01 10:19

# galaxy-comments Python client for the Galaxy Comments REST API. Used by the Televika Foreign Comment Analysis Dashboard Flask app after the Phase-4 data-layer swap. ## Install ```bash pip install -e ./packages/clients-py/galaxy_comment

engineering-docs-operations-vps-bootstrap · engineering/docs/operations · org · 2026-06-01 10:19

# VPS bootstrap — Hetzner ax-line > Provision the production host for productgalaxy. Run-once per host. Total time: > ~45 minutes including waiting for apt + Docker pulls. ## 0. Order the box - Hetzner: AX42 (Ryzen 7700, 64 GB ECC, 2× 51

engineering-docs-operations-sops-secrets-setup · engineering/docs/operations · org · 2026-06-01 10:19

# SOPS + age secrets setup (deploy-time decryption) Status: required for `deploy-staging.yml`, `deploy-prod.yml`, `deploy-prod-rollback.yml`. Owner: ops. Last reviewed: 2026-05-25. ## Why this exists CLAUDE.md §14 and ADR-003 §"Secrets"

engineering-docs-operations-simplify-backlog · engineering/docs/operations · org · 2026-06-01 10:19

# Simplify backlog > Deferred from the first `/simplify` pass (2026-05-25). Each item is a real find from one of > the 3 review agents. We landed the 5 highest-leverage fixes inline + parked the bigger > refactors here because they touch m

engineering-docs-operations-prod-go-live · engineering/docs/operations · org · 2026-06-01 10:19

# Production go-live runbook > End-to-end checklist for bringing productgalaxy live on a Hetzner VPS, fronted > by Cloudflare Tunnel, with pgBackRest archiving to Backblaze B2 and OTel/Grafana > observability. Total wall-clock: ~4 hours of

engineering-docs-operations-pgbackrest-setup · engineering/docs/operations · org · 2026-06-01 10:19

# pgBackRest setup — Backblaze B2 archive + PITR > pgBackRest sidecar runs alongside Postgres on the same host. Full backup nightly, > diff weekly (Sundays), WAL archived continuously. Retention: 30 days of fulls. > Restore-to-point-in-tim

engineering-docs-operations-observability-setup · engineering/docs/operations · org · 2026-06-01 10:19

# Observability — OpenTelemetry + Grafana + Loki + Tempo > Self-hosted observability stack co-located on the same VPS. No external SaaS. > ~600 MB RAM overhead total. Per CLAUDE.md §15 ops contract. ## Stack at a glance | Component | Rol

engineering-docs-operations-host-caddy-snippet · engineering/docs/operations · org · 2026-06-01 10:19

# Host Caddy — three site blocks to append for galaxy The VPS at `31.97.192.253` already runs a host-level Caddy (`/etc/caddy/Caddyfile`) that terminates TLS for `api.jaan.coach` and `n8n.jaan.coach`. In v1 we piggyback on it instead of ru

engineering-docs-operations-deploy-runbook · engineering/docs/operations · org · 2026-06-01 10:19

# Galaxy production deploy runbook A single, plain-English walkthrough for taking productgalaxy live on a Hetzner VPS. Designed for a non-technical operator with the Claude Code assistant. ## Before you start You need: - A Hetzner Cloud

engineering-docs-operations-deploy-runbook-v1 · engineering/docs/operations · org · 2026-06-01 10:19

# v1 deploy runbook — `root@31.97.192.253` → `*.galaxy.jaan.to` This is the **first** production deploy. It is intentionally narrower than [DEPLOY-RUNBOOK.md](DEPLOY-RUNBOOK.md): - **One specific VPS**: `root@31.97.192.253` — Ubuntu 24.04

engineering-docs-operations-cloudflare-tunnel-setup · engineering/docs/operations · org · 2026-06-01 10:19

# Cloudflare Tunnel + Access setup (CI → VPS auth) Status: required for `deploy-staging.yml`, `deploy-prod.yml`, `deploy-prod-rollback.yml`. Owner: ops. Last reviewed: 2026-05-25. ## Why this exists GitHub Actions needs to reach the stag

engineering-docs-operations-cloudflare-dns · engineering/docs/operations · org · 2026-06-01 10:19

# Cloudflare DNS — v1 records for `*.jaan.to` The v1 deploy uses **DNS-only mode** (grey cloud, not proxied). Caddy on the VPS terminates TLS directly via Let's Encrypt HTTP-01. Cloudflare is just the DNS authority. ## Why grey-cloud and

engineering-docs-handoffs-televika-swap · engineering/docs/handoffs · org · 2026-06-01 10:19

# Televika Flask data-layer swap — handoff > **Audience**: maintainers of `/Users/parhumm/Projects/SabaIdea/product/Televika-Foreign-Comment-Analysis-Dashboard/` (Flask + Python). > **Goal**: replace the local-JSON/JSON-gz storage layer wi

engineering-docs-handoffs-product-decisions-swap · engineering/docs/handoffs · org · 2026-06-01 10:19

# Handoff: product-decisions data-layer swap > Audience: the product-decisions team > Goal: swap your data layer from JSON files + localStorage to the Galaxy REST API, **without > changing any UI**. > Status: Phase 2 deliverables ready (PM

engineering-docs-handoffs-product-audits-swap · engineering/docs/handoffs · org · 2026-06-01 10:19

# Handoff: Product-Audits data-layer swap > Audience: the Product-Audits team > Goal: swap your data layer from local JSON files + Vercel serverless functions to the > Galaxy REST API, **without changing any UI**. > Status: Phase 1 deliver

engineering-docs-handoffs-obsidian-power-user · engineering/docs/handoffs · org · 2026-06-01 10:19

# Editing Galaxy notes from Obsidian — power-user guide > Audience: a Galaxy user who already knows Obsidian and wants to edit their > Galaxy notes from inside Obsidian instead of (or alongside) the Galaxy admin > editor. No knowledge of G

engineering-docs-handoffs-abtest-dashboard-swap · engineering/docs/handoffs · org · 2026-06-01 10:19

# Handoff: ABtest-dashboard data-layer swap > Audience: the ABtest-dashboard team > Goal: swap your data layer from Supabase + leaked anon key to the Galaxy REST API, > **without changing any UI or the statistical math**. ## What changes

engineering-docs-architecture-adr-004-schema-lockin-from-data-mapping · engineering/docs/architecture · org · 2026-06-01 10:19

# ADR-004 — Final schema lock-in from Phase 0.5 data-mapping - Date: 2026-05-24 - Status: Accepted - Source: `jaan-to/outputs/data-mapping/{abtest,audits,pm,comments,docs}-mapping.md` ## Context 5 parallel data-mapping agents inspected t

engineering-docs-architecture-adr-003-batch-3-stack-lockin · engineering/docs/architecture · org · 2026-06-01 10:19

# ADR-003 — Batch 3 stack lock-in (deploy / docs / dev-workflow-guardrails) - Date: 2026-05-24 - Status: Accepted - Source: `jaan-to/outputs/pm-research/{deploy,docs,dev-workflow-guardrails}-research.md` ## Context Phase 0 batch 3 resear

engineering-docs-architecture-adr-002-batch-2-stack-lockin · engineering/docs/architecture · org · 2026-06-01 10:19

# ADR-002 — Batch 2 stack lock-in (api / mcp / share) - Date: 2026-05-24 - Status: Accepted - Source: `jaan-to/outputs/pm-research/{api,mcp,share}-research.md` ## Context Phase 0 batch 2 research (3 parallel scout agents, ~71 sources com

engineering-docs-architecture-adr-001-batch-1-stack-lockin · engineering/docs/architecture · org · 2026-06-01 10:19

# ADR-001 — Batch 1 stack lock-in (db / app / orm / auth) - Date: 2026-05-24 - Status: Accepted - Source: `jaan-to/outputs/pm-research/{db,app,orm,auth}-research.md` ## Context Phase 0 batch 1 research (4 parallel scout agents, ~95 sourc

engineering-docs-architecture-12-factor-scorecard · engineering/docs/architecture · org · 2026-06-01 10:19

# 12-Factor scorecard How Galaxy lines up with the [Twelve-Factor App](https://12factor.net) methodology. Each factor links to the file or behaviour that implements it. | # | Factor | Status | Where it lives | |---|---|---|---| | I | **Co

engineering-docs-architecture-00-overview · engineering/docs/architecture · org · 2026-06-01 10:19

# Architecture overview `productgalaxy` is the shared backend (single Postgres 17 DB + versioned REST API + MCP server) behind 4 existing SabaIdea apps and 1 new docs product. The 4 legacy app UIs do not change; each only swaps its data-la

engineering-claude · engineering · org · 2026-06-01 10:19

# productgalaxy — Critical rules for development This file is loaded automatically by Claude Code in this repo. Treat every rule here as a hard constraint. When in doubt, ask before deviating. The full implementation plan lives at `/Users

engineering-apps-mcp-readme · engineering/apps/mcp · org · 2026-06-01 10:19

# @galaxy/mcp — productgalaxy MCP server The productgalaxy **Model Context Protocol** server. Exposes Galaxy's data over Streamable HTTP so Claude Desktop, Claude Code, the Anthropic SDK, and other MCP clients can read across the 5 domains

engineering-apps-docs-src-content-static-welcome · engineering/apps/docs/src/content/static · org · 2026-06-01 10:19

# Welcome This is the reading surface for **galaxy-docs** — productgalaxy's notes system. Notes are authored in the admin UI at `/admin/notes/` (or in Obsidian against the [Local REST API plugin](https://github.com/coddingtonbear/obsidian

engineering-apps-docs-src-content-static-about · engineering/apps/docs/src/content/static · org · 2026-06-01 10:19

# About this site This is an **Astro 6 + Starlight** site that pulls notes from `https://api.galaxy.example.com/api/v1/notes` via Astro 6's live content collections. ## Stack | Layer | Choice | Why | |---|---|---| | Framework | Astro 6

engineering-apps-docs-readme · engineering/apps/docs · org · 2026-06-01 10:19

# @galaxy/docs — the galaxy-docs reading site Astro 6 + Starlight + Tailwind 4 public READING surface for the 5th product (galaxy-docs). Fetches notes from Galaxy's `/api/v1/notes` at request time via Astro 6 live content collections, with