This repository contains a simple TODO application built with FastAPI and PostgreSQL. It allows you to manage tasks with basic CRUD operations (Create, Read, Update, Delete).
Demo.todo.mp4
- Add new tasks
- Mark tasks as completed
- Delete tasks
- Delete completed tasks
-
Clone the repository:
-
Install dependencies:
pip install -r requirements.txt
-
Set up the PostgreSQL database:
Install PostgreSQL if you haven't already Open the PostgreSQL shell or your preferred SQL client Run the following commands:
CREATE DATABASE todo_db; CREATE USER fastapi_user WITH PASSWORD 'password'; GRANT ALL PRIVILEGES ON DATABASE todo_db TO fastapi_user; GRANT ALL PRIVILEGES ON SCHEMA public TO fastapi_user;
-
Configure the database connection:
Open database.py Update the DATABASE_URL with your PostgreSQL credentials:
DATABASE_URL = "postgresql://fastapi_user:password@localhost/todo_db"
-
Running the Application
Start the FastAPI server:
uvicorn backend:app --reload
-
Running the FrontEnd
streamlit run main.py