Skip to content

vaporcrash/Whatsapp-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whatsapp-bot

We'll have 2 different workflows

  1. Question management by Admin user
  2. Multiplayer Quiz using whatsapp bot

Question management

  • Admin will need to create Questions/Answer pairs and have ability to perform CRUD actions on them.
  • Questions can be grouped in Quizzes that will be sent out together to players
  • Admin will have the capability to trigger a quiz , ie. set a timer for when the quiz should start

Multiplayer Quiz

The Quiz can be broken into multiple steps :

  • Player signup : Players will send a message via whatsapp to sign up before the deadline
  • Quiz game : Bot will send the questions from the chosen quiz to the registered players and responses will be stored at the server side
  • Leaderboard : After half an hour time limit is over, server will analyze all answers from all users for quiz and send a leaderboard to admin

Techincal Stack

  • Flask :server to handle all requests from admin & users
  • Twillio :for whatsapp integration
  • MongoDB : for data storage

Tables

Quizzes
quiz_id quiz_name duration questions
Questions
question_id questions_type question answer difficulty category created_by timestamp
Session
sessions_id start_time end_time quiz_id members

APIs

Question Management

  1. Create a question
    1. with a quiz id
  2. Retrieve a question
    1. by question id
    2. by question category
  3. Update a question by question id
  4. Delete a question by question id
  5. Create a quiz
  6. Retrieve a quiz by quiz name
  7. Update a quiz
  8. Delete a quiz

Quiz

  1. Receive registrations
  2. Trigger quiz
  3. Handle responses
  4. wrap up quiz

Future Tasks

  1. Cumulative leaderboard
  2. Random quiz generators
  3. Similar but not equal answers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages