This is a tiny Flask microblog application featuring:
- Create posts with username + timestamp
- Reply to posts OR reply to a specific user
- Replies show “↪ @username”
- Clean HTML + CSS
- No database required (in‑memory storage)
- Super simple to run and extend
You only need Flask:
pip install flask(Optional but recommended: create a venv)
python3 -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # WindowsInside the project folder:
python app.pyVisit:
http://127.0.0.1:5000
microblog/
│── app.py
│── README.md
│── templates/
│ └── index.html
│── static/
└── style.css
{
"id": 1,
"user": "Alice",
"content": "Hello world!",
"time": "2025‑12‑03 12:45:23",
"replies": []
}{
"user": "Bob",
"content": "Nice message!",
"time": "2025‑12‑03 12:48:10",
"reply_to": "Alice"
}Clicking “Reply to ” automatically:
- Fills a hidden input
reply_to="<name>" - Shows “Replying to: ”
- Displays
↪ @<name>in the UI
- Data is not saved permanently (in-memory only).
- Restarting the server clears all posts & replies.
- Perfect for learning or rapid prototyping.
If you want persistence, you can upgrade to SQLite or PostgreSQL—I can generate that version for you.