Hype

Hype Used AI

16 devlogs
69h 20m
Created by Abudi

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

Timeline

Ship 1

0 payouts of shell 0 shells

Abudi

9 days ago

Abudi Covers 16 devlogs and 69h 20m
Abudi
Abudi
2h 46m 9 days ago

Voting closed filter had a stupid bug: Wrong spelling of expires_at field

Created the app logo and inserted at different pages in the app

ScrollView on profile page

Set parameters:
a poll is considered as 'hot' if it was posted in the last 30min AND has ≥ 14 votes

When voting, the voters gets 1 hype and the poll creator gets 2 hype

Removed the react-native-element-dropdown library because it doesn't support the New Architechture. I had to replace it with another library: react-native-dropdown-picker

Added some categories and corresponding images

Configured many files (app.config.js, eas.json, ...) and reinstalled many packages just to make the production build work (Troubleshooting was hard. AI helped me here)

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 ;)

Update attachment
Abudi
Abudi
10h 1m 17 days ago

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

Abudi
Abudi
9h 46m 27 days ago
  1. Time conversion also on timeLeft variables

  2. Polls can be voted once + user's voted polls are saved in the database and can be viewed under Voted polls.

  3. Poll voting design

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

  5. Some styling that applies to all devices (e.g. gauge size) (took me very long to adjust it)

  6. Create polls in minutes not seconds (min. 1min, max. 60min)

  7. General poll view (no category)

  8. New gauge design (generated by ChatGPT and edited further by me)

  9. Gauge animation of pointer (Took me longer than it should have. ChatGPT helped much here)

  10. 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)

    • onEndReachedThreshold somehow not working
    • Unfortunately Firebase is not that good to get random data points from the database. It took me much time to just implement that functionality
  • 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

  • I will decide for X and Y later in that project
  • Realtime updates of hype score in the profile
  • Voting is locked for own polls

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.

  • Forgot password page issues fixed
  • Create page has now required input fields
  • using useState({}) instead of useState('') for every property in the create page
  • Changed routing rules (using expo-routing groups now)
  • Created a general background
  • Created a vote page (wasted too much time on properly positioning and styling gauges....)
  • Realtime updates of votes

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

  • Creating polls now fully works (will add the duration feature later)
  • Viewing all polls in the explore page is possible now
  • Real-time updating of data (Votes for the left side and the right side of the gauge). That is not shown in the video but practically works. Next time I will use multiple phones to show the realtime vote updates
  • Added some styling
  • Other small fixes

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.

Update attachment

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)

Update attachment

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 😶‍🌫️

Update attachment

After hours of troubleshooting with firebase auth, it finally works 👌.

Update attachment

Continuing setting up firebase authentication and database. That will take me some days since it's new to me.

Update attachment

Added some styles; added create page (dropdown menu).
Started setting up firebase database (continue tomorrow).
Started eas dev-build (5 hours in queue 💀).

Update attachment

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