Deployment: Prediction Assistant

arch-deployment-prediction-assistant Architecture

architecture active

Deployment: Kalshi Assistant

Diagram




          
  

Components

Component Purpose Notes
Rails 8 + Solid Queue Application server and background jobs Namespace: kalshi-assistant, port 3000
PostgreSQL 17 CNPG Shared database cluster 4 databases: primary, cache, queue, cable
Keycloak SSO identity provider Separate realm for kalshi-assistant
Caddy TLS termination for custom domain Auto Let's Encrypt, reverse proxies via Tailscale
Tailscale Funnel Public HTTPS ingress to k3s kalshi-assistant.tail5b443a.ts.net
GoDaddy DNS A record for prediction-assistant.com Managed via godaddy-tofu Terraform provider
Woodpecker CI Build and test pipeline RuboCop lint, RSpec tests, Kaniko image build
Harbor Container registry Project: kalshi-assistant, SHA-tagged images
ArgoCD GitOps deployment Image Updater detects new SHA tags
nginx dev proxy Dev tunnel to local machine Namespace: kalshi-dev
Kalshi API v2 External trading API RSA-PSS SHA-256 auth, rate-limited

Key Decisions

  • Three-repo model (pal-e-platform, pal-e-services, pal-e-deployments) — same proven pattern as landscaping-assistant
  • Port 3000 — Rails default, consistent with landscaping-assistant
  • Tailscale Funnel for prod ingress, Hetzner edge + Caddy for custom domain
  • Solid Queue replaces Sidekiq — no Redis pod needed
  • 4 PostgreSQL databases — Rails 8 Solid stack pattern on shared CNPG cluster
  • SOPS-encrypted secrets in pal-e-deployments for Kalshi credentials and Keycloak client secret

URLs

Environment URL
Production (custom domain) https://prediction-assistant.com
Production (Tailscale) https://kalshi-assistant.tail5b443a.ts.net
Dev (Tailscale) https://kalshi-dev.tail5b443a.ts.net
Local http://localhost:3000
  • arch-domain-kalshi-assistant — entities hosted in this deployment
  • arch-dataflow-kalshi-assistant — runtime flows between these components
  • project-kalshi-assistant — parent project page
  • service-onboarding-sop — SOP for provisioning new services