This is a polling/voting website built on Flask with Redis (and PostgreSQL for local testing), ready for deployment. The project idea came from a personal need to make polls that anyone can take part in without prior registration.
No-login polling requires implementing an additional authentication in the backend to minimize duplicate voting. So, the system based on Browser Fingerprinting, IP and Cookie authentication was implemented.
Keeping personally identifiable information safe is a priority. Sensitive information (such as IP addresses and browser fingerprints) is hashed to add another layer of data protection.
- No-Login Voting Website
- Vote Re-cast Protection Measures
- User Data Protection and Encryption
- API and Frontend Implementation
- Poll Info and Statistics
- Flexible Poll Creation and Editing
- Data Caching
-
Clone the repository:
git clone https://github.com/mykdolnyk/yt-downloader-website.git cd yt-downloader-website -
Update the existing .ENV file (
test.env) or create your custom one. -
Ensure that you have Docker running and start the app:
docker compose up
To create, edit and manage polls, you must create an admin user. You can do that by entering the container’s shell and then using a custom command to create the user:
# Entering the shell
docker compose exec web sh
# Creating the superuser
flask --app run admin createsuperuser adminThe admin panel can be accessed via this URL:
http://{HOST}/{ADMIN_URL}/
, where {HOST} is the domain/IP address, and {ADMIN_URL} is the FLASK_ADMIN_URL_PREFIX string defined in the .ENV file.
But first, to access the admin panel, you should get authenticated (it is not fully no-login after all, huh). That can be done by visiting the http://{HOST}/{ADMIN_URL}/auth/ URL. If you decide to de-login, just visit the http://{HOST}/{ADMIN_URL}/deauth/ URL.
You can set up a free SSL certificate for the domain using Certbot. To do that, first you will need to make some manual changes in the existing files. In docker-compose-ssl.yml and default-ssl.conf files, change strings %DOMAINNAME% and %EMAIL% with actual domain name and email address.
Once that is done, you can run the project with:
docker compose -f docker-compose-ssl.yml upKeep in mind that you still need to configure the default-ssl.conf file as usual to make it work with SSL.