From 2b2b7eed67881692a8f7e2ccd97f8ddaf5ccd54c Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sun, 22 Mar 2026 17:24:50 -0700 Subject: [PATCH] Rename domain from register to payment.collaborative-finance.net Co-Authored-By: Claude Opus 4.6 --- .env.example | 2 +- CLAUDE.md | 10 +++++----- app/api/create-checkout-session/route.ts | 2 +- app/layout.tsx | 4 ++-- docker-compose.yml | 4 ++-- embed-snippet.html | 6 +++--- lib/event.config.ts | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.env.example b/.env.example index 92eefa4..553d95c 100644 --- a/.env.example +++ b/.env.example @@ -5,7 +5,7 @@ MOLLIE_API_KEY=test_xxxxxxxxxxxxxxxxxxxxxxxxxxxx # ── Public URL (used for Mollie redirects and webhooks) ── -NEXT_PUBLIC_BASE_URL=https://register.collaborative-finance.net +NEXT_PUBLIC_BASE_URL=https://payment.collaborative-finance.net # ── Google Sheets (registration data) ── # JSON string of the service account key diff --git a/CLAUDE.md b/CLAUDE.md index b04f3fd..f063f3a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,18 +2,18 @@ ## Overview Standalone event registration + payment app for CoFi (Collaborative Finance). -Runs on Netcup at `register.collaborative-finance.net`, linked from the main site at `www.collaborative-finance.net` via a simple button. +Runs on Netcup at `payment.collaborative-finance.net`, linked from the main site at `www.collaborative-finance.net` via a simple button. Adapted from `crypto-commons-gather.ing-website` with centralized config. ## Architecture - **Stack**: Next.js 16 (App Router, standalone) + Mollie + Google Sheets + Mailcow SMTP + Listmonk - **Deploy**: Docker on Netcup with Traefik labels -- **Domain**: `register.collaborative-finance.net` (CNAME → Cloudflare tunnel on Netcup) +- **Domain**: `payment.collaborative-finance.net` (CNAME → Cloudflare tunnel on Netcup) - **Key pattern**: All event-specific config centralized in `lib/event.config.ts` ## Flow -1. User clicks "Register" button on `www.collaborative-finance.net` → opens `register.collaborative-finance.net` +1. User clicks "Register" button on `www.collaborative-finance.net` → opens `payment.collaborative-finance.net` 2. User fills form → POST `/api/register` → Google Sheets (Pending) 3. User picks accommodation/payment → POST `/api/create-checkout-session` → Mollie redirect 4. Mollie webhook POST `/api/webhook` → verify payment → assign booking → update sheet → email → Listmonk @@ -36,12 +36,12 @@ pnpm dev # localhost:3000 → registration form ``` ## Deployment -1. Your friend adds a CNAME: `register.collaborative-finance.net` → Cloudflare tunnel +1. Your friend adds a CNAME: `payment.collaborative-finance.net` → Cloudflare tunnel 2. On Netcup: `docker compose up -d --build` 3. Traefik auto-discovers via labels, Cloudflare tunnel handles TLS ## DNS Setup (friend's side) ``` -register.collaborative-finance.net CNAME .cfargotunnel.com +payment.collaborative-finance.net CNAME .cfargotunnel.com ``` Or if using Cloudflare proxy on their domain, they can add the CNAME to point to your tunnel. diff --git a/app/api/create-checkout-session/route.ts b/app/api/create-checkout-session/route.ts index 840d9f9..ff5c8e4 100644 --- a/app/api/create-checkout-session/route.ts +++ b/app/api/create-checkout-session/route.ts @@ -9,7 +9,7 @@ import { } from "@/lib/event.config" // Public base URL -const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || "https://register.collaborative-finance.net" +const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || "https://payment.collaborative-finance.net" export async function POST(request: NextRequest) { try { diff --git a/app/layout.tsx b/app/layout.tsx index 3922369..1cfaa90 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -7,7 +7,7 @@ const _geist = Geist({ subsets: ["latin"] }) const _geistMono = Geist_Mono({ subsets: ["latin"] }) export const metadata: Metadata = { - metadataBase: new URL("https://register.collaborative-finance.net"), + metadataBase: new URL("https://payment.collaborative-finance.net"), title: "CoFi 2026 — Registration", description: "Register for CoFi 2026 — Collaborative Finance. Reimagining finance for the commons.", @@ -22,7 +22,7 @@ export const metadata: Metadata = { title: "CoFi 2026 — Registration", description: "Register for CoFi 2026 — Collaborative Finance. Reimagining finance for the commons.", - url: "https://register.collaborative-finance.net", + url: "https://payment.collaborative-finance.net", siteName: "CoFi", locale: "en_US", type: "website", diff --git a/docker-compose.yml b/docker-compose.yml index e77e377..535b3a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: - INFISICAL_PROJECT_SLUG=cofi-register # Non-secret config (defaults inline) - NODE_ENV=production - - NEXT_PUBLIC_BASE_URL=${NEXT_PUBLIC_BASE_URL:-https://register.collaborative-finance.net} + - NEXT_PUBLIC_BASE_URL=${NEXT_PUBLIC_BASE_URL:-https://payment.collaborative-finance.net} - GOOGLE_SHEET_NAME=${GOOGLE_SHEET_NAME:-Registrations} - BOOKING_SHEET_NAME=${BOOKING_SHEET_NAME:-Sheet1} - SMTP_HOST=${SMTP_HOST:-mail.rmail.online} @@ -22,7 +22,7 @@ services: - LISTMONK_LIST_ID=${LISTMONK_LIST_ID:-27} labels: - "traefik.enable=true" - - "traefik.http.routers.cofi-register.rule=Host(`register.collaborative-finance.net`) || Host(`cofi-register-staging.jeffemmett.com`)" + - "traefik.http.routers.cofi-register.rule=Host(`payment.collaborative-finance.net`) || Host(`cofi-register-staging.jeffemmett.com`)" - "traefik.http.routers.cofi-register.entrypoints=web,websecure" - "traefik.http.services.cofi-register.loadbalancer.server.port=3000" healthcheck: diff --git a/embed-snippet.html b/embed-snippet.html index feb846d..dee8467 100644 --- a/embed-snippet.html +++ b/embed-snippet.html @@ -2,14 +2,14 @@ CoFi Registration Button — Embed Snippet Copy-paste this anywhere on collaborative-finance.net to add a registration button. - The button links to the standalone registration app at register.collaborative-finance.net. + The button links to the standalone registration app at payment.collaborative-finance.net. Customize: Change the button text, colors, or styling below to match your site. --> + Register for CoFi 2026 --> diff --git a/lib/event.config.ts b/lib/event.config.ts index 25fab94..5d909d5 100644 --- a/lib/event.config.ts +++ b/lib/event.config.ts @@ -215,7 +215,7 @@ export const EMAIL_BRANDING = { export const LINKS = { website: "https://www.collaborative-finance.net", - register: "https://register.collaborative-finance.net", + register: "https://payment.collaborative-finance.net", telegram: "", // TBD — set when community channel is created community: "", // TBD — set when community channel is created contactEmail: "cofi.gathering@gmail.com",