--- title: DetectifAI Backend emoji: "\U0001F50D" colorFrom: blue colorTo: red sdk: docker app_port: 7860 --- # DetectifAI Backend API AI-powered CCTV surveillance system backend. Runs Flask + PyTorch + YOLO on CPU. ## Features - Video upload & processing (object detection, action recognition) - Fire / weapon / fight / accident / wall-climbing detection - Video captioning with BLIP - Facial recognition with FaceNet - Forensic report generation with local LLM (Qwen2.5-3B) - Stripe subscription management ## Environment Variables (set in Space Settings → Secrets) - `MONGO_URI` — MongoDB Atlas connection string - `MINIO_ENDPOINT` — Cloud object storage endpoint (Cloudflare R2 recommended) - `MINIO_ACCESS_KEY` — Storage access key - `MINIO_SECRET_KEY` — Storage secret key - `MINIO_SECURE` — `true` for HTTPS - `JWT_SECRET` — JWT signing secret - `STRIPE_SECRET_KEY` — Stripe secret key - `FRONTEND_URL` — Vercel frontend URL (for CORS) - `CORS_ORIGINS` — Comma-separated allowed origins