Redesign Phases 3-6: multi-event model, APPE Admin, Convivo App behaviors, APPE branding

- Phase 3: new migration 20260824000000_redesign.sql (contacts/events/registrations/sponsors, slot types, session speakers + feedback/material), seed rewrite
- Phase 4: APPE Admin rebrand + Contacts/Registrations/Sponsors/Schedule/Activity/Events views
- Phase 5: Convivo App (24h login, 5s polling, QR type badge, red dot, speaker material)
- Phase 6: APPE favicon + PWA icons for both apps
- Docs: schema/rpcs/rls/seed/screens/api-client/admin-app/architecture/next-steps/README/roadmap updated
This commit is contained in:
Lago committed 2026-08-23 02:53:16 +02:00
1 parent 5adb5785aa
commit 22f5f1d317
64 files changed
+4593 -1371

No files matched your search

+49 -34
View File
@@ -4,7 +4,7 @@ Every screen in [`apps/convivo/src/screens/`](../../apps/convivo/src/screens/).
All screens are mobile-first and use the shared UI components
([app-structure.md#shared-ui-components](./app-structure.md#shared-ui-components)).
Data comes from the typed [api client](./api-client.md); the current user comes
from `useAuth()`.
from `useAuth()` (`contact` + `registration`).
| Screen | File | Reach |
|---|---|---|
@@ -21,9 +21,10 @@ from `useAuth()`.
A 3-step flow: **splash → scan → confirm**.
1. **Splash** — "Convivo / Break the ice. Earn the points." Tap anywhere to continue.
1. **Splash** — "APPE / Break the ice. Earn the points." Tap anywhere to continue.
2. **Scan** — scan (or type) your lanyard QR. Calls `lanyardLookup(qrToken)` to
resolve the attendee (pre-login, public). Shows the resolved name/company.
resolve the contact (pre-login, public). Shows the resolved name + registration
type badge.
3. **Confirm** — enter the **email used to buy the ticket**, then
`signInWithPassword({ email, password: qrToken })`. On success the
`AuthContext` updates and the Shell renders the app. On mismatch, an error is
@@ -37,41 +38,54 @@ A 3-step flow: **splash → scan → confirm**.
The landing screen. Shows:
- **Greeting + points pill** — "Good morning, Ana 👋" and `⚡ {points}` (tapping
the pill opens the Leaderboard).
the pill opens the Leaderboard). The event name (`event.name`) is shown under
the greeting.
- **Now card** — the session the user picked for the current slot, with a
"✓ Checked in" or "Show your QR to staff to check in" pill.
- **Next card** — the pick for the next slot.
- **My picks today** — the user's pick per slot (tap to change → opens Agenda).
- **Quick actions** — Scan & connect, Agenda, Connections, Leaderboard.
- **Quick actions** — Scan & connect / Check-in, Agenda, Connections, Leaderboard.
- **No active event** — a graceful empty state ("No active event right now.
Check back soon!").
Data: `useEvent()` (agenda + clock) + `getMyPreferences()` + `getMyCheckins()`.
Slot status comes from `slotStatus(slot, now)` ([app-structure.md#the-event-clock](./app-structure.md#the-event-clock)).
Data: `useEvent()` (event + agenda + clock) + `getMyPreferences()` +
`getMyCheckins(email)`. Slot status comes from `slotStatus(slot, now)`
([app-structure.md#the-event-clock](./app-structure.md#the-event-clock)).
## Agenda
Lists all 6 slots, each with its 3 sessions and a status pill (**Done / ● Live /
Up next**). The user's pick per slot is highlighted (filled check).
Lists all slots, each with its sessions, a **slot-type badge** (keynote / session
/ lunch break / coffee break / close up), and a status pill (**Done / ● Live /
Up next**). The user's pick per slot is highlighted (filled check). A session the
user speaks shows a **"🎤 you"** tag; a session with material shows a **📎**.
- **Tap a session** → opens a bottom **sheet** with details (description, speaker,
room, capacity, checked-in state) and actions:
- **Tap a session** → opens a bottom **sheet** with details (description,
speakers, room, capacity, checked-in state) and actions:
- **Give feedback ⭐** — only when the session is *done* **and** the user is
checked in. Opens the Feedback takeover (`openFeedback(sessionId)`).
- **Pick / Remove my pick** — `setPreference(sessionId)` / `clearPreference(slotId)`.
- **Speaker material** — if the user is a speaker of the session and no material
is uploaded yet, a **non-dismissible** "📎 Upload your session material" notice
with a file input. Uploading stores the file in the `materials` bucket and
calls `set_session_material` (via `uploadSessionMaterial`). Once uploaded, the
notice is gone and a **📎 Download material** link appears (visible to **all**
attendees).
- Picking is "one per slot" — picking a new session in a slot replaces the old
pick (enforced by the `set_preference` RPC).
Data: `useEvent()` + `getMyPreferences()` + `getMyCheckins()`.
Data: `useEvent()` + `getMyPreferences()` + `getMyCheckins(email)` +
`getMySpeakerSessions(email)`.
## Scan / Check-in
One screen, two modes (segmented control: **Attendee / Staff**). The default mode
and the tab label are role-aware: staff/admin default to **Staff** mode and the
tab reads **Check-in**.
and the tab label are role-aware: staff (`contact.is_admin`) default to **Staff**
mode and the tab reads **Check-in**.
- **Attendee mode (connect):** scan a peer's lanyard → `lanyardLookup` → a
"Connect with {name}?" sheet → `createConnectionRequest(qr)`. Guards: can't
connect with yourself. Result toast reflects the connection status (sent /
already connected).
"Connect with {name}?" sheet (with the peer's registration-type badge + LinkedIn
link if visible) → `createConnectionRequest(qr)`. Guards: can't connect with
yourself. Result toast reflects the connection status (sent / already connected).
- **Staff mode (check-in):** pick a session (dropdown grouped by slot), then scan
an attendee's lanyard → `checkinAttendee(sessionId, qr)`. Shows a result sheet:
"✓ {name} — Checked in — +10 pts · now {total}" or "⚠️ Already checked in — no
@@ -83,13 +97,16 @@ Data: `useEvent()` (for the session list) + the RPCs above.
Two tabs: **My connections** and **Requests** (with a count badge).
- **My connections** — accepted connections (the other person's name/company).
- **Requests** — incoming (`to_id = me`, pending) with **Accept / Decline**
buttons (`acceptConnection` / `rejectConnection`), and outgoing (`from_id = me`,
pending) shown as "Sent".
- Accepting awards +5 to both (see [../backend/rpcs.md#accept_connectionp_connection_id--connections](../backend/rpcs.md#accept_connectionp_connection_id--connections)).
- **My connections** — accepted connections (the other person's name +
registration type).
- **Requests** — incoming (`to_email = me`, pending) with **Accept / Decline**
buttons (`acceptConnection` / `rejectConnection`), and outgoing (`from_email =
me`, pending) shown as "Sent".
- Accepting awards +5 to both (see
[../backend/rpcs.md#accept_connectionp_connection_id--connections](../backend/rpcs.md#accept_connectionp_connection_id--connections)).
- **Live-ish:** polls every 5s while the tab is visible (`usePolling`).
Data: `getMyConnections()` + `getPublicProfiles()` (to resolve names/companies).
Data: `getMyConnections()` + `getPublicContacts()` (to resolve names + types).
## Feedback
@@ -97,13 +114,10 @@ A **full-screen takeover** (no tab bar), opened from the Agenda session sheet.
- Shows the session (slot · time · room · title).
- **1–5 star** rating + optional comment ("bonus points for details").
- If the user already rated this session, it pre-fills and the button reads
**"Update feedback"** (the RPC updates without re-awarding points).
- On submit: `submitFeedback(sessionId, rating, comment)` → `refreshProfile()` →
a success card ("+N pts earned!" or "Feedback updated!").
- On submit: `submitFeedback(sessionId, rating, comment)` → a success toast
("+N pts ⭐").
Data: `useEvent()` (session/slot) + `getMyFeedback()` (to detect existing) +
`submitFeedback`.
Data: `useEvent()` (session/slot) + `submitFeedback`.
## Leaderboard
@@ -122,17 +136,18 @@ supabase.channel('leaderboard-live')
.subscribe();
```
Data: `getLeaderboard()` (initial + on each realtime event). The `leaderboard`
table is kept in sync transactionally by the RPCs — see
Data: `getLeaderboard()` (the `get_leaderboard()` RPC — initial + on each realtime
event). The `leaderboard` table is kept in sync transactionally by the RPCs — see
[../backend/schema.md#leaderboard--realtime-mirror](../backend/schema.md#leaderboard--realtime-mirror).
## Profile
- **Header** — avatar, name, company, role pill, points pill.
- **My QR code** — renders `profile.qr_token` as a scannable QR (`QrImage`).
- **Header** — avatar, name, email, registration-type pill, a **staff** pill when
`contact.is_admin`, and a points pill.
- **My QR code** — renders `contact.qr_token` as a scannable QR (`QrImage`).
"Show this to staff for check-in and to peers to connect."
- **Points breakdown** — sums `points_log` by category
(Session check-ins / Connections / Feedback / Other) + Total.
- **Log out** — `signOut()`.
Data: `useAuth()` (profile) + `getMyPointsLog()`.
Data: `useAuth()` (contact + registration) + `getMyPointsLog(email)`.