A lightweight micro-blogging engine built with Flask and HTMX. This is an educational repository designed for practicing open source contributions.
Flash-Blog is a fully functional micro-blogging application that demonstrates modern web development patterns using:
- Backend: Python 3.13+ with Flask 3.1.2
- Frontend: HTMX 2.0.8 for dynamic interactions without complex JavaScript
- Database: SQLite (supports both in-memory and persistent storage)
- Package Manager: uv for fast dependency management
- User registration and authentication
- Create, edit, and delete blog posts
- Comment system with real-time updates via HTMX
- Full REST API for programmatic access
- Search functionality
- User profiles with bio
- Pagination for posts
This repository contains intentionally seeded issues across different difficulty levels. By working through these issues, you will learn:
- HTTP Methods: Understanding GET, POST, PUT, DELETE in a real application
- Database Operations: SQLite queries, schema design, and proper parameterization
- Session Management: User authentication and secure password handling
- API Design: RESTful endpoints and JSON responses
- Frontend-Backend Integration: Using HTMX for dynamic updates
- Testing: Writing and running pytest tests
- Git Workflows: Forking, branching, pull requests
- Python 3.13 or higher
- uv package manager
- Clone the repository:
git clone https://github.com/anxkhn/flash-blog-workshop.git
cd flash-blog-workshop- Install dependencies using uv:
uv sync- Run the application:
uv run flask --app run:app run- Open your browser at
http://localhost:5000
The application uses SQLite in development mode. For testing, an in-memory database is used automatically.
Set the DATABASE_PATH environment variable:
export DATABASE_PATH=blog.db
uv run flask --app run:app runflash-blog-workshop/
flash_blog/
__init__.py # Application factory
config.py # Configuration settings
database.py # Database utilities
auth/ # Authentication module
__init__.py
routes.py
blog/ # Blog module
__init__.py
routes.py
api/ # REST API module
__init__.py
routes.py
templates/ # Jinja2 templates
base.html
auth/
login.html
register.html
profile.html
blog/
index.html
view.html
create.html
edit.html
user_posts.html
search.html
partials/
comments.html
search_results.html
static/
css/
style.css
tests/ # Test files
conftest.py
test_factory.py
test_database.py
test_auth.py
test_blog.py
test_api.py
pyproject.toml # Project configuration
README.md
CONTRIBUTING.md
LICENSE
Run all tests:
uv run pytestRun specific test file:
uv run pytest tests/test_auth.pyRun with verbose output:
uv run pytest -v| Label | Color | Description |
|---|---|---|
good-first-issue |
Purple | Good for newcomers (15-30 min) |
intermediate |
Yellow | Moderate difficulty (1-2 hours) |
advanced |
Orange | Complex challenge (3-6 hours) |
bug |
Red | Something is not working |
documentation |
Blue | Improvements to docs |
tests |
Cyan | Related to testing |
enhancement |
Cyan | New feature or request |
security |
Red | Security vulnerability |
performance |
Yellow | Performance optimization |
refactoring |
Yellow | Code quality improvements |
ci-cd |
Gray | CI/CD pipeline issues |
For quick edits without local setup:
- Press
.(period) while viewing any file on GitHub - This opens the web-based VS Code editor
- Make your changes and commit directly
See CONTRIBUTING.md for detailed guidelines on:
- Setting up your development environment
- Creating issues and pull requests
- Code style guidelines
- Testing requirements
This project is licensed under the MIT License - see the LICENSE file for details.