# I Built an AI Website Builder and Here's What Actually Happened The article describes the development of CrafticWeb, an AI-powered website builder that generates real HTML/CSS/JS code from user descriptions. The builder uses DeepSeek via OpenRouter for AI generation, features a React frontend with Node.js/Express backend, and includes Google login, a credits system, and Stripe billing. Key technical challenges included handling AI responses wrapped in markdown code fences, fixing live preview issues by switching from srcdoc to Blob URLs, and resolving cross-origin cookie authentication problems in production. I've been wanting to build something with AI for a while now. Not just a wrapper around ChatGPT, but something that actually feels useful. So I built CrafticWeb — you describe a website, and it generates real HTML/CSS/JS for you. You can tweak it with follow-up prompts, edit the code directly, preview it live, and deploy it with one click. It's live, it works, and I learned a ton building it. Here's the honest story. The Idea The core concept is simple. You type something like "a landing page for a coffee shop with a dark theme" and the app sends that to an AI model DeepSeek via OpenRouter , gets back a full HTML document, and renders it in the browser instantly. You can keep chatting to refine it, open it in a Monaco editor to manually tweak things, and when you're happy — deploy it to a public URL. I also added Google login, a credits system, and Stripe billing because I wanted to build something that felt like a real product, not just a weekend demo. The Stack For the frontend I went with React + Vite, Redux for state, Tailwind for styling, Framer Motion for animations, and Monaco Editor for the in-browser code editor. The backend is Node.js + Express, MongoDB for storage, JWT with httpOnly cookies for auth, and OpenRouter to talk to the AI. Stripe handles billing. Nothing too exotic. The interesting stuff is in how it all fits together. What Actually Broke And How I Fixed It Getting the AI to return clean JSON This was my first real headache. The backend sends a master prompt to DeepSeek via OpenRouter and expects back a clean JSON object like this: { "message": "Your website is ready", "code": "