How froov30/task-tracker-rest-api works
Task Tracker is a multi-user REST API. Clients register or authenticate, then manage only their own tasks through a versioned HTTP API; task operations enforce ownership, lifecycle transitions, and optimistic concurrency, with mutations recorded in an audit trail. The main internal layers are routers, services, and repositories, backed by async SQLAlchemy models and PostgreSQL. The README documents rate limiting, structured request logging, health probes, pagination/filtering/sorting, soft-delete restoration, and migrations. Some subsystem links below rely on README statements because their implementations were not excerpted.
Main entry points: main.py FastAPI App · dependencies.py Dependency Wiring · auth_service.py Auth Service · tasks.py Task Routes
Components 23
HTTP API
- FastAPI App
app/main.py - Task Routes
app/routers/tasks.py - Auth Routes
app/routers/auth.py - User Routes
app/routers/users.py - Health Probes
app/routers/health.py - Legacy Redirects
app/routers/legacy_redirects.py - API Schemas
app/schemas - Dependency Wiring
app/dependencies.py
Business Services
- Task Service
app/services/task_service.py - Auth Service
app/services/auth_service.py - JWT Security
app/security.py
Persistence
- Task Repository
app/repositories/task_repository.py - User Repository
app/repositories/user_repository.py - History Repository
app/repositories/history_repository.py - ORM Models
app/models/orm.py - DB Sessions
app/database.py
Request Operations
- Rate Limiting
app/rate_limit.py - Request Middleware
app/middleware.py - Structured Logging
app/logging_config.py - Error Responses
app/error_handlers.py - Settings
app/config.py
Other components
- HTTP Client
- PostgreSQL
Connections 37
- HTTP Client → FastAPI App: sends requests
README.md - FastAPI App → Rate Limiting: registers limiter
app/main.py - FastAPI App → Request Middleware: installs middleware
app/main.py - Request Middleware → Structured Logging: uses logging
app/middleware.py - FastAPI App → Structured Logging: configures logging
app/main.py - FastAPI App → Error Responses: registers handlers
app/main.py - Error Responses → API Schemas: formats errors
app/error_handlers.py - FastAPI App → Task Routes: registers routes
app/main.py - FastAPI App → Auth Routes: registers routes
app/main.py - FastAPI App → User Routes: registers routes
app/main.py - FastAPI App → Health Probes: registers routes
app/main.py - FastAPI App → Legacy Redirects: registers routes
app/main.py - Task Routes → Dependency Wiring: requests dependencies
app/routers/tasks.py - Auth Routes → Auth Service: calls service
app/routers/auth.py - Task Routes → Task Service: calls service
app/routers/tasks.py - User Routes → Dependency Wiring: uses dependencies
app/dependencies.py - Dependency Wiring → DB Sessions: injects sessions
app/dependencies.py - Dependency Wiring → Task Service: constructs service
app/dependencies.py - Dependency Wiring → Auth Service: constructs service
app/dependencies.py - Dependency Wiring → Task Repository: constructs repository
app/dependencies.py - Dependency Wiring → User Repository: constructs repository
app/dependencies.py - Dependency Wiring → History Repository: constructs repository
app/dependencies.py - Dependency Wiring → Auth Service: resolves user
app/dependencies.py - Task Service → Task Repository: queries tasks
app/services/task_service.py - Task Service → History Repository: records audit
app/services/task_service.py - Auth Service → User Repository: queries users
app/services/auth_service.py - Auth Service → JWT Security: hashes and validates tokens
app/services/auth_service.py - Task Repository → ORM Models: queries models
app/repositories/task_repository.py - User Repository → ORM Models: queries models
app/repositories/user_repository.py - History Repository → ORM Models: queries models
app/repositories/history_repository.py - DB Sessions → PostgreSQL: connects to
README.md - ORM Models → PostgreSQL: maps persisted tables
README.md - Rate Limiting → Settings: reads limits
app/rate_limit.py - JWT Security → Settings: reads JWT settings
app/security.py - Health Probes → DB Sessions: checks readiness
app/routers/health.py - Health Probes → Rate Limiting: reports limiter
app/routers/health.py - Task Routes → API Schemas: validates task payloads
app/routers/tasks.py