Skip to content

Queue provides a FREE Q&A solution for online teaching!

Notifications You must be signed in to change notification settings

BenElferink/queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Queue - FREE Q&A solution for online teaching!

  • Voice to text conversion! (supported on Chrome)
  • Download PDF of answered history!
  • Real-time data!
  • Complete privacy! (all data is cleared after 12h)
  • Notifications with a timer!
  • Easy invite! 👇🏼

  • And more..!

Technologies used:


API HTTP routes

GET /room/:id (no-auth)

params:

:id === mongoose.Schema.Types.ObjectId

response:

{
   message: "room requested",
   roomId: mongoose.Schema.Types.ObjectId,
   host: {
     _id: mongoose.Schema.Types.ObjectId,
     username: String,
   }
}


API socket.io events

on create (no-auth)

body:

{
   username: String,
}

response: emit created + join(roomId)

{
   message: "created room",
   roomId: mongoose.Schema.Types.ObjectId,
   token: jsonwebtoken,
}

on join (no-auth)

body:

{
   roomId: mongoose.Schema.Types.ObjectId,
   username: String,
}

response: emit joined + join(roomId)

{
   message: "joined room",
   roomId: mongoose.Schema.Types.ObjectId,
   queue: [
     { type: mongoose.Schema.Types.ObjectId, ref: 'Quest' }
   ],
   token: jsonwebtoken,
}

on refetch (auth-TOKEN)

body:

{
   token: jsonwebtoken,
}

response: emit refetched + join(roomId)

{
   message: "room fetched",
   roomId: mongoose.Schema.Types.ObjectId,
   queue: [
     {
       from: {
         _id: mongoose.Schema.Types.ObjectId,
         username: String,
       },
       question: String,
       answer: String,
       answered: Boolean,
     } ...
   ],
}

on ask (auth-TOKEN)

body:

{
   token: jsonwebtoken,
   question: String,
}

response: io.to.(roomId) --> emit asked

{
   message: "question asked",
   roomId: mongoose.Schema.Types.ObjectId,
   quest: {
     from: {
       _id: mongoose.Schema.Types.ObjectId,
       username: String,
     },
     question: String,
     answer: String,
     answered: Boolean,
   }
}

on answer (auth-TOKEN)

body:

{
   token: jsonwebtoken,
   questId: mongoose.Schema.Types.ObjectId,
   answer: String,
}

response: io.to.(roomId) --> emit answered

{
   message: "question answered",
   roomId: mongoose.Schema.Types.ObjectId,
   quest: {
     from: {
       _id: mongoose.Schema.Types.ObjectId,
       username: String,
     },
     question: String,
     answer: String,
     answered: Boolean,
   }
}

on delete-quest (auth-TOKEN: quest owner or host)

body:

{
   token: jsonwebtoken,
   questId: mongoose.Schema.Types.ObjectId,
}

response: io.to.(roomId) --> emit deleted-quest

{
   message: "question deleted",
   roomId: mongoose.Schema.Types.ObjectId,
   questId: mongoose.Schema.Types.ObjectId,
}

on delete-room (auth-TOKEN: host)

body:

{
   token: jsonwebtoken,
}

response: io.to.(roomId) --> emit deleted-room

{
   message: "room deleted",
   roomId: mongoose.Schema.Types.ObjectId,
}