Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdelilahou/frightgeist-nuxt3
voting app using nuxt 3 + prisma
https://github.com/abdelilahou/frightgeist-nuxt3
nuxt3 prisma question-answering supabase typescript
Last synced: about 19 hours ago
JSON representation
voting app using nuxt 3 + prisma
- Host: GitHub
- URL: https://github.com/abdelilahou/frightgeist-nuxt3
- Owner: AbdelilahOu
- Created: 2022-12-07T15:09:01.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T22:47:24.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T15:07:09.784Z (10 months ago)
- Topics: nuxt3, prisma, question-answering, supabase, typescript
- Language: TypeScript
- Homepage:
- Size: 410 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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)
- [x] 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
- [x] duplicate Votes (changed vote.create to vote.upsert)
- [x] Something is wrogn with middlewares i guess
## Improvements :
- [x] 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)
- [x] reduce picked time to few minutes
- [x] dont allow user to create an other question if the theres an active one (useCookie)