Backend API: auth, projects/images/annotations, R2 presign, tracing, thumbnails, pagination, tests, docs

This commit is contained in:
hailt 2026-11-12 15:12:26 +07:00
parent 5c5deed2f5
commit f8ed08b854
49 changed files with 2626 additions and 0 deletions

22
.env.example Normal file
View file

@ -0,0 +1,22 @@
# Copy to .env and fill secrets. NEVER commit .env.
# R2 = S3-compatible. Endpoint bucket-style:
# https://<account_id>.r2.cloudflarestorage.com
APP_ENV=dev
API_HOST=0.0.0.0
API_PORT=8000
# --- Postgres / Redis (docker-compose provides defaults) ---
DATABASE_URL=postgresql+asyncpg://danable:danable@localhost:5432/danable
REDIS_URL=redis://localhost:6379/0
# --- Auth ---
JWT_SECRET=change-me
JWT_EXPIRE_MINUTES=720
# --- Cloudflare R2 (secret part; non-secret shape lives in config.yaml) ---
R2_ENDPOINT=https://651cefb20bd66d84bd12cb62773b5a97.r2.cloudflarestorage.com
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_BUCKET=danagble
# Optional public/CDN host for direct read links. Empty = presigned URLs only.
R2_PUBLIC_BASE_URL=