Poller
https://github.com/orndorffgrant/pollerPost backdated to the time of the project.
I joined a remote book club during the pandemic. It was fun and I would recommend anyone who likes reading and wants to share a reading experience with friends to try meeting virtually. It's relatively easy to commit to when you don't have to leave your home.
After we finished our first book, the person organizing the club sent out a poll to everyone so that we could vote on the next book to read. That's all well and good, but in order to fill out the poll, I had to download and install an app on my phone. Of course, I went ahead and did it, but the idea of needing to install an app for such a simple purpose sort of triggered a reaction of "this app is just unnecessarily heavyweight for what it does."
And of course there are plenty of alternatives out there, but I decided a fun side project would be to make my own web app for creating polls and to keep it simple and self-hostable. That's how I came up with poller
.
The code is on github and you can see some demo polls here:
- Single vote: https://poller-demo.orndorffgrant.com/poll/nCj3LC4rp8
- Multi vote: https://poller-demo.orndorffgrant.com/poll/Pn5UFpE8Xh
- Score vote: https://poller-demo.orndorffgrant.com/poll/rvrB7nOthd
I chose to use rust for the backend and sqlite for the database. That means the backend program is a single statically linked executable and the backend database is also a single file. That makes self-hosting and migrating pretty simple.
I also chose to try out htmx for the frontend. It kept things simple and removed most logic from the client side.
The coolest tech stack thing I did was to use askama for templating and sqlx for database access. Both of these libraries are type-checked at compile time, which means I got type checking all the way from the database to the html.
You can find the code, usage instructions, and more in the repository on github.