What?
Okay, I know how it sounds. Poop social network.
It all started with me and my girlfriend. We were separated back then when the war in Ukraine started, and I decided that creating some kind of app to interchange funny messages would be a good idea.
And then I thought.
What if I broadcast message to all our friends when we poop - and they can react?
And that moment, Poopify was born.
Initially, I thought of it as a website or a progressive web app, but as I own an iPhone, and Apple for one reason or the other - still does not allow PWAs to send push notifications 😤🤬, and as push notifications were part of the core application - this idea was scratched.
Initial website design from Figma
Telegram bot
After scraping the initial idea of making a website - I immediately remembered my previous experience with telegram bots, where I created a chat group by proxy with a telegram bot.
Meaning - every message was sent to a bot, and bot was broadcasting it to other registered users.
I decided on implementing Poopify with python and telegramBotApi. It was actually really easy, I love telegram and their products for the simplicity and documentation. I thought of the next structure for the program.
🐍 Language and API - As I wrote previously, my weapon of choice is python3 booted with pyTelegramBotApi, the best library for this sort of task in my opinion.
🔒 State Storage - A core part of any meaningful telegram bot. Bots do not support listing all the people that contacted them, or their messages, that's why implementation of a state storage system for your bot is an essential task. Usually, I go for LightSQL or PostgreSQL for bigger projects - but I resolved to just use JSON files for data storage on this one.
For some reason, I don't know why, but I just love writing fully-fledged classes, with documentation and all that when I'm making a project in python - That's why I created some sort of a driver for my little JSON database. (Probably would've been simpler to just use SQLite)🤗 Identification - You need to identify each user in some way, to allow for connections and a friends list. Gladly, the telegram has something that is called a "Telegram ID". Each telegram account has one, and I often use them to tie the account to a user. In this instance, I decided that a telegram ID will do for a friend code. Like a nickname. (You can get the users id if you pass any of his or her texts to this bot --> @userinfobot)
And that's how I started working.
It was mostly done after 16 cumulative hours of work. Featuring the main pooping function, as well as the possibility to add friends and react with emojis.
After that, I created a public repo with documentation and instruction on how to run your own Poopify bot. Of course, It still lacks some features, like deleting your profile or unfollowing friends, but it's pretty easy to implement.
Pooping process
Check out the repo here: https://github.com/KonstantinBelenko/PoopifyTelegram
And the Poopify itself is here: https://t.me/poopify_bot
Add me on Poopify, my code is: 863533685