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.
- Host: GitHub
- URL: https://github.com/bhola-dev58/smart-task-tracker-api
- Owner: bhola-dev58
- Created: 2025-07-06T17:57:31.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-07-06T18:30:48.000Z (7 months ago)
- Last Synced: 2025-07-06T19:35:31.556Z (7 months ago)
- Topics: fastapi, sqlalchemy-database, sqlite, uvicorn
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
## π 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!