How gtorrico-fs/task-manager-api works
This is a small FastAPI task-management API. Its demonstrated workflow is an HTTP client submitting a validated task, the endpoint adding a creation timestamp and inserting it into MongoDB, then reading the inserted document and serializing it as the response. Configuration supplies app and database settings. The excerpts show task creation only; no README or source evidence documents other task operations. The MongoDB service is external.
Main entry points: create_task.py Create task · main.py FastAPI app · database.py Database access · router.py API router
Components 9
API routing
- FastAPI app
main.py - API router
api/v1/router.py
Task creation
- Create task
api/v1/endpoints/create_task.py - Task models
schemas/tasks.py - Task serializer
utils/mongo.py
Persistence
- Settings
core/config.py - Database access
core/database.py - MongoDB
Other components
- HTTP client
Connections 10
- HTTP client → FastAPI app: sends request
- FastAPI app → API router: mounts routes
main.py - FastAPI app → Settings: reads settings
main.py - API router → Create task: loads endpoint
api/v1/router.py - Create task → Task models: validates task
api/v1/endpoints/create_task.py - Create task → Database access: gets collection
api/v1/endpoints/create_task.py - Create task → MongoDB: inserts and reads
api/v1/endpoints/create_task.py - Create task → Task serializer: serializes result
api/v1/endpoints/create_task.py - Database access → Settings: reads settings
core/database.py - Database access → MongoDB: opens connection
core/database.py