Flask Vibe Tutorials
Learn Flask + PostgreSQL + Vanilla JS through practical examples
Filters
Transactional Email with Resend
Send welcome emails, password resets, and notifications from Flask using the Resend API. Keep your routes thin with a reusable utils/email.py helper.
Pagination: OFFSET and Cursor-Based
Add page-by-page navigation to any Flask listing with LIMIT/OFFSET, then level up to cursor-based pagination for high-performance lists that never slow down.
Deploying Flask to Railway
Take your Flask + PostgreSQL app from localhost to a live Railway deployment. Covers Procfile, gunicorn, managed database setup, and environment variables.
Full-Text Search with PostgreSQL
Add powerful search to your Flask app using PostgreSQL's built-in tsvector and tsquery — no Elasticsearch, no extra service, no extra cost.
Testing Flask Routes with pytest
Write reliable tests for your Flask routes using pytest and Flask's built-in test client. Covers fixtures, test databases, JSON assertions, and mocking external APIs.
Password Reset Flow
Build a complete forgot-password flow: generate a secure time-limited token, email a reset link, validate it, and update the password safely.
Building a JSON REST API
Build a clean JSON API in Flask with consistent response envelopes, API key authentication via database lookup, and proper HTTP status codes.
Role-Based Access Control with Decorators
Build @login_required and @admin_required decorators from scratch. Understand how functools.wraps works and how to stack decorators cleanly.
Webhook Handling: Stripe and GitHub
Receive and verify webhooks from Stripe and GitHub. Covers signature verification, idempotency, and fast response with background processing.
Rate Limiting with Flask-Limiter
Protect your routes from abuse and brute force attacks with Flask-Limiter. Set per-route limits, customize error responses, and use Redis for production.
CSRF Protection in Flask Forms
Understand CSRF attacks and build your own protection from scratch using Python's secrets module — no library needed for most apps.
Background Tasks with Celery and Redis
Run slow operations (emails, AI calls, report generation) in the background without blocking your Flask responses. A complete Celery + Redis setup.