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 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:
1 parent
2f53d47578
commit
7605c9bbf4
64 files changed
+4593
-1371
No files matched your search
+188
-109
@@ -1,50 +1,20 @@
|
||||
-- =============================================================================
|
||||
-- Convivo — Phase 0: seed data
|
||||
-- Ports the mockup's slots/sessions/people into real Supabase Auth users + rows.
|
||||
-- Convivo — Phase 3 (Redesign): seed data for the multi-event model
|
||||
--
|
||||
-- Ports the mockup's people/schedule into the new model:
|
||||
-- contacts (PK = email) / events / registrations / sponsors / slots /
|
||||
-- sessions / session_speakers / preferences / connections / checkins /
|
||||
-- feedback / leaderboard / points_log.
|
||||
--
|
||||
-- The QR token is the Auth password (QR + email login, no email sent).
|
||||
-- Staff is merged into admin: Bruno, Rita, and the APPE Admin have is_admin.
|
||||
-- =============================================================================
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- SLOTS (23 Oct)
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.slots (id, name, slot_date, start_time, end_time) values
|
||||
(1, 'Slot 1', '2026-10-23', '09:00:00', '09:45:00'),
|
||||
(2, 'Slot 2', '2026-10-23', '10:00:00', '10:45:00'),
|
||||
(3, 'Slot 3', '2026-10-23', '11:30:00', '12:15:00'),
|
||||
(4, 'Slot 4', '2026-10-23', '13:15:00', '14:00:00'),
|
||||
(5, 'Slot 5', '2026-10-23', '14:00:00', '14:45:00'),
|
||||
(6, 'Slot 6', '2026-10-23', '15:00:00', '15:45:00')
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- SESSIONS (18 — 3 per slot)
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.sessions (id, title, description, slot_id, room, capacity, speakers) values
|
||||
('10000000-0000-0000-0000-000000000001', 'Opening Keynote: The Next Decade of AI', 'A wide-angle look at where AI is heading over the next ten years — and what it means for product teams.', 1, 'Main Stage', 300, 'Dr. Elena Vasquez'),
|
||||
('10000000-0000-0000-0000-000000000002', 'Designing for Trust in AI Products', 'Practical patterns for making AI features transparent, explainable, and safe for your users.', 1, 'Room A', 80, 'Marco Chen'),
|
||||
('10000000-0000-0000-0000-000000000003', 'From Hackathon to Product', 'How a weekend prototype became a product with 40k users — the messy middle included.', 1, 'Room B', 60, 'Sofia Almeida'),
|
||||
('10000000-0000-0000-0000-000000000004', 'AI in Practice: Lessons from Production', 'Lessons learned shipping LLM features to production: latency, cost, evals, and the surprises.', 2, 'Main Stage', 300, 'Bruno Costa'),
|
||||
('10000000-0000-0000-0000-000000000005', 'The Introvert''s Guide to Networking', 'Small, low-energy ways to have big conversations at any event. (Yes, this one is for you.)', 2, 'Room A', 80, 'Rita Lopes'),
|
||||
('10000000-0000-0000-0000-000000000006', 'Building with Dataverse: Beyond the Basics', 'Go beyond the basics: relationships, security roles, and automations that actually scale.', 2, 'Room B', 60, 'Tomás Ribeiro'),
|
||||
('10000000-0000-0000-0000-000000000007', 'Scaling Teams at 10x', 'What breaks when you grow 10x in two years, and the rituals that kept us sane.', 3, 'Main Stage', 300, 'Julia Santos'),
|
||||
('10000000-0000-0000-0000-000000000008', 'Security by Design', 'Baking security into the product from day one instead of bolting it on at the end.', 3, 'Room A', 80, 'Pedro Nunes'),
|
||||
('10000000-0000-0000-0000-000000000009', 'Data Storytelling', 'Turn dashboards into narratives your stakeholders actually remember.', 3, 'Room B', 60, 'Carla Mendes'),
|
||||
('10000000-0000-0000-0000-000000000010', 'The Future of Work', 'Hybrid, async, and AI-augmented: where work is going and how to prepare for it.', 4, 'Main Stage', 300, 'Dr. Elena Vasquez'),
|
||||
('10000000-0000-0000-0000-000000000011', 'Prototyping with AI', 'From idea to clickable prototype in an afternoon — tools and workflows that work.', 4, 'Room A', 80, 'Diego Ferreira'),
|
||||
('10000000-0000-0000-0000-000000000012', 'Pricing SaaS in 2026', 'Usage-based, seat-based, or hybrid? What is actually working right now.', 4, 'Room B', 60, 'Marina Costa'),
|
||||
('10000000-0000-0000-0000-000000000013', 'Community-Led Growth', 'Building a community that sells for you — case studies and playbooks.', 5, 'Main Stage', 300, 'Lucas Oliveira'),
|
||||
('10000000-0000-0000-0000-000000000014', 'Accessibility First', 'Why accessible products are better products, and how to start this sprint.', 5, 'Room A', 80, 'Carla Mendes'),
|
||||
('10000000-0000-0000-0000-000000000015', 'The Art of the Demo', 'Structure, pacing, and the moments that make a demo land.', 5, 'Room B', 60, 'Pedro Nunes'),
|
||||
('10000000-0000-0000-0000-000000000016', 'Closing Panel: What''s Next', 'Founders, researchers, and builders on what comes next — with audience Q&A.', 6, 'Main Stage', 300, 'Elena · Bruno · Rita'),
|
||||
('10000000-0000-0000-0000-000000000017', 'Open Space: Your Ideas', 'You bring the topic, we bring the room. 45 minutes of your ideas.', 6, 'Room A', 80, 'Facilitated by Ana Silva'),
|
||||
('10000000-0000-0000-0000-000000000018', 'Lightning Talks', 'Eight speakers, five minutes each. Fast, fun, and unpredictable.', 6, 'Room B', 60, '8 speakers')
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- AUTH USERS (QR token = password). 12 attendees + 1 admin.
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- NOTE: confirmation_token is set to '' (not NULL) because GoTrue's password
|
||||
-- grant cannot scan a NULL confirmation_token on manually-inserted users.
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into auth.users (instance_id, id, aud, role, email, encrypted_password, email_confirmed_at, confirmation_token, recovery_token, email_change_token_new, email_change, raw_app_meta_data, raw_user_meta_data, created_at, updated_at, confirmation_sent_at, last_sign_in_at) values
|
||||
('00000000-0000-0000-0000-000000000000', '11111111-1111-1111-1111-111111111111', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-ANA-4821', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Ana Silva"}', now(), now(), now(), now()),
|
||||
('00000000-0000-0000-0000-000000000000', '22222222-2222-2222-2222-222222222222', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-BRU-1177', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Bruno Costa"}', now(), now(), now(), now()),
|
||||
@@ -58,7 +28,7 @@ insert into auth.users (instance_id, id, aud, role, email, encrypted_password, e
|
||||
('00000000-0000-0000-0000-000000000000', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-DIE-4458', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Diego Ferreira"}', now(), now(), now(), now()),
|
||||
('00000000-0000-0000-0000-000000000000', 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-MNA-2210', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Marina Costa"}', now(), now(), now(), now()),
|
||||
('00000000-0000-0000-0000-000000000000', 'cccccccc-cccc-cccc-cccc-cccccccccccc', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-LUC-9987', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Lucas Oliveira"}', now(), now(), now(), now()),
|
||||
('00000000-0000-0000-0000-000000000000', 'dddddddd-dddd-dddd-dddd-dddddddddddd', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-ADM-0001', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Convivo Admin"}', now(), now(), now(), now())
|
||||
('00000000-0000-0000-0000-000000000000', 'dddddddd-dddd-dddd-dddd-dddddddddddd', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-ADM-0001', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"APPE Admin"}', now(), now(), now(), now())
|
||||
on conflict (id) do nothing;
|
||||
|
||||
insert into auth.identities (id, provider_id, identity_data, provider, user_id, created_at, updated_at, last_sign_in_at) values
|
||||
@@ -78,83 +48,192 @@ insert into auth.identities (id, provider_id, identity_data, provider, user_id,
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- PROFILES
|
||||
-- CONTACTS (PK = email). Mirrors auth.users.
|
||||
-- Staff is merged into admin: Bruno, Rita, and the APPE Admin have is_admin.
|
||||
-- Dr. Elena Vasquez is an external keynote speaker (no QR token / auth user).
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.profiles (id, email, full_name, company, role, qr_token, points) values
|
||||
('11111111-1111-1111-1111-111111111111', '[email protected]', 'Ana Silva', 'Nubank', 'attendee', 'CVV-ANA-4821', 40),
|
||||
('22222222-2222-2222-2222-222222222222', '[email protected]', 'Bruno Costa', 'Acme Corp', 'staff', 'CVV-BRU-1177', 140),
|
||||
('33333333-3333-3333-3333-333333333333', '[email protected]', 'Rita Lopes', 'Globant', 'staff', 'CVV-RIT-9034', 95),
|
||||
('44444444-4444-4444-4444-444444444444', '[email protected]', 'Tomás Ribeiro', 'Dataprev', 'attendee', 'CVV-TOM-5566', 88),
|
||||
('55555555-5555-5555-5555-555555555555', '[email protected]', 'Sofia Almeida', 'Loop', 'attendee', 'CVV-SOF-2299', 76),
|
||||
('66666666-6666-6666-6666-666666666666', '[email protected]', 'Marco Chen', 'DeepMind', 'attendee', 'CVV-MRC-7712', 70),
|
||||
('77777777-7777-7777-7777-777777777777', '[email protected]', 'Julia Santos', 'iFood', 'attendee', 'CVV-JUL-3345', 64),
|
||||
('88888888-8888-8888-8888-888888888888', '[email protected]', 'Pedro Nunes', 'Microsoft', 'attendee', 'CVV-PED-8801', 58),
|
||||
('99999999-9999-9999-9999-999999999999', '[email protected]', 'Carla Mendes', 'QuintoEssencial', 'attendee', 'CVV-CAR-6623', 52),
|
||||
('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '[email protected]', 'Diego Ferreira', 'Stone', 'attendee', 'CVV-DIE-4458', 35),
|
||||
('bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', '[email protected]', 'Marina Costa', 'OLX', 'attendee', 'CVV-MNA-2210', 28),
|
||||
('cccccccc-cccc-cccc-cccc-cccccccccccc', '[email protected]', 'Lucas Oliveira', 'USP', 'attendee', 'CVV-LUC-9987', 15),
|
||||
('dddddddd-dddd-dddd-dddd-dddddddddddd', '[email protected]', 'Convivo Admin', 'Convivo', 'admin', 'CVV-ADM-0001', 0)
|
||||
insert into public.contacts (email, full_name, linkedin_url, show_email, show_linkedin, is_admin, qr_token) values
|
||||
('[email protected]', 'Ana Silva', 'https://linkedin.com/in/anasilva', true, true, false, 'CVV-ANA-4821'),
|
||||
('[email protected]', 'Bruno Costa', 'https://linkedin.com/in/brunocosta', false, true, true, 'CVV-BRU-1177'),
|
||||
('[email protected]', 'Rita Lopes', null, false, false, true, 'CVV-RIT-9034'),
|
||||
('[email protected]','Tomás Ribeiro', null, false, false, false, 'CVV-TOM-5566'),
|
||||
('[email protected]', 'Sofia Almeida', null, false, false, false, 'CVV-SOF-2299'),
|
||||
('[email protected]', 'Marco Chen', null, false, false, false, 'CVV-MRC-7712'),
|
||||
('[email protected]', 'Julia Santos', null, false, false, false, 'CVV-JUL-3345'),
|
||||
('[email protected]', 'Pedro Nunes', null, false, false, false, 'CVV-PED-8801'),
|
||||
('[email protected]', 'Carla Mendes', null, false, false, false, 'CVV-CAR-6623'),
|
||||
('[email protected]', 'Diego Ferreira', null, false, false, false, 'CVV-DIE-4458'),
|
||||
('[email protected]', 'Marina Costa', null, false, false, false, 'CVV-MNA-2210'),
|
||||
('[email protected]', 'Lucas Oliveira', null, false, false, false, 'CVV-LUC-9987'),
|
||||
('[email protected]', 'APPE Admin', null, false, false, true, 'CVV-ADM-0001'),
|
||||
('[email protected]', 'Dr. Elena Vasquez', null, false, false, false, null)
|
||||
on conflict (email) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- EVENT (single active event)
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.events (id, name, start_date, end_date, location, is_active) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'APPE 2026', '2026-10-23', '2026-10-23', 'São Paulo, Brazil', true)
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- LEADERBOARD (mirror of points)
|
||||
-- REGISTRATIONS (per event). Points scoped here.
|
||||
-- Ana is checked in (has check-ins below).
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.leaderboard (profile_id, full_name, company, points)
|
||||
select id, full_name, company, points from public.profiles
|
||||
on conflict (profile_id) do update
|
||||
set full_name = excluded.full_name, company = excluded.company, points = excluded.points, updated_at = now();
|
||||
insert into public.registrations (event_id, contact_email, type, checked_in, points) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', true, 40),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'staff', false, 140),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'staff', false, 95),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]','attendee', false, 88),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 76),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 70),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 64),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 58),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 52),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 35),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 28),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'attendee', false, 15),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 'staff', false, 0)
|
||||
on conflict (event_id, contact_email) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- SPONSORS (2 paid, 1 unpaid — unpaid is hidden from non-admins via RLS)
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.sponsors (event_id, type, name, email, phone, paid, amount_eur, contact_email) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'headline', 'Nubank', '[email protected]', '+55 11 4000-0000', true, 50000, '[email protected]'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'gold', 'Acme Corp', '[email protected]', '+55 11 4000-0001', true, 20000, '[email protected]'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'community','Globant', '[email protected]', '+55 11 4000-0002', false, 0, '[email protected]')
|
||||
on conflict do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- SLOTS (23 Oct). Slot 1 done, Slot 2 live (simulated clock).
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.slots (id, event_id, type, name, slot_date, start_time, end_time) values
|
||||
(1, 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'keynote', 'Slot 1', '2026-10-23', '09:00:00', '09:45:00'),
|
||||
(2, 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'session', 'Slot 2', '2026-10-23', '10:00:00', '10:45:00'),
|
||||
(3, 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'session', 'Slot 3', '2026-10-23', '11:30:00', '12:15:00'),
|
||||
(4, 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'lunch_break', 'Slot 4', '2026-10-23', '13:15:00', '14:00:00'),
|
||||
(5, 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'session', 'Slot 5', '2026-10-23', '14:00:00', '14:45:00'),
|
||||
(6, 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 'close_up', 'Slot 6', '2026-10-23', '15:00:00', '15:45:00')
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- SESSIONS (18 — 3 per slot)
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.sessions (id, event_id, slot_id, title, description, room, capacity) values
|
||||
('10000000-0000-0000-0000-000000000001', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 1, 'Opening Keynote: The Next Decade of AI', 'A wide-angle look at where AI is heading over the next ten years — and what it means for product teams.', 'Main Stage', 300),
|
||||
('10000000-0000-0000-0000-000000000002', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 1, 'Designing for Trust in AI Products', 'Practical patterns for making AI features transparent, explainable, and safe for your users.', 'Room A', 80),
|
||||
('10000000-0000-0000-0000-000000000003', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 1, 'From Hackathon to Product', 'How a weekend prototype became a product with 40k users — the messy middle included.', 'Room B', 60),
|
||||
('10000000-0000-0000-0000-000000000004', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 2, 'AI in Practice: Lessons from Production', 'Lessons learned shipping LLM features to production: latency, cost, evals, and the surprises.', 'Main Stage', 300),
|
||||
('10000000-0000-0000-0000-000000000005', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 2, 'The Introvert''s Guide to Networking', 'Small, low-energy ways to have big conversations at any event. (Yes, this one is for you.)', 'Room A', 80),
|
||||
('10000000-0000-0000-0000-000000000006', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 2, 'Building with Dataverse: Beyond the Basics', 'Go beyond the basics: relationships, security roles, and automations that actually scale.', 'Room B', 60),
|
||||
('10000000-0000-0000-0000-000000000007', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 3, 'Scaling Teams at 10x', 'What breaks when you grow 10x in two years, and the rituals that kept us sane.', 'Main Stage', 300),
|
||||
('10000000-0000-0000-0000-000000000008', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 3, 'Security by Design', 'Baking security into the product from day one instead of bolting it on at the end.', 'Room A', 80),
|
||||
('10000000-0000-0000-0000-000000000009', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 3, 'Data Storytelling', 'Turn dashboards into narratives your stakeholders actually remember.', 'Room B', 60),
|
||||
('10000000-0000-0000-0000-000000000010', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 4, 'The Future of Work', 'Hybrid, async, and AI-augmented: where work is going and how to prepare for it.', 'Main Stage', 300),
|
||||
('10000000-0000-0000-0000-000000000011', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 4, 'Prototyping with AI', 'From idea to clickable prototype in an afternoon — tools and workflows that work.', 'Room A', 80),
|
||||
('10000000-0000-0000-0000-000000000012', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 4, 'Pricing SaaS in 2026', 'Usage-based, seat-based, or hybrid? What is actually working right now.', 'Room B', 60),
|
||||
('10000000-0000-0000-0000-000000000013', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 5, 'Community-Led Growth', 'Building a community that sells for you — case studies and playbooks.', 'Main Stage', 300),
|
||||
('10000000-0000-0000-0000-000000000014', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 5, 'Accessibility First', 'Why accessible products are better products, and how to start this sprint.', 'Room A', 80),
|
||||
('10000000-0000-0000-0000-000000000015', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 5, 'The Art of the Demo', 'Structure, pacing, and the moments that make a demo land.', 'Room B', 60),
|
||||
('10000000-0000-0000-0000-000000000016', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 6, 'Closing Panel: What''s Next', 'Founders, researchers, and builders on what comes next — with audience Q&A.', 'Main Stage', 300),
|
||||
('10000000-0000-0000-0000-000000000017', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 6, 'Open Space: Your Ideas', 'You bring the topic, we bring the room. 45 minutes of your ideas.', 'Room A', 80),
|
||||
('10000000-0000-0000-0000-000000000018', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', 6, 'Lightning Talks', 'Eight speakers, five minutes each. Fast, fun, and unpredictable.', 'Room B', 60)
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- SESSION SPEAKERS (M:N). Every session has >= 1 speaker.
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.session_speakers (session_id, contact_email) values
|
||||
('10000000-0000-0000-0000-000000000001', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000002', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000003', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000004', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000005', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000006', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000007', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000008', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000009', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000010', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000011', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000012', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000013', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000014', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000015', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000016', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000016', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000016', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000017', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000018', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000018', '[email protected]'),
|
||||
('10000000-0000-0000-0000-000000000018', '[email protected]')
|
||||
on conflict (session_id, contact_email) do nothing;
|
||||
|
||||
-- s2 has a comment from Ana → AI feedback is pending evaluation.
|
||||
update public.sessions set ai_generated_feedback = 'Pending AI Evaluation'
|
||||
where id = '10000000-0000-0000-0000-000000000002';
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- ANA'S DEMO STATE (so the app looks alive on first login)
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- Preferences: one pick per slot (matches the mockup).
|
||||
insert into public.preferences (event_id, contact_email, session_id, slot_id) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000002', 1),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000004', 2),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000009', 3),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000011', 4),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000013', 5),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000016', 6)
|
||||
on conflict (event_id, contact_email, slot_id) do nothing;
|
||||
|
||||
-- Check-ins: Ana is checked into Slot 1 (s2) and Slot 2 (s4), by staff Bruno.
|
||||
insert into public.checkins (event_id, contact_email, session_id, staff_email) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000002', '[email protected]'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000004', '[email protected]')
|
||||
on conflict (event_id, contact_email, session_id) do nothing;
|
||||
|
||||
-- Connections: accepted with Bruno & Rita; incoming from Sofia; outgoing to Julia.
|
||||
insert into public.connections (id, event_id, from_email, to_email, status, created_at, resolved_at) values
|
||||
('e0000000-0000-0000-0000-000000000001', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '[email protected]', 'accepted', now() - interval '2 hours', now() - interval '2 hours'),
|
||||
('e0000000-0000-0000-0000-000000000002', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '[email protected]', 'accepted', now() - interval '90 minutes', now() - interval '90 minutes'),
|
||||
('e0000000-0000-0000-0000-000000000003', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '[email protected]', 'pending', now() - interval '15 minutes', null),
|
||||
('e0000000-0000-0000-0000-000000000004', 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '[email protected]', 'pending', now() - interval '5 minutes', null)
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- Feedback: Ana rated Slot 1 (s2).
|
||||
insert into public.feedback (event_id, contact_email, session_id, rating, comment) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', '10000000-0000-0000-0000-000000000002', 5, 'Great patterns, very practical. Wish it were longer!')
|
||||
on conflict (event_id, contact_email, session_id) do nothing;
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- LEADERBOARD (mirror of registration points, per event)
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.leaderboard (event_id, contact_email, full_name, points)
|
||||
select r.event_id, r.contact_email, c.full_name, r.points
|
||||
from public.registrations r
|
||||
join public.contacts c on c.email = r.contact_email
|
||||
on conflict (event_id, contact_email) do update
|
||||
set full_name = excluded.full_name, points = excluded.points, updated_at = now();
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- POINTS LOG
|
||||
-- Ana: a coherent breakdown (2 checkins, 2 connections, 1 feedback = 40).
|
||||
-- Everyone else: a single 'admin' seed entry for their starting points.
|
||||
-- -----------------------------------------------------------------------------
|
||||
insert into public.points_log (profile_id, delta, category) values
|
||||
('11111111-1111-1111-1111-111111111111', 10, 'checkin'),
|
||||
('11111111-1111-1111-1111-111111111111', 10, 'checkin'),
|
||||
('11111111-1111-1111-1111-111111111111', 5, 'connection'),
|
||||
('11111111-1111-1111-1111-111111111111', 5, 'connection'),
|
||||
('11111111-1111-1111-1111-111111111111', 10, 'feedback'),
|
||||
('22222222-2222-2222-2222-222222222222', 140, 'admin'),
|
||||
('33333333-3333-3333-3333-333333333333', 95, 'admin'),
|
||||
('44444444-4444-4444-4444-444444444444', 88, 'admin'),
|
||||
('55555555-5555-5555-5555-555555555555', 76, 'admin'),
|
||||
('66666666-6666-6666-6666-666666666666', 70, 'admin'),
|
||||
('77777777-7777-7777-7777-777777777777', 64, 'admin'),
|
||||
('88888888-8888-8888-8888-888888888888', 58, 'admin'),
|
||||
('99999999-9999-9999-9999-999999999999', 52, 'admin'),
|
||||
('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 35, 'admin'),
|
||||
('bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 28, 'admin'),
|
||||
('cccccccc-cccc-cccc-cccc-cccccccccccc', 15, 'admin');
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- ANA'S DEMO STATE (so the app looks alive on first login)
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- Preferences: one pick per slot (matches the mockup).
|
||||
insert into public.preferences (profile_id, session_id, slot_id) values
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000002', 1),
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000004', 2),
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000009', 3),
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000011', 4),
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000013', 5),
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000016', 6)
|
||||
on conflict (profile_id, slot_id) do nothing;
|
||||
|
||||
-- Check-ins: Ana is checked into Slot 1 (s2) and Slot 2 (s4), by staff Bruno.
|
||||
insert into public.checkins (profile_id, session_id, staff_id) values
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000002', '22222222-2222-2222-2222-222222222222'),
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000004', '22222222-2222-2222-2222-222222222222')
|
||||
on conflict (profile_id, session_id) do nothing;
|
||||
|
||||
-- Connections: accepted with Bruno & Rita; incoming from Sofia; outgoing to Julia.
|
||||
insert into public.connections (id, from_id, to_id, status, created_at, resolved_at) values
|
||||
('e0000000-0000-0000-0000-000000000001', '11111111-1111-1111-1111-111111111111', '22222222-2222-2222-2222-222222222222', 'accepted', now() - interval '2 hours', now() - interval '2 hours'),
|
||||
('e0000000-0000-0000-0000-000000000002', '33333333-3333-3333-3333-333333333333', '11111111-1111-1111-1111-111111111111', 'accepted', now() - interval '90 minutes', now() - interval '90 minutes'),
|
||||
('e0000000-0000-0000-0000-000000000003', '55555555-5555-5555-5555-555555555555', '11111111-1111-1111-1111-111111111111', 'pending', now() - interval '15 minutes', null),
|
||||
('e0000000-0000-0000-0000-000000000004', '11111111-1111-1111-1111-111111111111', '77777777-7777-7777-7777-777777777777', 'pending', now() - interval '5 minutes', null)
|
||||
on conflict (id) do nothing;
|
||||
|
||||
-- Feedback: Ana rated Slot 1 (s2).
|
||||
insert into public.feedback (profile_id, session_id, rating, comment) values
|
||||
('11111111-1111-1111-1111-111111111111', '10000000-0000-0000-0000-000000000002', 5, 'Great patterns, very practical. Wish it were longer!')
|
||||
on conflict (profile_id, session_id) do nothing;
|
||||
insert into public.points_log (event_id, contact_email, delta, category) values
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 10, 'checkin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 10, 'checkin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 5, 'connection'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 5, 'connection'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 10, 'feedback'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 140, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 95, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 88, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 76, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 70, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 64, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 58, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 52, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 35, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 28, 'admin'),
|
||||
('eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee', '[email protected]', 15, 'admin');
|
||||
Reference in new issue
Block a user