pooja-gera / algorithm-finder

https://algorithm-finder.vercel.app/
4 stars 8 forks source link

Better Visitor Count UI and functionality implementation #12

Closed Pranay-Pandey closed 1 month ago

Pranay-Pandey commented 1 month ago

The Visitor count could be centred for better visibility.

Also currently the api call for getting the visitor count fetches from a redundant localhost server. Something simple like free visitor count could be used for the purpose

Tanisha-Verma-16 commented 1 month ago

Consider placing the visitor count on the navigation bar to ensure it blends with the overall design, avoiding any disruption to the main content of the site. I'd like to work on its UI

pooja-gera commented 1 month ago

Hello @Pranay-Pandey thankyou for pointing it out.

I think the visitor count you mentioned won't work in our case, I tried to check it out but couldn't see what storage it is using to store the number of visitors. If you could attach a small demo with this PR about how it'll work - that'll be super! As for the dummy server call, in future, it will call an API that would return the number of registered users. Waiting for your response, happy open source month to you! 🥳

And, @Tanisha-Verma-16 the visitor count looks good at either places, the footer looked a little lonely so I asked to put it there haha.

gargantuadev commented 1 month ago

Hello everyone,

I have centered the visitor counter as suggested (if it's not centered I need to look again at the code, I hope we are not in the classic case "on my pc was working" 😂).

Currently, the visitor counter is using a MongoDB instance to store the visitor count. Although a simple text file with a backend API could work for now, I opted for MongoDB to be more scalable in case we need additional features or data in the future. It's also easy to be changed in case we would want to.

For the time being, this setup is not fully deployed (we don't have a shared instance by the owner @pooja-gera). Since the repo is public, for now I think it's better to hide this confidential information in a .env file. Moreover, I've added detailed instructions in the CONTRIBUTING.md file on how to create a free MongoDB instance and configure the .env file. This should help anyone setting it up locally (if you don't simply you will not see the counter increasing with your accesses).

If you have any questions or need further clarification, feel free to reach out!