Now let me set up all the files. I'll start with the layout, globals, and all the core components simultaneously.
Now update the layout.tsx with Inter font and proper metadata:
Now I'll build the wizard form components. First, the types file, then the form store, then each step component, then the main page.
Now let me create the form field helper component and all 4 steps:
Now I'll build the full results page with all 4 sections:
Now let's check the package.json to make sure we have the right AI SDK packages:
The AI SDK isn't installed yet. Let me add it to package.json:
OfertaLab is fully built. Here's what was created:
/ — Landing page with hero, 3 benefit cards, 4-step how-it-works section, and a dark CTA banner, all in the Linear/Vercel-inspired flat black-and-violet aesthetic./analizar — A 4-step wizard with animated progress bar, step indicators, inline validation, field tooltips with examples, and persistent state between steps. Submits to the API and redirects to results./resultado — Full results page with 4 sections: viability score badge + colored progress bar, 6 diagnostic metric bars, the full irresistible offer card (name, value stack, price, guarantee, objection accordions), and 3 prioritized next-steps cards. Includes copy-to-clipboard and print-to-PDF actions./api/analyze — Route handler using AI SDK 6 with generateText + the Vercel AI Gateway (openai/gpt-4o), builds the structured prompt and returns parsed JSON to the frontend.Veo el problema. El error en el WizardForm usa extra como clave de error pero extra es un campo del formulario, lo que causa un conflicto. Tambien necesito mejorar el manejo de errores. Voy a agregar logs para debug y arreglar el manejo de errores:
Ahora necesito agregar el error de submit al UI:
Ahora voy a mejorar el API route para agregar mas logs y un mejor manejo de errores:
He agregado logs de debug tanto en el cliente (WizardForm) como en el servidor (API route), y tambien arregle el manejo de errores:
submitError como estado separado en lugar de mezclar con los errores de campo, muestra mensajes de error mas claros, y loguea el proceso completo de submitPor favor intenta de nuevo y revisa la consola del navegador (F12 > Console) para ver los logs [v0] que te indicaran donde falla exactamente.
You can send messages while the preview loads