Skip to content

Conversation

@KayvanShah1
Copy link
Owner

📝 PR Description

This PR delivers a major overhaul of the API, focusing on data models, validation, and route structure to support richer task management and frontend integration.

✨ Key Changes

  • User API

    • Added User SQLAlchemy model and relationships
    • Defined Pydantic schemas (UserCreate, UserOut, UserUpdate)
    • Implemented CRUD and registration/profile endpoints
  • Task API

    • Introduced Task SQLAlchemy model with self-referential subtasks
    • Expanded attributes: priority, category, tags, due_date, estimated_hours, etc.
    • Implemented Pydantic schemas (TaskCreate, TaskUpdate, TaskOut, bulk request/response models)
    • Added CRUD routes with better error handling
    • Added bulk operations (/tasks/bulk) for create + status updates
    • Support for nested subtasks creation and retrieval
    • Fixed async lazy-load issues (MissingGreenlet) by using selectinload/noload and refreshing updated_at
  • General Improvements

    • Stronger validation through enums and Pydantic configs
    • API routes designed to be frontend-friendly (consistent responses, bulk-friendly)
    • Documentation examples added for better DX

🚀 Benefits

  • More robust and maintainable data models
  • Easier integration for frontend clients (bulk + nested support)
  • Prevents common async DB pitfalls
  • Sets foundation for future features (filters, tree queries, advanced task analytics)

…ith additional attributes

added support for nested subtasks
feat(task): add bulk create/update status endpoint with TaskBulkRequest/Response
fix(task): ensure eager/noload options to avoid async lazy loading issues
…te/update

fix(task): disable lazy loading (noload/selectinload) to prevent MissingGreenlet errors
fix(task): refresh updated_at and subtasks after commit for safe serialization
@vercel
Copy link

vercel bot commented Sep 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
taskaza Ignored Ignored Sep 30, 2025 0:34am

- rename taskout to taskout tree
- add taskout shallow model to output task trees without subtasks
- add new examples
- use response model return shallow data without subtasks when include tree is set to false and otherwise use tree based response model
- remove redudant documentation
- drop response model exclude args to skip subtask related field
…c_client fixture (before create_all).

Or remove the isinstance(...) guard in the connect listener and call .execute(...) directly.

(Optional) use ?cache=shared + uri=True with StaticPool.
reselect tasks with noload and add a BFS eager loader so create/update/list flows don’t trigger lazy IO during serialization
tighten task/user relationships and SQLite pragmas to enforce cascade deletes and use selectin loading consistently
expose user helpers for fetching by id and deleting accounts
reselect tasks with noload and add BFS eager loader to keep API responses from lazy-loading subtasks
set ondelete=CASCADE, single_parent, and selectin relationships so user/task deletions behave predictably
streamline SQLite pragmas and add CRUD helpers for fetching/deleting users
accept raw enum strings and skip None fields while normalizing payloads
add BFS helper to pre-load full subtask trees and avoid lazy IO on API responses
reselect rows with noload after create/update/status changes to prevent unintended refreshes
…icher feature list, dev server instructions, and local data note
…nt endpoint (auth, user self-service, full tasks suite), switched all URLs to {{base_url}}, and added shared variables for base URL, API key, token, plus template IDs for users/tasks so you can toggle between Render and localhost easily. Import the refreshed collection into Postman and set up two environments (prod/local) with the right base_url, api_key, and runtime values before testing the calls.
@KayvanShah1 KayvanShah1 merged commit a6b99bf into main Sep 30, 2025
3 checks passed
@KayvanShah1 KayvanShah1 deleted the feat-api-update branch September 30, 2025 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants