This project is a Flask-based REST API application that demonstrates modern backend development practices with:
- User Authentication & Password Security (using Bcrypt with OOPs encapsulation)
- Todo Management system with relational mapping
- Fetching external data from
JSONPlaceholderAPI and saving into local database - Complete CRUD operations for both Users & Todos
- API Documentation powered by Swagger UI
| Backend | Flask, Flask-RESTful, Blueprints |
| Database | SQLAlchemy (SQLite/MySQL/Postgres ready) |
| Security | Flask-Bcrypt for password hashing |
| Documentation | Swagger UI |
| Concepts | OOPs Principles (Encapsulation, Methods in Classes, Reusable Models) |
project/ βββ app/ β βββ __init__.py # App Factory β βββ models.py # User & Todo Models (OOPs applied) β βββ routes/ β β βββ api.py # Todo APIs (CRUD + External API) β β βββ user.py # User Registration & Authentication β βββ docs.py # Swagger Documentation β βββ migrations/ # Database migrations βββ requirements.txt # Dependencies βββ run.py # Entry point
- User APIs: Register, Login, Password Security with Hashing
- Todo APIs: Create, Read, Update, Delete Todos
- External Data: Fetch todos from JSONPlaceholder and save into DB
- Swagger: Interactive API docs at
/swagger
GET /api/todo # Fetch all todos (from DB)
POST /api/todo/fetch # Fetch & Save from JSONPlaceholder
POST /api/users/register # Create a new user
POST /api/users/login # Authenticate user