Communitygithub.com

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Infra de pagamento Sepay VietQR ponta a ponta para landing page Next.js — guia o usuário na configuração de conta Sepay, vinculação bancária e scaffolding do fluxo de pagamento completo no projeto.

O que é MKT.LANDINGPAGE.SKILLS?

Esta skill constrói toda a infraestrutura de pagamento para uma landing page Next.js usando Sepay, um gateway de pagamento VietQR vietnamita. Ela gerencia sete fases: detecção do stack Next.js e escolha do provedor de armazenamento de leads (Vercel KV ou Supabase Free), configuração guiada de conta Sepay com vinculação bancária, setup do provedor escolhido, scaffolding de uma camada de abstração de armazenamento de leads, criação das rotas de API de checkout e webhook, e incorporação do QR code VietQR na página de destino. A skill é útil para desenvolvedores que precisam de uma solução de pagamento automatizada para produtos digitais, cursos ou coaching, aceitando transferências bancárias locais via VietQR sem exigir que o cliente se cadastre. Ela suporta Next.js com App Router ou Pages Router e TypeScript, e recomenda Supabase Free como padrão por seu tier gratuito mais generoso e recursos de SQL. O fluxo de trabalho inclui webhook para verificação automática de pagamentos, lógica de deduplicação e expansão futura para notificações por e-mail/Telegram.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lexuanthanhhy/MKT.LANDINGPAGE.SKILLS/tree/main/.claude/skills/biz-setup-sepay-payment

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Biz Setup Sepay Payment — Infra de pagamento VietQR ponta a ponta para Next.js

Esta skill constrói toda a infraestrutura de pagamento para landing page Next.js usando Sepay (gateway de pagamento VietQR do Vietnã). Após a conclusão: cliente preenche formulário → cria pedido → escaneia QR → transfere → webhook Sepay chega → verifica + consulta lead + dispara e-mail/Telegram. Tudo automatizado, sem necessidade de confirmação manual do admin.

Filosofia: Sepay é o caminho de menor resistência para VN — VietQR + API bancária nativa, sem necessidade de cadastro do cliente, escaneie o QR com o app bancário já instalado. Taxa de 1,5-2% mais barata que Stripe (4-5%), liquidação T+1, tier gratuito razoável para landing pages com <100 pedidos/mês.

Por que um armazenamento de leads: O webhook do Sepay só envia content (texto que o cliente colou na transferência) + valor. O Sepay NÃO sabe quem é o cliente. É necessário um armazenamento local de leads para mapear content → lead {nome, telefone, email, produto, valor}.

2 opções de armazenamento de leads — o usuário escolhe na Fase 0:

  • Vercel KV (Upstash Redis) — configuração em 2 minutos, TTL nativo, gratuito com 30K comandos/mês → < 500 pedidos/mês
  • Supabase Free (Postgres) — configuração em 5 minutos, consultas SQL + Studio UI, tier gratuito ~50× maior → < 2000 pedidos/mês. RECOMENDADO.

Rotas de API (/api/checkout, /api/sepay-webhook, /api/admin/leads) são independentes de provedor através de lib/leads-store.ts com re-export simples. Mudar de provedor depois = alterar 1 linha.

A skill NÃO registra a conta Sepay para o usuário (requer KYC empresarial + banco). A skill guia o usuário passo a passo e depois integra todo o código.


Quando usar esta skill

  • O usuário está lançando um produto digital / curso / coaching e precisa receber pagamentos online.
  • O usuário já tem uma landing page Next.js (através de ui-ux-pro-max ou similar) e quer adicionar fluxo de pagamento.
  • O usuário está prestes a integrar biz-email-setup ou biz-telegram-payment-notify mas ainda não tem infra de pagamento → esta skill é o PRÉ-REQUISITO.

NÃO use esta skill quando:

  • O usuário usa Stripe/PayPal (pagamento internacional com cartão) → caso de uso diferente.
  • O usuário aceita transferência bancária manual + verificação manual (baixa escala, não recomendado).
  • O usuário já tem infra de pagamento e só precisa de notificação → vá direto para /biz-email-setup ou /biz-telegram-payment-notify.

Fluxo de trabalho geral (7 fases)

Fase 0: DETECTAR stack Next.js + PERGUNTAR provedor (KV / Supabase) — PORTÃO
       ↓
Fase 1: GUIAR usuário na configuração da conta Sepay — PORTÃO manual aguardando usuário
       ↓
Fase 2A (se KV): CONFIGURAR Vercel KV (instalar pacote + variáveis de ambiente + namespace KV)
Fase 2B (se Supabase): CONFIGURAR Supabase (criar projeto + migration SQL + service_role)
       ↓
Fase 3: CRIAR lib/leads-store.ts (wrapper de re-export) + lib/leads-{kv|supabase}.ts (implementação)
       ↓
Fase 4: CRIAR rota /api/checkout (formulário → pedido → armazenar)
       ↓
Fase 5: CRIAR rota /api/sepay-webhook (verificar + consultar + placeholders de efeitos colaterais)
       ↓
Fase 6: EMBUTIR VietQR na landing page (escolher 1 dos 3 padrões de UX)
       ↓
Fase 7: Plano de teste em 5 níveis (armazenamento → checkout → webhook → produção → (apenas Supabase) cron ping)

Fases 0 e 1 têm portão aguardando usuário. Fases 2/3/4/5/6 a skill executa ativamente.


Fase 0 — Detectar stack Next.js + escolher provedor

0.1 Detectar stack

test -f next.config.js -o -f next.config.mjs -o -f next.config.ts && echo "Next.js: ✓"
test -d app && echo "Router: App"
test -d pages && echo "Router: Pages"
test -f tsconfig.json && echo "TS: ✓"
test -f pnpm-lock.yaml && echo "pkg: pnpm" || test -f yarn.lock && echo "pkg: yarn" || echo "pkg: npm"

Se não for Next.js: PARE. Avise: "Esta skill atualmente só suporta Next.js. Seu stack atual é [X]. Devo portar a lógica para Vite/estático com Vercel function?" — aguarde usuário.

Se ambos app/ e pages/: pergunte ao usuário qual está usando.

0.2 Verificar infra existente

ls app/api/ pages/api/ lib/ 2>/dev/null
grep -E '"@vercel/kv"|"@supabase/supabase-js"|"@upstash/redis"' package.json
grep -E "SEPAY|KV_REST|SUPABASE_" .env.local 2>/dev/null

0.3 PERGUNTAR ao usuário escolher provedor

Eu detectei que você está usando Next.js [App/Pages] Router + TypeScript + [pnpm/yarn/npm].

Onde você quer armazenar os leads?

1. Vercel KV (Upstash Redis)
   ✓ Configuração rápida em 2 minutos (1 clique no dashboard Vercel)
   ✓ TTL nativo — sem preocupação com pausa do projeto
   ✗ Gratuito apenas 30K comandos/mês → ~500 pedidos/mês
   ✗ Sem SQL — filtros de admin complexos e difíceis

2. Supabase Free (Postgres) — RECOMENDADO
   ✓ Tier gratuito mais generoso (500MB DB + 5GB banda, consultas ilimitadas)
   ✓ Postgres = consultas SQL poderosas, Supabase Studio UI bonito para visualizar dados
   ✓ TypeScript com tipos gerados automaticamente
   ✓ Configuração em 5 minutos (Console + colar 2 variáveis de ambiente)
   ⚠ Projeto pausa automaticamente após 7 dias de inatividade → vou configurar Vercel Cron ping `/api/health` a cada 6 dias para corrigir
   ⚠ TTL manual via pg_cron (já configurado na migration SQL)
   → Adequado para < 2000 pedidos/mês, fácil de escalar funcionalidades de admin

Você escolhe 1 ou 2?

PORTÃO: NÃO vá para a Fase 1 até o usuário escolher. Sugira Supabase como padrão, mas force uma escolha explícita.

Após o usuário escolher, resuma o plano:

Você escolheu [Vercel KV / Supabase]. Eu vou:

  1. Orientá-lo na configuração da conta Sepay (5-10 minutos)
  2. Configurar o armazenamento de leads conforme o provedor escolhido
  3. Integrar o código: lib/leads-store.ts + /api/checkout + /api/sepay-webhook + incorporar VietQR
  4. Testar

Pronto para ir para a Fase 1?


Fase 1 — Orientar usuário na configuração da conta Sepay

Consulte references/sepay-account-setup.md para o guia completo. Resumo em 5 passos para o usuário:

Passo 1 — Registrar em my.sepay.vn

  1. Acesse https://my.sepay.vn → Cadastre-se
  2. Preencha telefone, e-mail, senha → verifique OTP
  3. Complete o perfil: Nome completo + CPF (pessoa física) ou CNPJ (empresa)

Passo 2 — Vincular conta bancária

Dashboard → Contas bancárias → Adicionar conta:

  • Escolha o banco (Vietcombank, Techcombank, MB, ACB, VPBank, BIDV, VietinBank, TPBank, ...)
  • Digite o número da conta + nome do titular (deve corresponder ao app do banco)
  • Verificação automática (via API do banco) ou manual (transfira 1.000-10.000đ com código de verificação fornecido pelo Sepay)

Passo 3 — Obter chave de API

Dashboard → Configurações → API & Webhook → Criar nova chave de API:

  • Nome: landing-page-prod
  • Permissões: webhook:read
  • Copie a chave (mostrada apenas uma vez)

Passo 4 — Configurar URL do webhook

Na mesma página → Webhook → Adicionar webhook:

  • URL: https://seu-dominio.vn/api/sepay-webhook (ficará ativo após o deploy)
  • Auth: API Key → cole a chave recém-criada
  • Eventos: transaction:incoming
  • Salvar

⚠️ Desenvolvimento local: use ngrok para expor localhost:3000 para testes com Sepay.

Passo 5 — Colar para a skill

SEPAY_WEBHOOK_API_KEY=sk_xxxxxxxxxxxxxxxxxxxx
SEPAY_BANK_ACCOUNT_NUMBER=1023456789
SEPAY_BANK_NAME=Vietcombank
SEPAY_ACCOUNT_NAME=NGUYEN VAN A

PORTÃO: NÃO vá para a Fase 2 até o usuário colar todos os dados.


Fase 2A — Configurar Vercel KV (apenas se o usuário escolheu KV na Fase 0)

Vercel KV = Upstash Redis gerenciado. Gratuito com 30K comandos/mês.

2A.1 Criar namespace KV

Dashboard Vercel → Projeto → Storage → Create Database → KV (Redis) → nome sepay-leads → Criar.

Gera automaticamente 4 variáveis de ambiente:

KV_URL=...
KV_REST_API_URL=...
KV_REST_API_TOKEN=...
KV_REST_API_READ_ONLY_TOKEN=...

Clique em Connect to Project → Vercel injeta as variáveis (Production + Preview + Development).

2A.2 Puxar variáveis para o ambiente local

npm i -g vercel    # se ainda não tiver
vercel link
vercel env pull .env.local

2A.3 Instalar pacote

pnpm add @vercel/kv  # ou yarn / npm install

2A.4 Verificar

node -e "
const { kv } = require('@vercel/kv');
kv.set('test', 'hello').then(() => kv.get('test')).then(v => {
  console.log('KV OK:', v);
  return kv.del('test');
});
"

Espere KV OK: hello. Vá para a Fase 3.


Fase 2B — Configurar Supabase Free (apenas se o usuário escolheu Supabase na Fase 0)

Consulte references/supabase-setup.md para o guia completo detalhado em 6 passos. Resumo:

2B.1 Criar conta e projeto Supabase

  1. https://supabase.com → Start your project → Login com GitHub
  2. New project:
    • Nome: sepay-leads-<marca>
    • Senha do banco: clique em Generate → salve
    • Região: ⚠️ Southeast Asia (Singapore) (padrão us-east com latência 250ms+)
    • Preço: Free
  3. Aguarde ~2 minutos de provisionamento

2B.2 Executar migration SQL

Barra lateral → SQL Editor → New query → cole o conteúdo de templates/supabase-migration.sql → Run.

Cria 4 tabelas + índices + função next_order_id() + habilita RLS + job diário de limpeza pg_cron.

Verifique a saída: 4 tabelas (leads/phone_index/order_counter/webhook_dedup) + 1 job pg_cron + next_order_id() retornando "DH000001".

Reinicie o contador (já que a verificação o incrementou):

UPDATE order_counter SET current_value = 0 WHERE id = 1;
DELETE FROM leads WHERE order_id = 'DH000001';

2B.3 Obter credenciais da API

Project Settings → API:

  • Copie Project URL (https://xxxxx.supabase.co)
  • Copie o segredo service_role (NÃO a chave anon — service_role bypassa RLS, usada no servidor)

2B.4 Colar variáveis de ambiente

SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJI...

A skill verifica automaticamente:

  • URL corresponde a ^https://[a-z0-9]+\.supabase\.co$
  • Chave decodifica JWT, verifica role: "service_role" (NÃO anon)

Se incorreto → avise o erro, peça para colar novamente.

2B.5 Instalar pacote

pnpm add @supabase/supabase-js

2B.6 Configurar Vercel Cron ping (evitar pausa)

O Supabase Free pausa automaticamente após 7 dias de inatividade. Solução alternativa: ping /api/health a cada 6 dias.

A skill cria app/api/health/route.ts (a partir de templates/api-health-route.ts) + adiciona ao vercel.json com:

{
  "crons": [
    { "path": "/api/health", "schedule": "0 3 */6 * *" }
  ]
}

⚠️ Vercel Cron Hobby tem limite de 2 cron/mês. O padrão */6 days = ~5 execuções/mês → excede a cota. Opções:

  1. Vercel Pro ($20/mês) — cron ilimitado
  2. GitHub Actions workflow .github/workflows/keep-alive.yml (GRATUITO) — a skill cria se detectar repositório GitHub remoto
  3. cron-job.org (FREE) — configuração manual, cole a URL /api/health

A skill escolhe a opção 2 (GitHub Actions) por padrão se o repositório tiver .git/config com remote GitHub. Caso contrário, exibe instruções da opção 3.

2B.7 Verificar

node -e "
const { createClient } = require('@supabase/supabase-js');
const sb = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_ROLE_KEY);
sb.from('order_counter').select('current_value').eq('id', 1).single().then(r => {
  if (r.error) { console.error('FALHA:', r.error.message); process.exit(1); }
  console.log('Supabase OK. current_value =', r.data.current_value);
});
"

Espere Supabase OK. current_value = 0. Vá para a Fase 3.


Fase 3 — Criar lib/leads-store.ts + implementação

Abstração do provedor: as rotas de API importam de lib/leads-store.ts, sem saber se o subjacente é KV ou Postgres.

Se escolheu KV (Fase 0)

Crie 2 arquivos:

  • lib/leads-store.ts ← copie templates/lib-leads-store-kv.ts (1 linha export * from './leads-kv')
  • lib/leads-kv.ts ← copie templates/lib-leads-kv.ts (implementação KV, ~160 linhas)

Se escolheu Supabase

Crie 3 arquivos:

  • lib/leads-store.ts ← copie templates/lib-leads-store-supabase.ts (re-export Supabase)
  • lib/leads-supabase.ts ← copie templates/lib-leads-supabase.ts (implementação Postgres + listLeads para admin)
  • lib/supabase-admin.ts ← copie templates/lib-supabase-admin.ts (cliente admin em cache singleton com service_role)

Interface COMUM da API (ambas as implementações):

  • createLead(input) → { orderId, lead } — ID atômico + inserção + índice secundário
  • getLeadByOrderId(orderId) → Lead | null
  • getLeadByPhone(phone) → Lead | null — consulta de fallback
  • findPendingLeadByAmountAndTime(amount, start, end) → Lead[] — Estratégia 3 de correspondência de webhook
  • markLeadPaid(orderId, payment) → Lead | null
  • isTransactionProcessed(sepayId) → boolean — deduplicação
  • markTransactionProcessed(sepayId) → void

TTL: 7 dias pendente / 90 dias pago. KV via parâmetro ex:. Supabase via campo expire_at + job diário pg_cron.

Mudar de provedor depois = alterar 1 linha em leads-store.ts (NÃO mexa no código da API).

Consulte references/leads-kv-schema.md (KV) ou references/supabase-leads-schema.md (Supabase) para a lógica detalhada.


Fase 4 — Criar rota /api/checkout

Consulte templates/api-checkout-app-router.ts (App Router) ou templates/api-checkout-pages-router.ts (Pages Router). Copie para o caminho correspondente.

Ambos os templates import { createLead } from '@/lib/leads-store' — independente de provedor.

Fluxo:

Cliente POST /api/checkout { name, phone, email, productName, amount }
  ↓
Servidor:
  1. Validar (formato de telefone VN, regex de email, amount > 0)
  2. createLead() → { orderId: "DH000123" }
  3. Gerar URL do QR Sepay: https://qr.sepay.vn/img?acc=X&bank=Y&amount=Z&des=DH000123&template=compact
  4. Retornar { orderId, amount, bankInfo, content, qrUrl }
  ↓
Cliente: exibir modal QR OU redirecionar para /checkout/DH000123

Fase 5 — Criar rota /api/sepay-webhook

Consulte templates/api-sepay-webhook-app-router.ts. Copie para app/api/sepay-webhook/route.ts.

O template import ... from '@/lib/leads-store' — independente de provedor.

Fluxo:

Sepay POST /api/sepay-webhook
  Authorization: Apikey {SEPAY_WEBHOOK_API_KEY}
  Body: SepayWebhookPayload
  ↓
Servidor:
  1. Verificar autenticação via timingSafeEqual — proteção contra ataque de timing
  2. Deduplicação antecipada: isTransactionProcessed(payload.id) → retornar 200 cedo
  3. Registrar dedup PRIMEIRO — idempotente mesmo se o processamento falhar
  4. Filtrar transferType === 'in' (ignorar saídas)
  5. Correspondência multi-estratégia:
     a. content → order_id (regex /DH\d+/)
     b. content → phone (regex /0\d{9}/) → getLeadByPhone
     c. amount + timestamp ±30min → findPendingLeadByAmountAndTime (aceitar apenas length === 1)
  6. Rejeitar pagamento a menor, ACEITAR pagamento a maior
  7. markLeadPaid(orderId, payment) → atualizar armazenamento
  8. Disparar efeitos colaterais em loop try/catch (NÃO Promise.all)
  9. SEMPRE retornar 200 (mesmo em erro interno) — Sepay retry Fibonacci 7 vezes se non-200

Placeholders de efeitos colaterais para biz-email-setup + biz-telegram-payment-notify serem integrados depois.

Consulte references/sepay-webhook-flow.md para a lógica de deduplicação e comportamento de retry.


Fase 6 — Incorporar VietQR na landing page

3 padrões de UX, pergunte ao usuário qual escolher:

PadrãoQuando usarUX
A. Popup modalProduto único / compra por impulsoEnviar formulário → modal popup com QR na própria página
B. Página /checkout/[orderId]Vários produtos / necessidade de compartilhar URLRedirecionar para página dedicada com QR + instruções
C. Embed inlinePreferência por design minimalistaQR exibido diretamente no formulário ou abaixo dele

A skill pergunta:

Qual padrão de UX você prefere para exibir o VietQR?

A. Modal popup B. Página /checkout/[orderId] C. Embed inline

Recomendo B se você planeja ter múltiplos produtos ou compartilhar links de pagamento via chat. A para landing page de produto único. C para formulário de leads com aparência mais integrada.

Após a escolha, a skill cria o componente/rota correspondente.


Fase 7 — Plano de teste em 5 níveis

Nível 1 — Teste de armazenamento

node -e "const { createLead, getLeadByOrderId, markLeadPaid } = require('./lib/leads-store'); async function t() {
  const { orderId, lead } = await createLead({ name: 'Test', phone: '0912345678', email: '[email protected]', productName: 'Test', amount: 100000 });
  console.log('Criado:', orderId);
  const fetched = await getLeadByOrderId(orderId);
  console.log('Consultado:', fetched?.name);
  const paid = await markLeadPaid(orderId, { method: 'test', amount: 100000, sepayId: 'TEST001' });
  console.log('Pago:', paid?.paid);
}
t().catch(console.error);"

Nível 2 — Teste de checkout

curl -X POST http://localhost:3000/api/checkout \
  -H "Content-Type: application/json" \
  -d '{"name":"Test","phone":"0912345678","email":"[email protected]","productName":"Test","amount":100000}'

Espere resposta JSON com orderId, qrUrl, content.

Nível 3 — Teste de webhook (simulado)

curl -X POST http://localhost:3000/api/sepay-webhook \
  -H "Content-Type: application/json" \
  -H "Authorization: Apikey $SEPAY_WEBHOOK_API_KEY" \
  -d '{"id":"TEST001","transferType":"in","amount":100000,"content":"DH000001","transactionDate":"2024-01-01 12:00:00"}'

Espere 200 + verifique no banco que o lead foi marcado como pago.

Nível 4 — Teste de produção

  1. Faça deploy para Vercel (ou sua plataforma)
  2. Configure o webhook no Sepay dashboard com a URL de produção
  3. Faça uma transferência real via QR → verifique o fluxo completo
  4. Verifique logs no Vercel ou Supabase

Nível 5 — (Apenas Supabase) Teste de cron ping

curl https://seu-dominio.vercel.app/api/health

Espere 200 + verifique no Supabase se a função health_check() foi executada com sucesso.


Checklist de conclusão

  • Sepay account configurada + webhook ativo
  • Armazenamento de leads configurado (KV ou Supabase)
  • lib/leads-store.ts + implementação criados
  • /api/checkout criado e testado
  • /api/sepay-webhook criado e testado
  • VietQR incorporado na landing page
  • Teste de ponta a ponta bem-sucedido

Após a conclusão, considere configurar:

  • biz-email-setup — notificar admin por email quando um lead pagar
  • biz-telegram-payment-notify — notificar via Telegram
  • biz-leads-admin-ui — painel admin para visualizar leads

Dicas de solução de problemas

ProblemaCausa provávelSolução
Webhook retorna 401API key incorreta ou não configuradaVerifique SEPAY_WEBHOOK_API_KEY no .env.local
Pedido não encontradoFormato do conteúdo não correspondeVerifique se o conteúdo da transferência inclui DH maiúsculo + número
QR não apareceURL do QR inválidaVerifique SEPAY_BANK_ACCOUNT_NUMBER e SEPAY_BANK_NAME
Supabase pausou7 dias sem atividadeExecute o ping do cron ou reinicie manualmente no dashboard
KV command limit exceededMuitos pedidos no mêsConsidere migrar para Supabase ou fazer upgrade do KV

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Best practices for Remotion - Video creation in React

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Scaffold trang `/admin` CRM-style trực quan vào Next.js project (Supabase backend) — KHÔNG còn variant Vercel KV. Layout 1CRM-inspired: sidebar 3 tab (Tổng quan / Khách hàng / Email marketing) + popup nhập mã đăng nhập. **Tab Tổng quan**: 4 KPI cards (Tổng leads / Đã thanh toán / Tỷ lệ chuyển đổi / Doanh thu) có delta arrow vs kỳ trước, line chart leads+paid+revenue theo ngày dùng `recharts`, donut trạng thái paid/pending/expired, period selector pill 7d/30d/90d, list 5 thanh toán gần nhất. **Tab Khách hàng**: bảng leads + search + filter trạng thái + filter ngày + CSV export. **Tab Email marketing**: form soạn chiến dịch (tên + tiêu đề + body chọn định dạng **văn bản thường HOẶC HTML** + placeholder `{{name}}` + audience 4 loại all/paid/pending/last_days + tên người gửi) — có nút **Xem trước** mở modal iframe render đúng email thật (text → auto convert + wrap khung; HTML fragment → wrap khung, HTML đầy đủ giữ nguyên) → gửi bulk qua SMTP (reuse `nodemailer` của `biz-email-setup` — KHÔN

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Deploy landing page / website (React, Next.js, Vite, static HTML) lên Vercel — tự kiểm tra Vercel CLI hoặc Vercel MCP đã cài chưa, nếu chưa thì cài qua npm/pnpm và hướng dẫn user authenticate (vercel login), tự detect framework (Next.js / Vite / CRA / static), auto-generate vercel.json khi cần, chạy `vercel --prod`, trả về live URL + inspect URL + hướng dẫn custom domain. USE WHEN user says 'deploy lên vercel', 'đẩy landing page lên vercel', 'publish website', 'go live', 'deploy nextjs', 'deploy react', 'deploy vite', 'tạo URL live', 'đưa lên production', 'biz-deploy-vercel', 'host landing page', 'vercel deploy', 'ship lên vercel', 'đẩy code lên vercel'. Skill này áp dụng cho cả case dùng Vercel CLI lẫn Vercel MCP server.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup SMTP-based email auto-responder cho landing page bán hàng — tự động gửi email sau khi user điền form (tên/SĐT/email), KHÔNG cố định vào provider nào. Skill này (1) hỏi user chọn SMTP provider (Gmail/Google Workspace, Resend SMTP, SendGrid, Mailgun, Brevo, Zoho, hoặc SMTP custom của hosting VN) và detect Next.js stack đang dùng, (2) đọc context từ `offer.json` + `conversion-copy.md` (từ `/biz-offer-alex-hormozi`) HOẶC đọc trực tiếp Next.js project đã build qua `ui-ux-pro-max` (file `app/page.tsx`) HOẶC đọc HTML landing page đã deploy để hiểu offer, dream outcome, mechanism, bonus. Lưu ý: skill `biz-sales-page-layout` đã DEPRECATED 2026-05-14 — pipeline mới skip layout/copy.json, (3) **draft 2 email**: email A — auto-responder gửi cho lead (warm welcome + deliver lead magnet/booking confirm/payment link tuỳ offer type), email B — notification gửi cho owner (lead alert + thông tin liên hệ), (4) **show draft cho user duyệt và chỉnh sửa** trước khi wire vào code, (5) cài `nodemailer`

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Cài chatbot AI dạng floating widget góc dưới phải vào project Next.js có sẵn (App Router hoặc Pages Router), responsive đầy đủ web + tablet + mobile, gọi LLM qua OpenRouter (mặc định google/gemini-3-flash-preview, có thể đổi sang anthropic/claude-sonnet-4.6), streaming response, RENDER MARKDOWN trong assistant bubble (bold / list / link / code) qua react-markdown + remark-gfm — KHÔNG hiện raw **bold** dạng text — có knowledge base từ FAQ + tài liệu sản phẩm/khóa học do user cung cấp để chatbot tự động trả lời khách hàng, và TỰ ĐỘNG EXTRACT + LƯU LEAD (tên + SĐT + email) vào Upstash Redis/Vercel KV dưới namespace `chat-lead:{phone}` khi user cung cấp đầy đủ thông tin trong chat — dedupe theo SĐT, TTL 90 ngày, fire-and-forget không block stream. Skill tự detect số lượng project Next.js — nếu có nhiều hơn 1 sẽ hỏi user chọn project nào để cài; tự detect TypeScript/JS, App Router/Pages Router, Tailwind/CSS module, KV/Upstash availability (skip auto-save nếu chưa có); tự install react-markd

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Đóng gói offer **không thể chối từ** (grand slam offer) theo phương pháp Alex Hormozi ($100M Offers) — nhận input pains/gains/customer jobs theo Value Proposition Design (Osterwalder 2014) + sản phẩm/dịch vụ, rồi sinh ra: (1) markdown report tiếng Việt đầy đủ Value Equation scoring + Core Offer + 3-4 Bonus stack + Guarantee + Urgency + Pricing, (2) offer.json structured cho pipeline downstream (`ui-ux-pro-max` build sales page production-ready), (3) conversion copy block (headline + subheadline + CTA) sẵn sàng paste landing page. 2 input mode: (B) user paste sẵn pains + gains + product, (C) user chỉ có sản phẩm — skill phỏng vấn theo VPD framework để surface pain/gain trước. Bonus stack mode hybrid: skill brainstorm 5-7 candidate có justification value rồi user pick/chỉnh 3-4 cái. Tiếng Việt thuần (xưng anh/chị), giá VND charm pricing (X99K), 3-tier decoy structure. USE WHEN user says 'đóng gói offer', 'tạo offer', 'thiết kế offer Hormozi', 'grand slam offer', 'value stack', 'offer sta

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Nâng cấp copy sales page tiếng Việt — biến copy có sẵn (từ `offer.json` + `conversion-copy.md` của `/biz-offer-alex-hormozi`, HOẶC từ Next.js project đã build qua `ui-ux-pro-max`, HOẶC user paste block copy bất kỳ) thành **copy chất lượng cao chốt đơn**: headline punchy hơn, pain agitation đau hơn, mechanism rõ hơn, benefit cụ thể hơn, FAQ xử lý đúng objection của thị trường VN, CTA mạnh hơn. Skill này có 3 INTENSITY LEVEL: (1) **Polish** — light edit + power word + sửa nhịp; (2) **Conversion-optimized** — rewrite 5 block critical + tạo A/B variants cho hero/CTA; (3) **Sales-letter** — long-form story-driven full rewrite kèm P.S.. Mỗi section áp dụng đúng formula thuyết phục (PAR cho pain, BAB cho solution, FEP cho benefit, PVEN cho final CTA, Star-Chain-Hook cho testimonial). Output gồm 4 file: `copy-upgraded.md`, `copy-variants.md` (A/B test bank — 3 hero + 3 CTA + 3 final-CTA), `copy-changes.md` (diff Trước/Sau + lý do), `copy.json` (structured downstream). Giọng văn tiếng Việt thuầ

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

⚠️ DEPRECATED (2026-05-14) — Skill này KHÔNG còn trong pipeline chuẩn. Quy trình mới đã bỏ bước wireframe markdown trung gian: sau `/biz-offer-alex-hormozi` đi THẲNG sang `ui-ux-pro-max` để build Next.js sales page production-ready (có design language nhất quán: style + palette + font pairing, không phải Tailwind defaults). Lý do deprecate: wireframe markdown làm thêm 1 bước trung gian không tạo giá trị — `ui-ux-pro-max` đọc trực tiếp `offer.json` đã đầy đủ anchor + core + bonus + guarantee + urgency + pricing rồi ra HTML production luôn. Chỉ dùng skill này KHI user EXPLICITLY yêu cầu wireframe markdown để review/in/share trước khi build code (rare case). KHÔNG trigger trên các keyword 'tạo sales page', 'tạo landing page bán hàng' nữa — những keyword đó giờ trigger `ui-ux-pro-max`.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup Telegram bot notification cho thanh toán thành công từ Sepay webhook trong Next.js project. Skill này: (1) hướng dẫn user 3 bước tạo Telegram bot riêng qua @BotFather + lấy bot token + chat_id (qua @userinfobot cho chat 1-1, hoặc /getUpdates API cho group), (2) tạo helper function `sendTelegramNotification()` reusable trong `lib/telegram.ts`, (3) detect existing Sepay webhook route trong project (thường là `/api/sepay-webhook`, `/api/payment-success`, hoặc tương đương) và wire Telegram call CÙNG CHỖ với email auto-responder (Resend) — gửi parallel qua `Promise.allSettled` để Telegram fail KHÔNG block 200 response trả Sepay (Sepay sẽ retry webhook nếu nhận non-200, gây duplicate notification), (4) draft message format mặc định tiếng Việt: emoji + tên khách + SĐT + email + amount (charm pricing VND định dạng `499.000đ`) + tên sản phẩm + timestamp giờ VN dd/mm/yyyy HH:mm, (5) update `.env.local` với `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID`, add vào `.gitignore`, nhắc user paste vào

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert a single MP3 voiceover file into a single HeyGen avatar lip-sync MP4 video. Single-purpose — no planning, no SRT, no chunking, no Remotion compositing. Hybrid path — REST upload (helper script) + HeyGen MCP for video creation, because the post-2026 MCP no longer exposes an asset-upload tool. Reads avatar look pool (`HEYGEN_AVATAR_LOOKS`) from `.env` and HeyGen API key (`HEYGEN_API_KEY`) for the upload step. USE WHEN user says "tạo video heygen từ mp3", "mp3 to heygen", "heygen mp4 từ audio", "convert mp3 sang heygen video", "tạo avatar video từ file mp3", "lip sync mp3 heygen", "biến mp3 thành video heygen", or any time the user has exactly one MP3 file and wants exactly one HeyGen avatar MP4 out.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Demand-side market research cho digital product / service ở Việt Nam — đo cầu thật + WTP + channel-market fit + defensibility qua keyword volume, marketplace sales (Shopee/Unica/Edumall/Gitiho/KyNa), community signal (FB groups, TikTok hashtag, Zalo OA), competitor pricing, unit economics — không phải macro PESTEL. Output: keyword portfolio + Niche Score 100 điểm 7-dimension có evidence + go/no-go decision + falsification protocol. Force triangulate ≥3 sources cho mỗi claim quan trọng. USE WHEN user says 'nghiên cứu thị trường', 'market research', 'validate niche', 'keyword research', 'demand validation', 'niche có nên làm không', 'có ai làm chưa', 'thị trường đủ lớn không', 'có lời không', 'chọn ngách', 'kiểm tra cầu'. Cũng trigger khi user mô tả 1 ý tưởng kinh doanh cụ thể và muốn check feasibility. Skill này KHÔNG fit: high-ticket transactional sale (BĐS, ô tô), B2B enterprise (sales cycle 6+ tháng), hyper-local geo micro-market (1 toà nhà, 1 phường). KHÔNG làm: macro PESTEL/Porter

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Transcribe an MP3 voiceover into an SRT subtitle file and a word-level segments JSON using local OpenAI Whisper. Input is a single MP3 path; output is `<stem>.srt` + `<stem>_segments.json` written next to the MP3 (or to a custom output dir). USE WHEN the user says 'extract srt from mp3', 'trích srt từ mp3', 'transcribe voiceover', 'tạo file srt và segments', 'whisper transcribe', 'bóc transcript có timestamp', 'extract voiceover segments', 'tách SRT từ audio', or any time a downstream skill (plan-short-video-edit, heygen-remotion-short-video-editor) needs an SRT + word-level segments JSON from a voiceover MP3 and one does not already exist.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert Vietnamese/English script text to MP3 voiceover using ElevenLabs TTS API. Calls POST /v1/text-to-speech/{voice_id}, streams audio bytes, writes MP3 directly. Locked to Hoang's brand voice ID by default. USE WHEN user says 'tạo mp3 elevenlabs', 'elevenlabs tts', 'eleven labs voice', 'text to speech elevenlabs', 'tạo voiceover elevenlabs', 'đọc text bằng elevenlabs', 'tts elevenlabs to mp3', 'eleven labs script to mp3', 'voiceover bằng elevenlabs', 'giọng elevenlabs'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end orchestrator: **script → final MP4 16:9 (1920×1080) podcast-keynote**.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end short-video pipeline — từ kịch bản (Việt/Anh) ra MP4 TikTok/Reels 9:16 hoàn chỉnh. Orchestrator 3 phase ghép skill có sẵn — (1) TTS provider chọn được giữa `mkt-elevenlabs-tts-to-mp3` (default, voice của Hoàng) hoặc `mkt-video-script-to-mp3` (MiniMax speech-2.8-hd), (2) checkpoint user duyệt MP3, (3) `heygen-mp3-to-mp4` lip-sync avatar HeyGen, (4) delegate Phase 3 packaging cho sub-agent `mkt-full-video-phase3-packager` (transcribe + scene outline + checkpoint + fan-out N scene writers parallel + scaffold + preview Studio). API key + voice ID cho cả 2 provider lưu ở `.env`. USE WHEN user nói "tạo full video từ script", "script to tiktok video", "pipeline full video heygen + hyperframe", "tạo video từ kịch bản đến mp4", "elevenlabs heygen hyperframe full pipeline", "minimax heygen pipeline", "kịch bản ra video tiktok", hoặc có sẵn 1 script + (optional) ảnh b-roll và muốn ra MP4 9:16 đóng gói có captions, SFX, b-roll.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Build a TikTok/Reels/YouTube **landscape 16:9 (1920×1080)** short video from a pre-recorded talking-head MP4 using HyperFrames — transcribe Vietnamese audio, scaffold a complete preview-ready 1920×1080 project with a slide pane (1200px) on the left and a floating avatar frame on the right, GSAP timeline có SPLIT↔PIP transitions (slide full-screen + avatar PIP corner thumbnail), breathing yoyo zoom + beat-driven punch-in trên avatar, 5 scene compositions kiểu "tier-row" pattern (post-stack hook / chats-stack problem / hero-orb solution / counter-row recap / terminal-row CTA), optional cream-paper editorial infographic image slots với `<img onerror>` fallback, 6 SFX wired tại scene boundaries, **NO captions** (giọng avatar là spine). USE WHEN user nói "edit video 16:9 từ HeyGen MP4", "scaffold project landscape", "podcast keynote editor", "talking head + slide editor", "build hyperframes 1920×1080", "tạo project 16:9 từ avatar mp4", "scaffold 16:9 hyperframes", "hyperframe landscape vide

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Pipeline đóng gói: từ MP4 quay sẵn (talking head 9:16) tới HyperFrames preview project hoàn chỉnh có captions, SFX, zoom hooks, b-roll toàn cảnh có hiệu ứng rich, và CTA finale.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Audit bài Facebook / Reels / YouTube để phát hiện 4 downward drivers (over-branding, over-production, stock imagery, standardized aesthetic) + frequency-over-quality. Mỗi anti-pattern bị drop ~75% performance nếu hiện diện. USE WHEN user says 'audit content', 'check anti pattern', 'content có lỗi gì không', 'kiểm tra over branding', 'vì sao video bị chết', 'vì sao post không ai xem', 'content audit', 'kiểm tra chất lượng content'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Tìm viral pattern ở ngành khác (bác sĩ, luật sư, tài chính, bất động sản, thủ công) có thể apply cho niche AI/automation của Hoang. Ngách AI educator VN còn ít format được khai thác — cross-industry adaptation là blue ocean. USE WHEN user says 'tìm format ngành khác', 'cross industry research', 'học format từ ngành khác', 'blue ocean format', 'tìm format chưa ai làm', 'adapt format từ niche khác', 'cross industry viral'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Rewrite CTA kiểu autocratic (Mua ngay! Follow ngay! Đăng ký liền!) sang 3 variants Democratic / Benevolent / Laissez-faire — reach 85% dân số thay vì chỉ 5% (action-based). Áp dụng cho landing page, caption FB, CTA video, email. USE WHEN user says 'rewrite cta', 'sửa cta', 'cta không autocratic', 'viết lại kêu gọi hành động', 'cta cho landing page', 'cta nhẹ nhàng hơn', 'inclusive cta', 'cta democratic benevolent'.

Habilidades Relacionadas