How 26samaahmed/fliq works
Fliq is a collaborative photo-booth web app. The documented journey runs from landing and account access through participant/frame setup, a shared capture session, photo selection, background editing, and strip export or profile revisit. The implementation combines SvelteKit route stages, a Socket.IO room server, Supabase-backed account and strip operations, and a Gemini-powered background-edit endpoint. The README documents the overall workflow and integrations; sampled source confirms server events, selection synchronization, profile storage actions, and the AI request path. Several flow pages were not sampled, so their internal calls are not inferred.
Main entry points: BackgroundChatbot.svelte Background editor · [[roomID]]/+page.svelte Shared capture · server.js Room coordination · login/+page.svelte Authentication
Components 19
Entry and Accounts
- Landing
src/routes/+page.svelte - Authentication
src/routes/login/+page.svelte - Sign up
src/routes/signup/+page.svelte - User state
src/lib/stores/user.ts - Strip profile
src/routes/profile/+page.svelte
Booth Session
- Participant setup
src/routes/(flow)/step1/+page.svelte - Frame choice
src/routes/(flow)/step2/+page.svelte - Frame design
src/routes/(flow)/step3 - Shared capture
src/routes/(flow)/step4/[[roomID]]/+page.svelte
Strip Creation
- Photo selection
src/routes/(flow)/step5/+page.svelte - Background editor
src/lib/components/chatbot/BackgroundChatbot.svelte - Final strip
src/routes/(flow)/step6/+page.svelte - Save and export
src/routes/(flow)/step7/+page.svelte
Backend Services
- Room coordination
server.js - Background API
src/routes/api/background-edit/+server.ts - Supabase client
src/lib/supabase.ts
Other components
- Visitor
- Gemini AI
- Supabase auth and storage
Connections 22
- Visitor → Landing: opens
- Landing → Authentication: continues to
- Authentication → Participant setup: enters flow
- Sign up → Participant setup: enters flow
- Authentication → User state: authenticates user
- Participant setup → Frame choice: chooses participants
- Frame choice → Frame design: selects layout
- Frame design → Shared capture: starts session
- Shared capture → Room coordination: coordinates room
- Room coordination → Shared capture: synchronizes events
server.js - Shared capture → Photo selection: previews photos
- Photo selection → Room coordination: syncs selections
src/routes/(flow)/step5/+page.svelte - Photo selection → Background editor: continues editing
- Background editor → Background API: posts images
src/lib/components/chatbot/BackgroundChatbot.svelte - Background API → Gemini AI: generates edits
src/routes/api/background-edit/+server.ts - Background editor → Room coordination: shares chat
- Background editor → Final strip: applies background
- Final strip → Save and export: prepares strip
- Save and export → Supabase client: saves strip
- Strip profile → Supabase client: loads and manages strips
src/routes/profile/+page.svelte - Supabase client → Supabase auth and storage: accesses auth and storage
- Save and export → Strip profile: revisits saved strips