A full-stack Todo tracking app built with FastAPI + PostgreSQL + Jinja2. Supports authentication, CRUD for tasks, and priority/complete tracking.
✅ User authentication (login / register / logout) ✅ Create, edit, update and delete tasks ✅ Mark tasks as complete with strike-through ✅ Priority levels (1–5) ✅ PostgreSQL + Alembic migrations ✅ Bootstrap-powered frontend
- Backend: FastAPI, SQLAlchemy, Alembic
- Database: PostgreSQL
- Frontend: Jinja2 + Bootstrap
- Auth: OAuth2 password flow
git clone https://github.com/your-username/todoapp.git
cd todoapp
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
pip install -r requirements.txt
In database.py
, update the connection string with your postgres password:
POSTGRESQL_DATABASE_URL="postgresql://postgres:{your_password_here}@localhost/ToDoApplicationDatabase"
Run migrations:
alembic upgrade head
If you want to generate a new migration:
alembic revision --autogenerate -m "message"
alembic upgrade head
For rolling back database migrations:
alembic downgrade -1
uvicorn main:app --reload
App runs at 👉 http://127.0.0.1:8000
TODOAPP/
│── alembic/ # Alembic migration files to safely change database structure without deleting the database
│── routers/ # API routes, including user, admin, authentication and todo related functionality
│── static/ # CSS/JS/Assets. NOTE that frontend was not the focus of this project, so a lot is downloaded here
│── templates/ # HTML Jinja templates for the webpages and the navbar
│── test/ # Tests using the pytest library, including an example file covering basic uses of pytest
│── database.py # DB connection setup
│── models.py # SQLAlchemy models for the users and todos tables
│── main.py # FastAPI entrypoint
│── alembic.ini # Alembic config
│── requirements.txt
│── .gitignore
│── README.md
- Research deployment on Render (or similar cloud services)
- Improve frontend design for a more polished UI/UX (Bootstrap or React)