Hi everyone! π
I've been learning Python and wanted to move away from simple console scripts to building real web apps.
I decided to build a tool to solve my own problem: Writer's Block.
I built ViralBot, a Streamlit app that takes a topic (like "Coding" or "SaaS") and generates viral hooks using proven copywriting frameworks (Contrarian, Storytelling, etc.).
π οΈ The Tech Stack
Language: Python 3.9
Frontend: Streamlit
Logic: String formatting & Template lists
π‘ How it works
The app uses a dictionary of templates. When the user selects a "Vibe" (e.g., Contrarian), the Python script maps the user's topic into specific slots in the sentences.
Here is a snippet of the logic:
Python
templates_contrarian = [
"Stop doing {topic} the hard way.",
"Unpopular Opinion: Most advice about {topic} is wrong.",
"Why 99% of people fail at {topic}."
]
When user clicks generate:
for temp in selected_templates:
print(temp.format(topic=user_topic))
Itβs simple, but it works incredibly well for generating LinkedIn and Twitter content fast.
π Try it out
I deployed the app live on Streamlit Cloud. π Link to Live App
π¦ Want the Source Code?
I decided to package up the full project code, including:
The full viral_bot.py script.
The complete database of 50+ viral hooks.
White Label Rights: You can take this code, rebrand it, and sell it to your own clients as a micro-SaaS.
I'm selling the "Starter Kit" for just $9 (the price of a fancy coffee).
β‘ Download the Source Code here
Let me know what you think of the code structure in the comments!
Top comments (1)
maqib395.gumroad.com/l/viralpostbot