## Notes The `Create Game Workflow` is the process that the user goes through in order to start a matching game. 1. Add any people 2. Adjust any game configurations - Length of time? - Restrictions? - Limited to specific categories - Limited to an area? - Use people's locations as search area? ## Simplest Version - iPhone - Location enabled | User Action | UI | Backend | | -------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Sign In | | | | | Shows existing games | | | Click "Create Game" | | | | | Sends Create Game request to backend | | | | | Creates initial game entry | | | Navigates user to map | | | Chooses location | | | | Presses Start button | | | | | Sends Start Game request to backend | | | | | Sets game to active. Add entry to `game-restaurant` table about restaurants in location. Returns restaurants in chosen area if they exist; otherwise fetch restaurants from API, populate database table, and returns a restaurant | | | Displays restaurant data | | | User swipes yes/no | | | | | Sends user feedback to Server | | | | | If match is found, say so, otherwise return another restaurant | ### Task Breakdown - [x] (UI) Sends Create Game request to backend - [x] (Backend) Creates initial game entry - [x] (Backend) Respond with Create Game Success - [x] (UI) Navigates user to map - [x] (User) Chooses location - [x] (User) Presses Start button - [x] (UI) Sends Start Game request to backend - [x] (Backend) Handles Start Game event. (Supabase Edge Function) - [x] Sets game to active - [x] Check if restaurants are in search area - [x] If they are, return one - [x] Else Fetch from API, store it, and return one - (UI) Displays restaurant data - URL could be `/game/restaurant/id` - (User) User swipes yes/no - (UI) Sends user feedback to Server - (Backend) If match is found, say so, otherwise return another restaurant ## Referencias - [[Restaurant Swipe Overview|Restaurant Swipe]]