04 / CASE STUDY
PRODUCT EXPERIMENT
AI Sales Craft.
From a raw briefto JSON ready to render.
A dual-LLM sales page generator whose output is JSON, already past schema validation and ready to render.
BUILT WITH
- Next.js
- Express
- TypeScript
- PostgreSQL
- Vercel
01 / PROBLEM
Free-form outputcannot be rendered.
Raw product details (name, features, audience, pricing, the selling point) have to become a structured sales page, and doing that by hand is slow. Loose model prose does not solve it. What was needed was output with a fixed shape, consistent enough to render across several visual templates.
02 / APPROACH
Schema first,model second.
The backend prompts the LLM to return strict JSON matching a defined schema, then validates it before storing. Groq with Llama 3.3 70B is the primary engine for speed; when Groq is unavailable or errors, the request automatically falls back to Gemini under the same schema contract. The frontend maps one generation onto three distinct templates.
- 01BRIEF
- 02GROQ
- 03SCHEMA CHECK
- 04GEMINI (FALLBACK)
- 05THREE TEMPLATES
VALIDATED
03 / LEARNED
The fallback camefrom real pain.
This project started on Laravel 11 + MySQL. When deployment moved to Vercel, the backend was rewritten in Express + TypeScript with PostgreSQL on Neon. That full rewrite taught me more about both ecosystems than either version alone. The fallback arrived later, out of incidents: free-tier LLM APIs fail often, and handling that gracefully matters more than the happy path.
NEXT PROJECT
Vidio Belajar05 ↗