# backend-service **Repository Path**: zhudonghuiz/backend-service ## Basic Information - **Project Name**: backend-service - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-06 - **Last Updated**: 2025-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Apple FastAPI service for image uploads with a single endpoint that stores files under `uploads/`. ## Prerequisites - Python 3.11+ - [uv](https://github.com/astral-sh/uv) for dependency and run management ## Setup 1. Install dependencies (creates a local virtualenv): `uv sync` 2. Configure environment in `.env` (API keys, database connection, etc.). 3. Ensure the `uploads/` directory is writable; it is created automatically if missing. ## Run - Development: `uv run -m app.main` (FastAPI + Uvicorn on `0.0.0.0:8888`, reload enabled when run directly) - Alternative manual start: `uv run uvicorn app.main:app --host 0.0.0.0 --port 8888 --reload` Interactive docs: http://localhost:8888/docs ## API - `POST /img` - multipart form field `img` (must be `image/*`). Returns `message`, generated `filename`, and `url` placeholder for static serving. Saves the uploaded file to `uploads/`. ## Notes - Uploaded files are stored on disk; add retention/cleanup as needed. - To serve uploaded files publicly, mount `uploads/` as a static route or place behind a CDN/proxy.