An open API service indexing awesome lists of open source software.

https://github.com/bhola-dev58/smart-task-tracker-api

Smart Task Tracker API is a RESTful service built with FastAPI and SQLite that allows users to create, view, update, delete, and filter tasks by completion status. It’s a simple and efficient backend solution for task management applications.
https://github.com/bhola-dev58/smart-task-tracker-api

fastapi sqlalchemy-database sqlite uvicorn

Last synced: 7 months ago
JSON representation

Smart Task Tracker API is a RESTful service built with FastAPI and SQLite that allows users to create, view, update, delete, and filter tasks by completion status. It’s a simple and efficient backend solution for task management applications.

Awesome Lists containing this project

README

          

# πŸ“ Smart Task Tracker API

A lightweight task management system built with **FastAPI**, **SQLite**, and a simple **HTML frontend**. It allows users to create, view, update, and delete tasks through a browser interface.

---

## πŸš€ Features

- RESTful API with FastAPI
- SQLite database (auto-created)
- Full CRUD operations for tasks
- HTML + JavaScript frontend
- Interactive UI (Add, Complete, Delete)
- CORS enabled for smooth frontend-backend communication

---

## πŸ“ Project Structure

```
smart-task-tracker-api/
β”œβ”€β”€ main.py # FastAPI app (routes + CORS)
β”œβ”€β”€ models.py # SQLAlchemy Task model
β”œβ”€β”€ schemas.py # Pydantic schemas
β”œβ”€β”€ database.py # SQLite DB setup
β”œβ”€β”€ index.html # Frontend UI
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ tasks.db # Auto-created DB file
└── README.md # Project guide
```

---

## βš™οΈ Installation & Setup

### 1. Clone the Repository

```bash
git clone https://github.com/bhola-dev58/smart-task-tracker-api.git
cd smart-task-tracker-api
```

### 2. Create and Activate Virtual Environment

```bash
python -m venv myenv
# Activate (Windows)
myenv\Scripts\activate
# Activate (Linux/macOS)
source myenv/bin/activate
```

### 3. Install Dependencies

```bash
pip install -r requirements.txt
```

> Or manually install:
```bash
pip install fastapi uvicorn sqlalchemy
```

---

## ▢️ Run the FastAPI Server

```bash
uvicorn main:app --reload
```

- Visit: [http://127.0.0.1:8000](http://127.0.0.1:8000)
- Docs: [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)

---

## 🌐 Use the HTML Frontend

1. Open `index.html` (double-click or right-click β†’ Open in browser)
2. Use the form to add tasks
3. Click β€œComplete” or β€œDelete” to manage them
4. All actions send requests to your FastAPI API

---

## πŸ§ͺ API Testing (Optional)

Use the Swagger UI:
[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)

Or via curl:

```bash
curl -X POST "http://127.0.0.1:8000/tasks" ^
-H "Content-Type: application/json" ^
-d "{\"title\": \"Read Book\", \"description\": \"Chapter 4\", \"is_completed\": false}"
```

---

## πŸ—‚ View the SQLite Database

1. Install [DB Browser for SQLite](https://sqlitebrowser.org)
2. Open `tasks.db` file
3. Go to β€œBrowse Data” tab β†’ View `tasks` table

---

## πŸ’‘ Notes

- Database auto-creates on first request
- Backend must be running before using the frontend
- If you get CORS issues, ensure CORS middleware is added in `main.py`

---
## Output DEMO

Screenshots


output-test

## πŸ™‹ Author

**Bhola Yadav**
πŸ“± WhatsApp: +91-9198709984
πŸ”— GitHub: [bhola-dev58](https://github.com/bhola-dev58)

---

## πŸ“ƒ License

This project is licensed under the MIT License

---

> πŸš€ Happy Task Tracking!