Let's be honest, the world is a pretty lonely and sad place for most of us during the COVID-19 pandemic. Self-isolation sucks, Quarantines suck, etc. I thought it would be fun to get a few laughs while creating a project for the #twiliohackathon
What I built
Send nerdy jokes by SMS. Just create an account, login, and put in your number and get a joke text on your phone!
Demo Link
Link to Code
https://github.com/paqman85/txtjokes
How I built it (what's the stack? did I run into issues or discover something new along the way?)
I built this project using Django as my backend and the built-in templating engine paired with a bootstrap 4 template (bootswatch minty) as a stylish front end.
I'm using several libraries in this build: Twilio's python package to facilitate sending SMS, Pyjokes as a joke library, Docker, Pipenv, and the demo is running on Heroku.
I ran into several issues that had me pulling out some hair. Dealing with phone numbers in a Django form and converting the input into a usable number for Twilio was a bit of a hurdle. I found Django-Phonenumber-Field; which uses Google's phone number library. I was able to leverage this package to help parse the input into the right format for Twilio.
I added user registration and forced the user to be logged in to send SMS msgs.
Email transactions for authentication are sent via SendGrid-Django package.
Additional Resources/Info
Find the app live at txtjokes.heroku.com
This project was a fun one day build. I found Twilio's tech and docs pretty user friendly for python.
I have ideas to expand the project:
- Txt counter to show how many jokes were sent.
- Notification bubble to show the joke sent
- Expanding joke library
- Subscription service for daily jokes
And I also think that this project would be a great base for many spin-off ideas such as:
- Daily motivation messenger (Don't give up!)
- Reminder service ("Don't forget the milk" - texted as you finish your workday)
- COVID-19 daily info msgs (Daily stats send in brief to your phone)
- Daily Gifs -- Combine this service with Giphy API
- Anonymous SMS service
- Daily riddles (24 hours to solve before the answer is sent)
- Chess by SMS - learn to play blind chess with notations
If I get a lull in dev work, I'll be sure to pick one of these great projects to expand on Twilio's tech - I especially love the chess one. :D
You can find me typically lurking here on Dev, or developing web applications for money! I love working with Django. Currently also learning some Nim. Always happy to make new friends, collaborate, and talk shop.
Top comments (0)