PageCraft AI is a developer tool that generates and deploys full-stack web applications directly in the browser from natural language prompts.
PageCraft AI transforms natural-language prompts into deployable React/Node.js apps by integrating GPT APIs (Claude/OpenAI) with WebContainers. It enables instant, browser-based development without requiring local setup.
- Prompt-to-code: Generate React/Node.js projects from plain text instructions
- In-browser execution: Powered by WebContainers (StackBlitz), no local setup needed
- Live Preview: Instantly run
npm installandnpm run devin-browser - Real-time Editing: Modify files via Monaco Editor and apply follow-up prompts
- Custom Parser: Translates LLM responses (XML-like) into files, folders, and shell commands
- Supports Iteration: Add features like dark mode through natural-language prompts
- Frontend: React, TypeScript, TailwindCSS, Monaco Editor
- Backend: Node.js, Express.js (for prompt enrichment and GPT API handling)
- AI: OpenAI GPT-4, Anthropic Claude
- Infra: StackBlitz WebContainers
- User enters a prompt: e.g., "Create a landing page with a navbar and contact form"
- Backend enriches the prompt and sends it to the GPT API
- GPT returns structured XML-like output describing files and commands
- Custom parser converts it to files/folders/shell commands
- WebContainer executes commands like
npm installand starts a dev server - Monaco Editor allows real-time edits; users can send follow-up prompts
PageCraft_AI/
βββ backend/ # Express server & LLM routing
β βββ prompts.ts # Prompt enrichment logic
β βββ parser.ts # XML parser and shell command extractor
βββ frontend/ # React UI
β βββ components/ # Editor, explorer, preview
β βββ containers/ # WebContainer logic
β βββ pages/ # Main views
βββ public/ # Static assets
βββ .env # API keys (excluded in .gitignore)
βββ README.md
βββ package.json
- Node.js 18+
- OpenAI or Anthropic API key
git clone https://github.com/rcodeborg2311/PageCraft_AI.git
cd PageCraft_AI
npm install
touch .envAdd your API keys to .env:
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_claude_keynpm run devVisit http://localhost:3000
MIT License. WebContainers used under StackBlitz's terms.
- StackBlitz WebContainers
- OpenAI
- Anthropic Claude
- Inspired by Bolt.new and Vercel Design