/polly

Polly enables the creation of robust polls that support the use of a large number of users. Each host can create their own virtual room where they can publish their questions and share them with a large number of people

Primary LanguageCSSMIT LicenseMIT

Hello! Welcome to Poll Me!

forthebadge

GitHub top language GitHub contributors GitHub language count GitHub GitHub last commit build DOI Docker Coverage Status lines of code Known Vulnerabilities

πŸ’Ž What is Poll Me about?

Poll Me is a super tool for getting feedback using online polls to let you check in with your audience or customers at any time. Do you want to get the opinion of many people on a certain matter, but haven't found a device that supports a large number of users yet? Then Poll Me is the right place for you. With Poll Me, you can create instant polls, check on the live user feedbacks and gain access to our vibrant Analytics dashboard to get insight into your poll results. Poll Me enables the creation of robust polls that support the use of a large number of users. Each host can create their own virtual room where they can publish their questions and share them with a large number of people. With pre-built survey templates, different survey types can be created and the results can be viewed by both host and player after answering the question.

The following technologies were used for the development of this project:

react ts redis js aws css

πŸš… Demo

Demo.mp4
  1. The Home Page 🎯 :It is the home page for our webapp, It contains the "create room" icon and other functional information.

  2. Create Room Button 🎯 : Users can create a room for conducting their polls. The room link is shown so you can share it with your audience/customers.

  3. Survey Questions 🎯: User can submit any kind of questions for conducting polls along with the choices for the answer.

  4. Analytics 🎯: After the audience submit the answers, Analytical insights into the results are shown on the page.

πŸ“Ή Project Video P1

ME1QO0QNUDFU1QJB.mp4

πŸ“Ή Project Video P2

PollMe2.0.mp4

πŸ“ Architecture

Deployment details P1

Backend

The backend API is deployed on AWS Lambda using the serverless framework. Automated deploys are setup via a Github action that detects pushes to the main branch in the backend directory present in the project root. The action performs the following steps

  • Install dependencies using npm install
  • Generate prisma client(more about Prisma ORM in ./backend/README.md)
  • Push pending migrations to the database
  • Deploy the service on AWS Lambda

The above action requires the following environment variables to be set

  • DATABASE_URL (URL of your postgres database)
  • SERVERLESS_ACCESS_KEY(Access key for the serverless framework generated from the serverless dashboard)
  • JWT_SECRET(Key used to sign auth tokens using JWT)
  • ALLOWED_ORIGIN(Origins that are allowed via CORS)

When a service is deployed to AWS via the serverless framework, the following things happen

  • Code is zipped and pushed to an S3 bucket
  • API gateway service is created(as we use http events for our lambda functions)
  • An aws lambda function is created/updated for each function defined in the serverless.yml file

Frontend

Frontend of the application is deployed on Netlify. Netlfiy detects changes to the front end and creates a production optimized build by running the command

npm run build

The static site assets are then served via Netlify's CDNs.

Note: There are many other providers that provide static site deployments like Vercel, AWS Amplify, etc that can be swapped for Netlify in this project

πŸ“Š UML Diagram

πŸš€ Local development setup

Backend

  • Switch to backend directory

    cd backend
    
  • Install dependencies

    npm i
    
  • Create and populate .env file from the env.example template

  • Generate prisma client

    npx prisma generate
    
  • Start local serverless API

    npx serverless offline      
    

Performing database changes(Refer prisma docs)

  • Make your schema changes in the prisma/schema.prisma

  • To create a migration, use the command

    npx prisma migrate dev --name <migration_name>
    

Frontend

  • Switch to frontend directory

    cd frontend
    
  • Install dependencies

    npm install
    
  • Create and populate .env file from the env.example template

  • Start local serverless API

    npm run start
    

Deployment details P2

By using docker we could deploy the whole system in one single command :

β€œDocker compose up”

The above single command set up the whole environment and downloads the dependencies to make it run seamlessly on any platform.

βœ… Things that have been done in Phase 1

  • Designing the Wireframe
  • Basic architecture design and implementation
  • Backend API implemented using serverless framework
  • Front end mobile UI implemented using React
  • Database design and schema implementation using Prisma

Live preview available at https://gracious-swirles-4a8c61.netlify.app

βœ… Things that have been done in Phase 2

  • Improvment of the UI
  • Architechture Enhancement using Bootstrap
  • Dockerization
  • Centralized Database
  • Dynamic Loading of the Poll questions

You can check https://github.com/shahrk/polly/blob/main/docs/Enhancement.pdf for enhancement details in P2.

Future scope

  1. There can be few ready-to-use templates for conducting polls such as Event/Trivia/Business etc.
  2. The App can provide contacts of audiences on the homepage for the admins to sent polls to.
  3. The pool of audience can be devided into different categories such as students, bikers, science enthusiasts, group of believers etc. Then the admin can select categoris which they want to send their questions for polling.
  4. Analytics can be extended to see the responses in different geograpic locations.

πŸ“¬ Team Members P2


Raj Shah

Nirav Patel


Parth Kanakiya


Mithil Dave


Bhargav Jethwa

Contact us at: featurehuntteam@gmail.com