feat(presets): admin preset stories (premade example videos) end-to-end
Build backend images / build content-svc (push) Failing after 31s
Build backend images / build file-svc (push) Failing after 31s
Build backend images / build gateway (push) Failing after 31s
Build backend images / build identity-svc (push) Failing after 30s
Build backend images / build notification-svc (push) Failing after 30s
Build backend images / build render-svc (push) Failing after 31s
Build backend images / build studio-svc (push) Failing after 31s

Epic A — admins author premade example videos per template; users pick one
on the template detail page to start a pre-filled project.

Backend (content-svc):
- PresetStory DTOs + PresetStoryService (admin CRUD + public published-only
  filter via role check + soft-delete) + PresetStoriesController (/v1/preset-stories)
- DI registration; gateway route /v1/preset-stories (optionalAuth, public read)

Frontend:
- ProjectPresetStories admin authoring UI (name/description/demo upload/published/
  sort + scene picker with order+duration + advanced scenes_spa); «ویدیوهای نمونه»
  button + modal in ProjectsAdmin
- TemplateDetailExamples renders real published stories (image/video preview,
  hover → "use this example" → creates a pre-bound project), falls back to
  placeholders when none; selected aspect's variant id keys the fetch
- public /api/preset-stories route; preset_story_id plumbed through
  createProjectFromTemplate + projects POST route; usePreset i18n (fa+en)

Verified: full CRUD via gateway (public hides unpublished); creating a project
with presetStoryId persists selected_preset_story_id on the saved project.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-11 05:24:14 +03:30
parent 23624f7db9
commit ab568c0663
14 changed files with 550 additions and 23 deletions
+2 -1
View File
@@ -617,7 +617,8 @@
"mostPopular": "Most Popular"
},
"componentsTemplatesTemplateDetailExamples": {
"heading": "Videos created using this template"
"heading": "Videos created using this template",
"usePreset": "Use this example"
},
"componentsTemplatesTemplateDetailInfo": {
"sceneCount": "{count} scenes",
+2 -1
View File
@@ -617,7 +617,8 @@
"mostPopular": "محبوب‌ترین"
},
"componentsTemplatesTemplateDetailExamples": {
"heading": "ویدیوهای ساخته‌شده با این قالب"
"heading": "ویدیوهای ساخته‌شده با این قالب",
"usePreset": "استفاده از این نمونه"
},
"componentsTemplatesTemplateDetailInfo": {
"sceneCount": "{count} صحنه",