FastAPI User Task Management

This is a simple User Task Management API built with FastAPI and MongoDB.

Features

  • Creating a new user
  • Add tasks to a user
  • Fetch tasks of a user
  • Update tasks of a user
  • Delete tasks of a user

Installation

  1. Clone the repository
  2. Install the dependencies with pip install -r requirements.txt
  3. Run the server with uvicorn main:app --reload

Database Schema

User Collection

  • _id: ObjectId (automatically generated by MongoDB)
  • name: string
  • tasks: dictionary (key is task name, value is task status)

Task Model

  • user_id: string
  • task: string
  • status: bool

Future Improvements

  • Add authentication and authorization