Please sign in to access this page
Online map where people can post their current mood and see medium mood from other locations.
udontur
Check their projects out: Generic Mock Paper Generator, LeetCode Dark Fix, Umpire, nixos
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!
I believe functional part of server-side is finally over! What a pleasant C++ experience that was. Not sure where will I host my project yet, but it's problem for the future. Ran into a dozen of bugs, 12 of them were segfaults <3
To be specific, server-side API has such implemented routes at this moment:
get /api/ping - checks if server is online
get /api/request - sends the json with all current data
get * - sends client static files
post /api/submit - at this endpoint you can send your current mood. to be honest it's possible to do this using curl without opening web app, but it's a feature, not a vulnerability (anti-spam is implemented on server, not client-side)😎
Decided to use ipapi.co for identifying IP-address location because it gives anyone 10.000 free API calls /month, I believe for my app this is more than enough.
But probably it's time to refactor the code, because it looks just terrible. Even considering the fact that variable names aren't a, b, c, yellowbeaver52, 300 lines of pure C++ beauty is not easily maintainable.
Hope to finish something like MVP tomorrow :)
not sure what to attach here, so you can see the C++ server beauty 🌹
so besides all the basic stuff that is present in every backend service, i created a deque with all IP-addresses to prevent spamming. removing and adding elements from/to deque is cheap for CPU, so it was a great idea. every 30 seconds in a parallel thread there runs a function that checks: if cooldown has passed -> it removes IP from the list :)
awesome
basic frontend is done it's time to grind c++ backend, demonstration of frontend mvp is in the attachment, check it out if you want to
Created two cool splash windows: one for showing first-time-login information to the user (about which data is collected and how does the app work), which works with cookies, and one for actually sharing the mood, though icons are not ready yet. Also did some code refactoring...
Created world map on the website myself without any libraries! Now when you hover mouse pointer over a country it becomes yellow, just like in the attachment.