ZEN AI

View repository ↗

Most AI site generators dump a blob of HTML and walk away. You cannot edit it, you cannot go back, and you do not own a history. Zen treats generation as the first version, not the product: describe a site, get code, preview it live, edit the DOM, and roll back. That only works if every successful generation is a row you can reactivate, not a file that got overwritten. Credits and Stripe sit on that same path because a failed model call cannot charge the user.

ZEN AI still 2

Versioning from day one means the active site is a flag on a row, not the latest write. Credits are checked before the vendor call, deducted on success, and restored on failure, or a 500 is a paid error. Stripe credits move only after webhook signature verification — a browser POST that increments balance is not a payment. The preview iframe is sandboxed and sanitised; the editor writes into it through refs instead of re-running the model.

ZEN AI still 3

TypeScript PERN: React UI, Express API, Neon via Prisma. Each generation writes project, conversation message, and version snapshot in one transaction; rollback sets is_active. The prompt is enhanced in two steps before it hits the model so the output shape stays stable. The box is a VPS — PM2, Nginx, Certbot — so process, ports, and TLS are the deploy, not a dashboard toggle.

If version history is optional, you will not add it after the first overwrite. Credits that are not transactional train users to retry until the balance is gone. Payments that are not verified server-side are a form with a number on it. Running Nginx and Certbot made TLS and process crash a deploy problem, not a dashboard toggle — that is the cost of not putting the API on Vercel.