feat: добавить генерацию image variants

- добавлен shared config presets, custom transforms и allowlist hosts
- реализованы Backend endpoints для assets, presets и variants
- добавлена orchestration через PostgreSQL, RabbitMQ, S3 и worker
- обновлён Gateway read-through flow с L1 cache и корректным Vary: Accept
- добавлена миграция resize_mode для variants lookup
- обновлены dev scripts, env template, lockfile и документация
This commit is contained in:
2026-05-05 13:25:28 +03:00
parent bcadb85a83
commit 1c0e8277a3
59 changed files with 3526 additions and 143 deletions

View File

@@ -11,13 +11,16 @@ async function bootstrap() {
const openApiConfig = new DocumentBuilder()
.setTitle("Image Platform API")
.setDescription("Control plane for image assets, variants, S3 storage and external imgproxy.")
.setDescription(
"Backend API для управления image assets, metadata в PostgreSQL, S3 variants, RabbitMQ jobs и генерацией через imgproxy.",
)
.setVersion("0.1.0")
.addTag("system")
.addTag("assets")
.addTag("variants")
.addTag("allowed-hosts")
.addTag("internal-images")
.addTag("system", "Системные endpoints для проверки состояния сервиса.")
.addTag("assets", "Регистрация и управление исходными изображениями.")
.addTag("variants", "Будущие endpoints для управления производными версиями изображений.")
.addTag("allowed-hosts", "Будущие endpoints для управления разрешёнными source hosts.")
.addTag("internal-images", "Внутренние endpoints, которые вызывает Gateway на cache miss.")
.addTag("presets", "Статические presets, custom limits и mock allowlist source hosts.")
.build()
const openApiDocument = SwaggerModule.createDocument(app, openApiConfig)
@@ -29,7 +32,7 @@ async function bootstrap() {
},
})
const port = Number.parseInt(process.env.API_PORT ?? "3001", 10)
const port = Number.parseInt(process.env.BACKEND_PORT ?? process.env.API_PORT ?? "3001", 10)
await app.listen(port)
}