Services

Supabase-only architecture

Flow has no custom microservices. All backend logic runs in Supabase Edge Functions (Deno/TypeScript) or directly in PostgreSQL via RLS, triggers, and functions. See Architecture Overview for the full picture.

Supabase Edge Functions

FunctionHTTP triggerPurpose
send-notificationPostgres webhook on notifications INSERTSends FCM push + Resend email
process-rsvpPostgres webhook on event_attendees changeAwards XP, invalidates recommendation cache, triggers badge evaluation
compute-recommendationsCron (every 6h) + on-demand POSTScores events for each user, writes to recommendations_cache
compute-matchmakingOn-demand POSTScores other users by affinity
moderate-contentPostgres webhook on messages/comments INSERTKeyword filter + flag for review
compute-connection-depthPostgres webhook on event_attendees INSERTUpdates friendship tier between co-attendees
evaluate-badgesCalled internally from process-rsvpChecks badge criteria, inserts into user_badges

Clients

Mobile App (flow-mobile)

  • Flutter · Riverpod · GoRouter · Supabase Flutter SDK
  • Communicates with Supabase PostgREST + Realtime directly
  • Push notifications via Firebase Cloud Messaging (FCM)
  • See setup for local setup

Admin Portal (flow-platform)

  • Next.js 16 · React 19 · TypeScript · Tailwind CSS 4
  • Server Components for SSR, TanStack Query for client mutations
  • Communicates with Supabase PostgREST + Edge Functions directly

Database (PostgreSQL)

~30 tables with RLS on every table. Key tables:

TableDescription
profilesUser profile, account type, username, interests
eventsEvent listings with geo_point, tags, venue_id
venuesVenue info, location, category
event_attendeesRSVPs (interested / going)
connectionsFriendship graph with tier
crewsGroups of users
notificationsFan-out notifications, triggers Edge Function
recommendations_cachePre-computed event scores per user

Full schema: Database Schema