ralfz123/real-time-web-2021

Improvements

Closed this issue · 0 comments

state

  room1: {
    id: 1,
    likedRecipes: [],
    users: [],
    chat: [],
  },

room

  • display (updated) userList (array) in each room
  • user id
  • on refresh, stay in room
  • User leave, remove user from state (socket) --> cannot get users because array is empty? Returns not roomid
  • user leaves at joining room, send alert and socket on event(leftRoom)

recipe

  • chosen recipes
  • Every user sees his own queries, not emit to other clients
  • every user likes recipe and auto pushes it to array that contains all liked recipes and that will be displayed and emitted for everyone. So can they discuss and pick one recipe.
  • Send room with liked recipes, handle recipes list as the same as the userlist
  • You can click on the recipes as input and then you can "like" them. First I had a text input with recipe id.
  • Emit liked recipe only in specific room, not to all rooms ❗
  • Emit liked recipes and chat history by entering room first time (as the same way like the room users list)
  • liked recipes must have a limit on 5.
  • [ ]

won recipe

  • button to clear the room data and serve the room as empty?
  • When wonrecipe is added, send to new user the won page with data and user

chat

  • chat history

consistency/check

  • function names
  • state functions into each .js file for each subject
  • state limit recipes
  • "chosen" --> "liked"
  • Diagram socket event names

Clientside

  • Render new "item" or state?

Match

  • When 5 recipes are liked, alert that first jhoined user (name is given) has to pick one and then the whole team has to make that recipe and the recipe data is given.