Code Monkey home page Code Monkey logo

frightgeist-nuxt3's Introduction

Voting app

How it works :

whene creating a question :

  • Create your question give it a time and options...
  • Whene the question is created we navigate to the question/:id page
  • Since you created the question you cant leave until the question time is ended (whats the point of creating a question and just leave it there)

whene particepating on a question :

  • Navigate to the question
  • make a vote
  • you are not allowed to make an other vote till 1 minute later
  • whene voting again the old vote is updated

Issues :

  • We are listening on table Vote which means even if theres a vote that doesnt concern the question you are in you will recieve changes still

  • Unauthorized changes means you dont get the old or the new row

  • The changes are slow (listening on changes send a request for newer data, update store data)

  • Whene a user makes a vote we register the vote in the pinia store so that whene he changes it we only update the last but if he reloaded the page the vote will be gone and if he chnages his vote it adds it as a new vote, we could chnage this by puting it in the cookie but its gone after one minute I could use localStorage but im not a fan really

  • duplicate Votes (changed vote.create to vote.upsert)

  • Something is wrogn with middlewares i guess

Improvements :

  • whene a question is created by the user we force the user to stay in the question page till the time is ended (done by creating an other middleware and abortNavigation helper)

  • reduce picked time to few minutes

  • dont allow user to create an other question if the theres an active one (useCookie)

frightgeist-nuxt3's People

Contributors

abdelilahou avatar

Stargazers

 avatar Tuan Duc Tran avatar Alexander avatar  avatar

Watchers

 avatar  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.