Automated Action 6f269066a5 Implement task management tool with FastAPI and SQLite
This commit includes:
- Project structure and configuration
- Database models for tasks, users, and categories
- Authentication system with JWT
- CRUD endpoints for tasks and categories
- Search, filter, and sorting functionality
- Health check endpoint
- Alembic migration setup
- Documentation
2025-06-03 07:48:27 +00:00
2025-06-03 07:40:30 +00:00

Task Management Tool

A robust task management application built with FastAPI and SQLite. The application allows users to create, organize, and track tasks with categories, priorities, and due dates.

Features

  • 🔐 User authentication (register, login)
  • Task management (create, read, update, delete)
  • 🏷️ Categories for organizing tasks
  • 🔍 Search, filter, and sorting functionality
  • 🎯 Priority levels for tasks
  • 📅 Due dates for tasks
  • 🔄 Task completion status tracking

Technology Stack

  • Backend: FastAPI
  • Database: SQLite with SQLAlchemy ORM
  • Authentication: JWT with OAuth2
  • Migration: Alembic
  • Validation: Pydantic
  • Code Quality: Ruff

Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Installation

  1. Clone the repository:
git clone <repository-url>
cd taskmanagementtool
  1. Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file based on .env.example:
cp .env.example .env
  1. Run database migrations:
alembic upgrade head

Running the Application

Start the server with uvicorn:

uvicorn main:app --reload

The API will be available at http://localhost:8000

API Documentation

Once the server is running, you can access:

API Endpoints

Authentication

  • POST /api/v1/auth/register - Register a new user
  • POST /api/v1/auth/login - Login and get access token

Users

  • GET /api/v1/users/me - Get current user info
  • PUT /api/v1/users/me - Update current user info

Tasks

  • GET /api/v1/tasks - List all tasks
  • POST /api/v1/tasks - Create a new task
  • GET /api/v1/tasks/{task_id} - Get a specific task
  • PUT /api/v1/tasks/{task_id} - Update a task
  • DELETE /api/v1/tasks/{task_id} - Delete a task

Categories

  • GET /api/v1/categories - List all categories
  • POST /api/v1/categories - Create a new category
  • GET /api/v1/categories/{category_id} - Get a specific category
  • PUT /api/v1/categories/{category_id} - Update a category
  • DELETE /api/v1/categories/{category_id} - Delete a category

Health Check

  • GET /health - Check application health status

Environment Variables

Variable Description Default
SECRET_KEY Secret key for JWT token generation (See .env.example)
ALGORITHM Algorithm used for JWT HS256
ACCESS_TOKEN_EXPIRE_MINUTES Token expiration time in minutes 30
BACKEND_CORS_ORIGINS List of allowed CORS origins []

Database Structure

The application uses three main database models:

  1. User - Stores user information
  2. Task - Stores task details with references to users and categories
  3. Category - Stores category information with references to users

License

This project is licensed under the MIT License - see the LICENSE file for details.

Description
Project: Task Management Tool
Readme 48 KiB
Languages
Python 98.6%
Mako 1.4%