How yuvrajbhadoria/taskmanager-basic-fastapi-backend-project- works
Task Manager API is a FastAPI backend for account registration/login and authenticated, user-owned task CRUD. Clients submit credentials or Bearer tokens; routers invoke services, which delegate to repository functions backed by a shared PostgreSQL connection pool. Login issues short-lived JWTs, while a dependency decodes tokens and retrieves the user before protected task operations. The README also documents Swagger UI and error handling. Relationships below are limited to the sampled source and explicit README statements; unsampled implementation details are not inferred.
Main entry points: tasks.py Task routes · users.py Account routes · main.py FastAPI app · auth.py Token validation
Components 13
HTTP API
- FastAPI app
main.py - Account routes
routers/users.py - Task routes
routers/tasks.py
Authentication
- Token validation
routers/auth.py
Services and models
- User service
services/userService.py - Task service
services/taskService.py - User schemas
models/users.py - Task schemas
models/task.py
Persistence
- User repository
data/user.py - Task repository
data/task.py - Connection pool
data/connection_pool.py
Other components
- API client
- PostgreSQL
Connections 17
- API client → FastAPI app: sends requests
README.md - FastAPI app → Task routes: registers router
main.py - FastAPI app → Account routes: registers router
main.py - Account routes → User service: delegates account work
routers/users.py - Account routes → User schemas: validates account data
routers/users.py - Task routes → Token validation: requires current user
routers/tasks.py - Task routes → Task service: delegates task operations
routers/tasks.py - Task routes → Task schemas: validates task data
routers/tasks.py - Token validation → User service: looks up user
routers/auth.py - Token validation → User schemas: returns user schema
routers/auth.py - User service → User repository: delegates user operations
services/userService.py - Task service → Task repository: delegates task operations
services/taskService.py - User repository → Connection pool: acquires connection
data/user.py - Task repository → Connection pool: acquires connection
data/task.py - Connection pool → PostgreSQL: connects to
data/connection_pool.py - Account routes → API client: returns access token
README.md - API client → Task routes: sends Bearer token
README.md