Post-event reporting + talk networking incentives

- Talk networking: per-event talk_networking_bonus awarded when two people
  who shared a checked-in talk accept a connection (accept_connection
  re-created, shared_talk flag, get_talk_cohort RPC, points_log category
  check widened); Convivo Networking sub-tab inside the Connect screen
  (Home quick action deep-links in; Connect button reflects existing
  connection state and is disabled for sent/connected/declined); admin
  Events view bonus input (0-10).
- Reports: sidecar POST /export (CSV / multi-sheet XLSX / PDF report via
  new pdfkit dep); APPE Admin Reports view (any event: on-screen summary,
  session feedback summary, top-5, CSV/Excel/PDF downloads); Activity
  session-feedback per-session aggregate header.
- Also carried: @appe.at admin trigger + default password, bulk contact
  delete, session level/area + event-level feedback, agenda level/area
  filters, admin password self-service, schedule level/area fields.
- 18/18 RPC tests; both apps build; exports verified end-to-end.

Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
committed 2026-09-21 22:34:25 +02:00
1 parent f74db9dc26
commit 0b6d1f2b6f
35 files changed
+3973 -54

No files matched your search

+23 -2
View File
@@ -8,8 +8,9 @@ APPE Admin **Interfaces** menu — it runs **on demand only** (no scheduling).
- Code: [`apps/sidecar/`](../../apps/sidecar/) (single file:
[`src/server.js`](../../apps/sidecar/src/server.js))
- Image: [`apps/sidecar/Dockerfile`](../../apps/sidecar/Dockerfile)
(`node:20-alpine`; one runtime dependency, **`xlsx`**, to parse the Sessionize
Excel export — everything else is built-in `http` + `fetch`)
(`node:20-alpine`; runtime dependencies **`xlsx`** (parse the Sessionize Excel
export) and **`pdfkit`** (render the PDF report) — everything else is built-in
`http` + `fetch`)
- Compose service: `convivo-sidecar` in the root
[`docker-compose.yml`](../../docker-compose.yml) (`:3002`)
- DB side: the `sync_sessionize_event` RPC + `sync_runs` audit table — see
@@ -82,6 +83,7 @@ flowchart LR
| `GET` | `/status` | — | `{ ok, running, lastRun }` |
| `POST` | `/run` | `{ event_id }` | **blocking** — the API-sync result (summary + errors) |
| `POST` | `/import-excel` | `multipart/form-data` (`event_id` + `file` = the `.xlsx`) | **blocking** — the Excel-import result (summary + errors) |
| `POST` | `/export` | `{ event_id, format: 'csv' \| 'xlsx' \| 'pdf', tables? }` | **blocking** — `{ filename, mime, content_base64 }` (the event report) |
`/run` is **blocking**: it reads the event's endpoint, fetches Sessionize,
transforms, calls the RPC, and returns the summary. The admin's "Sync" button and
@@ -92,6 +94,21 @@ the Interfaces "Run sync" both call it and show the result inline.
calls that RPC. The admin's Interfaces **"Import Excel"** control posts the file
here and shows the result inline.
`/export` is **blocking** as well: it fetches the event's full dataset
(registrations, check-ins, connections, session feedback, event feedback,
leaderboard, points log — service role, joined for readability) and renders it as
one of three formats:
- **`csv`** — a single combined CSV (a `table` column distinguishes the rows).
- **`xlsx`** — one workbook, one sheet per table (the `tables` array selects
which sheets to include; defaults to all).
- **`pdf`** — a structured post-event report (header, summary, per-session
feedback, top-10 points, event-level feedback comments) rendered with `pdfkit`.
It returns `{ filename, mime, content_base64 }`; the admin's **Reports** view
decodes the base64 and triggers a browser download. Empty tables produce a valid
file with headers only (never an error); an unknown event is a 404.
## Env vars
| Var | Default | Notes |
@@ -134,3 +151,7 @@ The admin app reaches the sidecar through the same-origin `/sidecar/` proxy
creates the speaker contacts, links them to sessions, and creates/updates their
`speaker` registrations (idempotent on re-run). Verified: 21 speakers created,
25 speaker links, 21 speaker registrations, 0 errors.
- `POST /export` for each format against the seeded event → returns a parseable
file: CSV with a `table` column, XLSX with one sheet per table, and a valid
PDF report (verified: CSV ~10 KB, XLSX 7 sheets, PDF `%PDF-1.3`). Unknown
event → 404.