Inspiration

When couples talk in person, there's often a wide variety of conversation. There's entropy in the environment, random occurrences that can steer conversations one way or another and keep them interesting. However, when chatting online, that element of entropy is somewhat lost and conversations can get stale at times. LittleTexts aims to solve this by adding some entropy once a day through random writing prompts!

What it does

LittleTexts is an SMS-based chatbot powered by Twilio, Python, Flask, and SQLite that messages couples open-ended writing "challenges". Every day, at a random time, all LittleTexts users will receive the day's prompt. They will then have until the next prompt to reply to the bot with their answer to the challenge. The bot will then forward that answer to their partner, creating a fun talking point and facilitating sharing more little moments!

How I built it

This chatbot was built using Twilio's SMS API, Python, Flask, and SQLite3. The Python server has a command handler component that serves to handle receiving messages and interacting with the database, and a challenge sending component that handles scheduling and blasting out the daily writing prompt.

Challenges I ran into

A big challenge I ran into was how to handle multiple users, and how to store and manage my data. Originally, I planned to use json files as I had never used SQL or any database before, but quickly realized that this added massive complexity to my code, so I ripped off the proverbial bandage and entirely rewrote my code, teaching myself the basics of SQL and implementing an SQLite3 flat file database for the server instead.

What we learned

This project, especially as a part of my first ever hackathon, was a massive learning experience. I learned new skills and got over some hurdles, such as learning how to implement a database and use SQL queries, and I learned how to be adaptable and think on the fly, as I came into the hackathon with a completely different project idea but had to adapt and change it to better fit time constraints and incorporate technologies I wanted to use.

What's next for LittleTexts

I anticipate continuing to work on this service, and will likely revise the implementation to ensure this idea can scale and grow and be useful to couples around the world. Beyond reworking the core server, there are also other feature ideas I'd love to implement:

  • Using techniques to enable a more natural conversation flow with the bot and minimize the amount of command syntax necessary

  • Adding the ability for the bot to check whether a submission actually meets set constraints for the prompt (minimum or maximum word count, specific text format, etc.)

  • Adding image based prompts

  • Experimenting with GPT or other text generation AIs to partially or fully automate prompt generation

Share this project:

Updates