Coder Social home page Coder Social logo

danielg212 / queue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benelferink/queue

0.0 1.0 0.0 5.75 MB

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

Home Page: https://queue-client.herokuapp.com

HTML 0.81% JavaScript 74.61% CSS 24.51% Shell 0.06%

queue's Introduction

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..! Click here to get started, it's FREE!

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,
}

queue's People

Contributors

benelferink avatar amankuvera-dev avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.