Blogsy
Multi-user blogging platform
THE CHALLENGE
A multi-user blog needs authentication on every interaction, content that readers can discover, and clean architecture that stays easy to extend.
TECH STACK
Engineering Approach
Modular Flask Architecture
Separated routes, models, and business logic with Flask blueprints so the app can grow without turning into one large file.
Security First
Built authentication with password hashing, session management, and CSRF protection before adding features.
Relational Data Modeling
Modeled users, posts, comments, likes, and tags with SQLAlchemy and explicit relationships.
Real Product Features
Built likes, comments, saved posts, and tag-based discovery, not only create and read.
Key Technical Decisions
The choices that shaped the architecture and how easy it is to maintain.
Flask over Django
Chose Flask for its flexibility.
I wanted full control over the architecture and not a framework's opinionated structure.
SQLAlchemy ORM
Used SQLAlchemy instead of raw SQL.
It gives relationship management and migration support while keeping queries maintainable.
Server-side image processing
Image uploads are validated and processed on the backend.
Consistent image quality and validation before anything is stored.
Session-based auth
Used Flask sessions instead of JWT.
Simpler to secure for a traditional server-rendered web app.
Challenges & Solutions
Many-to-many relationships between users, posts, likes, and saved items were slow to query.
Designed junction tables with indexes and used SQLAlchemy's relationship loading strategies to reduce queries.
Duplicate likes under concurrent requests.
Added database-level unique constraints and used transactions to handle races.
Large image uploads slowed down page loads.
Compressed and resized images on the server with Pillow before storing them.
Outcomes
Blogsy is a multi-user blogging platform with authentication, posts, comments, likes, saved posts, and tag-based discovery.
KEY TAKEAWAYS
Clean separation of concerns in a Flask app pays off immediately. When routes, models, and business logic are isolated, adding a feature is predictable.
