Automated Action 4b391fe54b Enhance todo app with advanced features
- Add User model with email-based authentication
- Add Tag model with many-to-many relationship to todos
- Add TodoTag junction table for todo-tag relationships
- Enhance Todo model with priority levels (low, medium, high)
- Add due_date field with datetime support
- Add recurrence_pattern field for recurring todos
- Add parent-child relationship for subtasks support
- Create comprehensive alembic migration for all changes
- Add proper indexes for performance optimization
- Use Text type for todo descriptions
- Implement proper SQLAlchemy relationships and foreign keys
2025-06-19 12:49:26 +00:00
2025-06-19 12:05:38 +00:00

Todo App Backend

A simple todo application backend built with FastAPI and SQLite.

Features

  • Create, read, update, and delete todos
  • RESTful API endpoints
  • SQLite database with SQLAlchemy ORM
  • Database migrations with Alembic
  • Automatic API documentation with Swagger UI
  • CORS support for cross-origin requests

API Endpoints

  • GET / - Root endpoint with API information
  • GET /health - Health check endpoint
  • POST /todos/ - Create a new todo
  • GET /todos/ - Get all todos (with pagination)
  • GET /todos/{todo_id} - Get a specific todo
  • PUT /todos/{todo_id} - Update a todo
  • DELETE /todos/{todo_id} - Delete a todo

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. The application will automatically create the database tables when started.

Usage

Start the application:

uvicorn main:app --reload

The API will be available at:

Database

The application uses SQLite database stored at /app/storage/db/db.sqlite. The database schema is managed with Alembic migrations.

Todo Schema

Each todo has the following fields:

  • id: Unique identifier
  • title: Todo title (required)
  • description: Optional description
  • completed: Boolean status (default: false)
  • created_at: Creation timestamp
  • updated_at: Last update timestamp
Description
Project: Todo App Backend
Readme 44 KiB
Languages
Python 97.7%
Mako 2.3%