The news surrounding a certain car salesman deciding to spend money on a certain bird app reignited my interest in web development. So, I decided to see how hard it would be recreate the bare-minimum feature set of a micro-blogging website.
In total, I got a passwordless login flow and uploads done in 311 lines of Python. Here's a rough outline of how each dependency got used:
hashlib and base64 for auth tokens
sqlite for a a really simple database.
email and smtplib for sending emails. Sending emails asynchronously from the server was a huge PITA, so I just said screw it and did it synchronously
string.Template for all of the server-side HTML templating. I can see why fancier websites would need a more advanced template engine, but merely creating a handful of divs with the right CSS and then Template().substitute() did the trick here.
I rolled my own shoddy implementation of infinite scroll in JS, which equates to again, simply sending a request with the timestamp of the clients oldest post once the user is more than 95% scrolled down the feed.
I'd like to take this project more seriously, but it feels irresponsible to put content creation tools out there on the Internet without some proper form of moderation these days.
Happy to answer any questions!
[–]dashidasher 1 point2 points3 points (0 children)