Skip to content

feat: kthais-backend and kthais-frontend, with Postgres and Redis - #24

Merged
Daniel3178 merged 6 commits into
mainfrom
feat/it-28-landingpage-projects
Nov 4, 2026
Merged

Daniel3178 merged 6 commits into
mainfrom
feat/it-28-landingpage-projects

Conversation

@Daniel3178

@Daniel3178 Daniel3178 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Registers kthais.com's two apps (Linear IT-28), following docs/project-yaml.md and app-migration.md.

kthais-backend

  • Postgres and Redis from defaults.databases; the app gets DATABASE_URL and REDIS_HOST/REDIS_PORT/REDIS_PASSWORD (no hand-set DB_* hosts).
  • shared: [JWT_PUBLIC_KEY, ONBOARDING_SERVICE_SECRET]; JWT_PRIVATE_KEY stays a project secret.
  • Staging: staging.kthais.com at path: /api/v1 (no strip_path: the routes start with /api/v1). BACKEND_URL and ALLOWED_ORIGINS are the site's own host, so the OAuth redirect URI is https://staging.kthais.com/api/v1/auth/google/callback.
  • No Mailchimp and no MCP_SERVICE_SECRET: neither is used in production.
  • No AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY: staging must not send real email. Names are per project, so the PR for production's temporary host adds them back, with dummy values on staging.

kthais-frontend

  • secrets: [LUMA_API_KEY], shared: [JWT_PUBLIC_KEY]; BACKEND_URL read at runtime, so one image serves both environments.
  • Staging: staging.kthais.com at /, the same host as the backend.

Isolation: staging and production have their own hosts, databases, secrets and onboarding-service (onboarding-service-staging-fm3uek / -production-km3a0y). The jwt cookie is host-only (__Host-jwt, no COOKIE_DOMAIN), so neither environment ever receives the other's sessions.

Not in this PR: production's domains (kthais.com for the frontend, kthais.com at /api/v1 for the backend; api.kthais.com is dropped), added in their own PR at the switchover (§7.4); onboarding-service's staging BACKEND_URL, once the new staging backend exists.

Merge order:

  1. refactor: rename the landingpage OpenBao projects to kthais-backend and kthais-frontend infrastructure#44 (renames the OpenBao projects; check fails until it is merged and applied)
  2. this PR, after both repos are renamed, the staging secrets are in OpenBao and the staging DNS record exists (feat: staging.kthais.com dnscontrol#17)
  3. the app PRs: feat/it-28-* first, then ci/it-28-delivery-pipeline

Replaces feat/add-backend-and-frontend-projects, which predated the schema check, databases and the shared store.

Refs: IT-28

pspanoudakis

This comment was marked as resolved.

@Daniel3178
Daniel3178 force-pushed the feat/it-28-landingpage-projects branch from 8e46b62 to d5e80b5 Compare November 1, 2026 21:58
@Daniel3178 Daniel3178 changed the title feat: landingpage-backend and landingpage-frontend, with Postgres and Redis feat: kthais-backend and kthais-frontend, with Postgres and Redis Nov 1, 2026
Daniel3178 and others added 6 commits November 2, 2026 20:19
… Redis

The backend gets Postgres and Redis from defaults.databases (DATABASE_URL,
REDIS_*), and reads JWT_PUBLIC_KEY and ONBOARDING_SERVICE_SECRET from the
shared store. The frontend reads the same JWT_PUBLIC_KEY there, and gets
BACKEND_URL at runtime, so one image serves both environments.

Staging (landingpage-frontend-staging.kthais.com,
landingpage-backend-staging.kthais.com) and production (kthais.com,
api.kthais.com) are isolated: their own hosts, databases, secrets,
onboarding-service, and jwt cookie name. Production keeps its hosts, which
move in their own PR at the switchover (app-migration.md §7.4).

Needs kthaisociety/infrastructure's projects.yaml lines first.

Refs: IT-28
Staging gets one host, landingpage-staging.kthais.com, with the backend at /api/v1 and the frontend
everywhere else; production does the same on kthais.com at the switchover. The cookie becomes host-only
(__Host-jwt), so COOKIE_DOMAIN and JWT_COOKIE_NAME go. Mailchimp and MCP_SERVICE_SECRET are left out:
neither is used in production.

Refs: IT-28
The team settled the repo names. The one staging host becomes kthais-staging.kthais.com.

Refs: IT-28
Staging runs every commit on main, so working SES credentials could send real email to real people.
Without them the backend still starts; sending fails and is logged. Secrets are per project, so
production gets them back in the switchover PR.

Refs: IT-28
@Daniel3178
Daniel3178 force-pushed the feat/it-28-landingpage-projects branch from d5e80b5 to 1f6f0a9 Compare November 2, 2026 19:27
@Daniel3178

This comment has been minimized.

@sammosios

This comment has been minimized.

@sammosios
sammosios dismissed pspanoudakis’s stale review November 4, 2026 13:18

The renames were carried out

@Daniel3178
Daniel3178 merged commit 5930a74 into main Nov 4, 2026
5 checks passed
@Daniel3178
Daniel3178 deleted the feat/it-28-landingpage-projects branch November 4, 2026 19:00

This branch was successfully deployed

1 active deployment
plan — 1f6f0a93 Deployed Nov 2, 2026 by Daniel3178 via plan #100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants