Hype is a place where you can post polls and other users can vote in a limited time. It's basically an ANDROID APP to get opinions/feelings about recent events or events that are currently happening (Sports, Politics, Tech world....)
Tech stack: React Native, Expo, Firebase
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Set parameters:
a poll is considered as 'hot' if it was posted in the last 30min AND has ≥ 14 votes
THATS IT!
Try the app through the demo link. It's an apk that you can download on my repository and install on all android devices.
Have fun and don't forget to vote for me ;)
Fixing issues in savedpolls and votedpolls since I didn't reference polls that lively update and instead referenced polls that are static. Firestore doesn't let me make a query with my three desired where-clauses. Solved it by filtering the polls after querying the database.
Create page styling completed
Removed newest polls filter and replaced it with voting open filter since newest polls filter kind of got unnecessary
Fixed the unsubbing problem of getLiveVotes() (deleted that function later; see important performance fix)
Adjusted fontsizes on all pages to fit for all devices
The savePoll Button (star) is now placed correctly and doesn't glitch out
User is asked if he is sure to log out
Replaced many buttons from Pressables to TouchableOpacity
Checking if username already exists at the sign-up page
Set up some important security rules of the database
Password hidden; password has to be repeated to sign-up
Username can only consist out of letters (a-z, A-Z) and number (0-9). Everything else is regex-ed out
Email verification implemented (login only possible if email is verified)
Styled login-pages
Changed sorting order of voting open and closed polls
Added titles on Your, Saved and Voted polls in the pollView
Important perfomance fix: Listeners that update the votes and timer in the poll view are now only listening for polls that are currently viewed/visible in the list. So if you have scrolled very far down, only a bunch of listeners will be active instead of all in the list
NOTE: You may not see many changes in the video. This is because I worked most of the time on the backend. Performance fixes, errors over errors, security rules, minor changes....
Time conversion also on timeLeft variables
Polls can be voted once + user's voted polls are saved in the database and can be viewed under Voted polls.
Poll voting design
Sorting by hot polls (polls are considered as hot if they were posted X minutes ago and have more than or equal Y total votes). In the video X=30 and Y=1. Much debugging here with the query.
Some styling that applies to all devices (e.g. gauge size) (took me very long to adjust it)
Create polls in minutes not seconds (min. 1min, max. 60min)
General poll view (no category)
New gauge design (generated by ChatGPT and edited further by me)
Gauge animation of pointer (Took me longer than it should have. ChatGPT helped much here)
Styling of the create page (will work on that next time)
My polls can be viewed in the profile
Fixed log-out errors
Styling of posts
Changed handling of users in the backend (using displayName property of firestore)
Changed file-based routing order
Refreshing newest actually didn't work - fixed that
Proper error message when password is too weak
Time conversion from milliseconds to string (sec, min, hr, d, wk, mo, yr). Displayed on each poll
Removed the random sorting option because it's pointless and too slow
Styled voting page
Save polls option
Polls can now be sorted by category
Refreshing looks better now
Some performance fixes (e.g. 1. onRefresh and onEndReached can't be triggered at the same time. 2. Less rerenders triggered)
Polls can also be sorted by newest, closed votings and random (took me the most coding time)
Fixed bugs of the poll duration not displaying
Styled the profile page
UserContext created. Loading user-data is much easier now!
Pull down to refresh polls added
Infinite scrolling feature (that part took me at least 3 hours)
Fixed some performance issues (too much reads/writes)
Some styling finally
Categories on the explore page with cool images
Next:
Sorting the polls by category
General sorting feature on the poll viewing page (sort by: - newest, - oldest, - not ended ....). Maybe I will remove the random sorting functionality since it is too slow.
Working on the voting page and its styling
Make the create page look better
Note:
In the video you will often see the same poll, because I had to create many polls fast to see if the poll loading works
New:
- Implemented duration feature (took me at least 3h only debugging)
- Gaining hype score feature
- For every X votes ⇒ 1 hype point for the poll creator
- For every Y votes ⇒ 1 hype point for the voter
Next:
Creating a user context, so user-data isn't fetched on every page visit
Scroll down to reload feature
Fix sign-out errors that happen sometimes
Note 1:
In the video a user can vote multiple times for a poll. When releasing the project, of course a user will be able to only vote one time for each poll.
Note 2:
The most important features are done.
Next:
- Fixing sign-out issues (see last second video)
- Adding duration functionality (limited time polls)
- Adding hype score gaining functionality through polls and votes
- Start serious styling
Next:
- Implementing the feature to actually vote for a poll
- Forgot password doesn't work properly, so I will have to tackle that issue
- Implement the duration feature for polls
- Styling
Added the forgot password page and started implementing the backend for creating polls. Will work on that further tomorrow.
Got the Firestore finally working. You can now sign up and define a username.
It's also displayed on the explore page.
Next: Creating and viewing polls functionality.
(I know the styling is bad, but I will work on that later when the import features of the backend are implemented)
Finished the basic setup of firebase authentication: Sign up, sign in, sign out functionality. Also styled the pages and set some proper (expo-)routing.
Started integrating firebase's firestore (storing user accounts. Properties for now: Username, Hype score). I will work on that tomorrow since I had to troubleshoot some problems with integrating the database. But the basic creation of users (email + password) works.
Backend is hard 😶🌫️
Continuing setting up firebase authentication and database. That will take me some days since it's new to me.
Added some styles; added create page (dropdown menu).
Started setting up firebase database (continue tomorrow).
Started eas dev-build (5 hours in queue 💀).
Added the main feature: half-circle gauge. Used AI to calculate the angle of the pointer (the voting functionality is not shown in the video but works).
Added the post container and some styles.
Next: Developing the create page and perhaps start integrating the database. I will also use an eas development build for debugging (instead of expo go).