Voting App -- My First Full-Stack Project (criticism are welcomed!)

So I’ve finally finished my first full-stack app, utilizing React+Redux and Express + Mongo (MERN).

This was quite experience (frustration but rewarding). I think I spent more time on getting the app to run vs. the logic of connecting everything together.

At the moment it’s not the most optimal solution, but I am happy the way it turned out.

Anyway, I’d appreciate if you guys give it try and see if there is anything I should work on.

https://votez-app.herokuapp.com/

Thanks!

I don’t know… without be logged I can remove pulls and I don’t see any option etc… What happens?

P.s.: I started this project too… ( very alpha https://github.com/NeckersBOX/votingapp … in 1 week some hours every day now work only sign up/login/logout :sweat_smile: )

Oops, I forgot to add the feature of having users to add extra options…I’ll work on that soon.

So were you able to delete polls even without being signed in?

Without do login if I open a poll:

When I click on delete I can remove this poll from the main list.

Hmm interesting. I can’t seem to replicate on my computer.

Did it delete successfully? Was it the car model poll?

Console log from chrome:

client.js?3ac5:58[HMR] connected
process-update.js?e13e:27[HMR] Checking for updates on the server...
process-update.js?e13e:122[HMR] Update check failed: SyntaxError: Unexpected token < in JSON at position 0
    at XMLHttpRequest.t.onreadystatechange (https://votez-app.herokuapp.com/dist/bundle.js:1:685)
TypeError: Object.values is not a function(…)
index.js?4644:26 TypeError: Object.values is not a function(…)

Seems it delete from db, yes ( maybe you can see I’ve deleted just some minutes ago some polls ) and this affects all polls.

Wow thats strange…I know error is webpack related reloader, but I can’t seem to replicate of being able to delete polls without being signed in :fearful:

Have you tryed to go in incognito mode on heroku version?

This is what I see:

1 Like

Wow, thanks for the gif! I will take a look at it!

I finished my Voting App a week ago, so I’m no expert, but I looked at your code and I can’t see where are you protecting your routes.

It looks like now you are just hiding delete button, but I can make DELETE call to https://votez-app.herokuapp.com/polls/poll-id-which-i-can-grab-from-url with cUrl or Postman and voila, poll deleted without authentication.