# CoFi Registration App ## Overview Standalone event registration + payment app for CoFi (Collaborative Finance). 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**: `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 `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 ## Key Files - `lib/event.config.ts` — **Edit this to configure event** (pricing, dates, venues, branding, links) - `lib/mollie.ts` — Shared Mollie client singleton - `app/globals.css` — Blue/teal OKLch color theme - `docker-compose.yml` — Traefik-labeled deployment - `embed-snippet.html` — Copy-paste button HTML for the main website ## Embedding on the main site Send `embed-snippet.html` to the website owner. It contains a self-contained styled button that links to the registration page. No iframe, no JS, no CORS — just a simple `` tag. ## Dev Workflow ```bash pnpm install pnpm dev # localhost:3000 → registration form ``` ## Deployment 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) ``` 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.