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
| Function | HTTP trigger | Purpose |
|---|---|---|
send-notification | Postgres webhook on notifications INSERT | Sends FCM push + Resend email |
process-rsvp | Postgres webhook on event_attendees change | Awards XP, invalidates recommendation cache, triggers badge evaluation |
compute-recommendations | Cron (every 6h) + on-demand POST | Scores events for each user, writes to recommendations_cache |
compute-matchmaking | On-demand POST | Scores other users by affinity |
moderate-content | Postgres webhook on messages/comments INSERT | Keyword filter + flag for review |
compute-connection-depth | Postgres webhook on event_attendees INSERT | Updates friendship tier between co-attendees |
evaluate-badges | Called internally from process-rsvp | Checks 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:
| Table | Description |
|---|---|
profiles | User profile, account type, username, interests |
events | Event listings with geo_point, tags, venue_id |
venues | Venue info, location, category |
event_attendees | RSVPs (interested / going) |
connections | Friendship graph with tier |
crews | Groups of users |
notifications | Fan-out notifications, triggers Edge Function |
recommendations_cache | Pre-computed event scores per user |
Full schema: Database Schema
Related
- Architecture Overview — decision rationale and what was intentionally excluded
- API Reference — PostgREST endpoints and Edge Function contracts