Skip to content

gmlrep/tasker

Repository files navigation

Tasker API

FastAPI task manager with JWT cookie auth, Redis refresh tokens, and PostgreSQL.

Requirements

  • Python 3.12+
  • uv
  • PostgreSQL 16+
  • Redis 7+

Setup

  1. Copy environment file:
cp example.env .env
  1. Generate JWT keys:
mkdir -p certs
openssl genrsa -out certs/jwt-private.pem 2048
openssl rsa -in certs/jwt-private.pem -pubout -out certs/jwt-public.pem
  1. Install dependencies:
uv sync --group dev
  1. Run migrations:
uv run alembic upgrade head
  1. Start the API:
uv run python -m app

API docs: http://localhost:9000/docs

Docker

docker compose up --build

Tests

uv run coverage run -m pytest tests -v
uv run coverage report -m --fail-under=80

Project layout

app/
  api/v1/endpoints/   # HTTP routes
  core/               # config, DI, security, database
  models/             # SQLAlchemy models
  repository/         # data access layer
  services/           # business logic
  schemas/            # Pydantic DTOs
  migrations/         # Alembic migrations
tests/
  unit_tests/
  integration_tests/

API endpoints

  • POST /api/v1/users/auth/register
  • POST /api/v1/users/auth/login
  • POST /api/v1/users/refresh
  • POST /api/v1/users/logout
  • GET /api/v1/tasks/
  • POST /api/v1/tasks/
  • DELETE /api/v1/tasks/delete_task
  • PATCH /api/v1/tasks/update_task_status

About

API for task management with FastAPI

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors