Skip to content
A full stack voting app.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
controllers
public
views
.db_notes.md
.gitignore
README.md
package.json
require-chart.js
routes.js
server.js
test.js

README.md

Pollz Voting App

Routes

UNDER DEVELOPMENT

GET /

  • Shows unauthenticated users all polls.
  • Shows authenticated users a choice of all polls, filterable to personal polls?
  • Links to
    • /login
    • /results
    • /logout (Auth only)
    • /poll (Auth only)
    • /vote (Auth only)
    • /mypolls (Auth only)

GET /login

  • Shows login form
    • Form posts to /sendtoken
  • Explains passwordless auth, directs users to use real email
  • Links to
    • /
    • /login (?)

POST /sendtoken

  • Handles sign-up form (passwordless does the heavy lifting here)
  • Redirects to /sent

GET /sent

  • Explains requirement to access email for one-time token
  • Links to
    • /

GET /vote/:POLLID (Auth only)

  • Shows poll and options
  • Should not allow repeat votes
  • Posts to /vote
  • Unauthenticated users redirect to /sign-in
  • Links to
    • /
    • /results (to see results without voting)

POST /vote (Auth only)

  • Handles user's vote
  • Redirects to /results

GET /poll (Auth only)

  • Form to create new poll
  • Posts to /poll
  • Unauthenticated users redirect to /sign-in
  • Links to
    • /

POST /poll (Auth only)

  • Handles new poll creation
  • Redirects to /vote

GET /results/:POLLID

  • Shows results bar chart for chosen poll
  • Links to
    • /
    • /sign-in
    • /sign-up
    • /vote

GET /mypolls

  • Lists users polls
  • Links to
    • /
    • /poll
    • /results/:POLLID
    • /logout
You can’t perform that action at this time.