2.1 KiB
2.1 KiB
CoFi Registration App
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.
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) - Key pattern: All event-specific config centralized in
lib/event.config.ts
Flow
- User clicks "Register" button on
www.collaborative-finance.net→ opensregister.collaborative-finance.net/register - User fills form → POST
/api/register→ Google Sheets (Pending) - User picks accommodation/payment → POST
/api/create-checkout-session→ Mollie redirect - 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 singletonapp/globals.css— Blue/teal OKLch color themedocker-compose.yml— Traefik-labeled deploymentembed-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 <a> tag.
Dev Workflow
pnpm install
pnpm dev # localhost:3000 → redirects to /register
Deployment
- Your friend adds a CNAME:
register.collaborative-finance.net→ Cloudflare tunnel - On Netcup:
docker compose up -d --build - Traefik auto-discovers via labels, Cloudflare tunnel handles TLS
DNS Setup (friend's side)
register.collaborative-finance.net CNAME <your-cloudflare-tunnel-id>.cfargotunnel.com
Or if using Cloudflare proxy on their domain, they can add the CNAME to point to your tunnel.