Skip to content

Text to vertical video in 100+ styles: AI codes each scene (HTML/SVG/WebGL), renders a 9:16 MP4 with music and English/Vietnamese voice. MCP, CLI and REST for AI agents.

Thêm nhóm mẫu "Việt Nam hoá" (viet-nam) cho UI, web và MCP

Lumtek983a0edda6c8
diff --git a/mcp/server.mjs b/mcp/server.mjs
index 159a6fa..27cc0ca 100644
--- a/mcp/server.mjs
+++ b/mcp/server.mjs
@@ -62,8 +62,8 @@ const server = new McpServer({ name: 'lumreels', version: '0.2.0' });
server.registerTool('list_templates', {
title: 'Danh sách mẫu video',
- description: 'Liệt kê mẫu video dọc 9:16 (id, tên, nhóm, mô tả ngắn, độ khó 1–5, kỹ thuật). Lọc theo nhóm (faceless|ads|multi-style) hoặc từ khoá.',
- inputSchema: { category: z.enum(['faceless', 'ads', 'multi-style']).optional(), query: z.string().max(100).optional() },
+ description: 'Liệt kê mẫu video dọc 9:16 (id, tên, nhóm, mô tả ngắn, độ khó 1–5, kỹ thuật). Lọc theo nhóm (faceless|ads|multi-style|viet-nam) hoặc từ khoá.',
+ inputSchema: { category: z.enum(['faceless', 'ads', 'multi-style', 'viet-nam']).optional(), query: z.string().max(100).optional() },
}, async ({ category, query }) => {
const q = (query || '').toLowerCase();
const list = loadCatalog()
diff --git a/server/public/app.js b/server/public/app.js
index a4657cb..f45aee0 100644
--- a/server/public/app.js
+++ b/server/public/app.js
@@ -7,7 +7,7 @@
previewing: 'Đang dựng preview', rendering: 'Đang render', done: 'Xong', error: 'Lỗi',
};
const RUNNING = ['queued', 'generating', 'previewing', 'rendering'];
- const CAT = { faceless: 'Faceless', ads: 'Quảng cáo', 'multi-style': 'Đa phong cách' };
+ const CAT = { faceless: 'Faceless', ads: 'Quảng cáo', 'multi-style': 'Đa phong cách', 'viet-nam': 'Việt Nam hoá' };
const MODE_LABEL = { auto: 'tự động', api: 'Claude API', claude: 'Claude Code', manual: 'agent ngoài' };
const fmtTime = (iso) => new Date(iso).toLocaleString('vi-VN', { hour: '2-digit', minute: '2-digit', day: '2-digit', month: '2-digit', year: 'numeric' });
// datetime-local trả giờ máy không múi giờ → đổi sang ISO có múi giờ để server hiểu đúng.
diff --git a/server/public/index.html b/server/public/index.html
index 5dae790..7edaff6 100644
--- a/server/public/index.html
+++ b/server/public/index.html
@@ -34,6 +34,7 @@
<button class="chip" data-cat="faceless" role="radio" aria-checked="false">Faceless</button>
<button class="chip" data-cat="ads" role="radio" aria-checked="false">Quảng cáo</button>
<button class="chip" data-cat="multi-style" role="radio" aria-checked="false">Đa phong cách</button>
+ <button class="chip" data-cat="viet-nam" role="radio" aria-checked="false">Việt Nam hoá</button>
</div>
<label class="toggle"><input type="checkbox" id="readyOnly" /> Chỉ mẫu dùng được</label>
</div>
diff --git a/server/server.mjs b/server/server.mjs
index dc495fb..b714c76 100644
--- a/server/server.mjs
+++ b/server/server.mjs
@@ -142,7 +142,7 @@ function templateList() {
}
/** Poster SVG cho mẫu chưa có video demo: nền gradient theo id, tên phong cách, nhóm. */
-const CAT_LABEL = { faceless: 'Faceless', ads: 'Quảng cáo', 'multi-style': 'Đa phong cách' };
+const CAT_LABEL = { faceless: 'Faceless', ads: 'Quảng cáo', 'multi-style': 'Đa phong cách', 'viet-nam': 'Việt Nam hoá' };
function posterSvg(t) {
const n = Number(t.id) || 0;
const h1 = (n * 47) % 360, h2 = (h1 + 40 + (n % 5) * 12) % 360;
diff --git a/site/build.mjs b/site/build.mjs
index 84e662f..31d6547 100644
--- a/site/build.mjs
+++ b/site/build.mjs
@@ -32,8 +32,8 @@ const CATALOG = Object.fromEntries(JSON.parse(fs.readFileSync(path.join(ROOT, 't
// Video ở hero: lấy mã đầu tiên có trong danh sách, không có thì lấy điểm cao nhất.
const FEATURED = ['017', '001', '007'];
-const GROUPS = { faceless: 'Kể chuyện faceless', ads: 'Quảng cáo ngành', 'multi-style': 'Kể chuyện faceless' };
-const GROUP_KEY = { faceless: 'faceless', ads: 'ads', 'multi-style': 'faceless' };
+const GROUPS = { faceless: 'Kể chuyện faceless', ads: 'Quảng cáo ngành', 'multi-style': 'Kể chuyện faceless', 'viet-nam': 'Việt Nam hoá' };
+const GROUP_KEY = { faceless: 'faceless', ads: 'ads', 'multi-style': 'faceless', 'viet-nam': 'viet-nam' };
const TECH_LABEL = { '2d': '2D', '3d': '3D', shader: 'Shader' };
// ---------- tiện ích ----------
@@ -206,6 +206,7 @@ function render(items, featured) {
COUNT: String(items.length),
COUNT_FACELESS: String(count('faceless')),
COUNT_ADS: String(count('ads')),
+ COUNT_VN: String(count('viet-nam')),
COUNT_2D: String(techCount('2d')),
COUNT_3D: String(techCount('3d')),
COUNT_SHADER: String(techCount('shader')),
diff --git a/site/src/index.html b/site/src/index.html
index e2c8f5e..dcd048a 100644
--- a/site/src/index.html
+++ b/site/src/index.html
@@ -94,6 +94,7 @@
<button type="button" class="chip" aria-pressed="true" data-value="all">Tất cả <span>{{COUNT}}</span></button>
<button type="button" class="chip" aria-pressed="false" data-value="faceless">Kể chuyện faceless <span>{{COUNT_FACELESS}}</span></button>
<button type="button" class="chip" aria-pressed="false" data-value="ads">Quảng cáo ngành <span>{{COUNT_ADS}}</span></button>
+ <button type="button" class="chip" aria-pressed="false" data-value="viet-nam">Việt Nam hoá <span>{{COUNT_VN}}</span></button>
</div>
<div class="chips" data-filter="tech">
<button type="button" class="chip chip-sm" aria-pressed="true" data-value="all">Mọi kỹ thuật</button>