--- title: KeyVault Marketplace API emoji: 🛒 colorFrom: purple colorTo: blue sdk: docker app_port: 7860 pinned: false --- # KeyVault Digital Marketplace — Backend API FastAPI backend for the KeyVault multi-vendor digital goods marketplace. ## Endpoints - `GET /health` — health check - `GET /docs` — interactive Swagger UI - `/api/v1/auth/*` — register, login, me - `/api/v1/products/*` — product catalog - `/api/v1/store/*` — storefront (browse, categories) - `/api/v1/orders/*` — order management - `/api/v1/seller/*` — seller dashboard - `/api/v1/admin/*` — admin panel ## Environment Variables (set as Space Secrets) | Variable | Description | |----------|-------------| | `DATABASE_URL` | PostgreSQL connection string (`postgresql+asyncpg://...`) | | `JWT_SECRET` | Secret key for JWT signing | | `JWT_ALGORITHM` | `HS256` | | `JWT_EXPIRY_HOURS` | `24` | | `ENCRYPTION_KEY` | 32-char key for product key encryption | | `ALLOWED_ORIGINS` | Comma-separated list of allowed frontend URLs | | `APP_ENV` | `production` | | `DEBUG` | `false` |