Skip to content

PageCraft AI is a developer tool that generates and deploys full-stack web applications directly in the browser from natural language prompts.

Notifications You must be signed in to change notification settings

rcodeborg2311/PageCraft_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PageCraft_AI

PageCraft AI is a developer tool that generates and deploys full-stack web applications directly in the browser from natural language prompts.

πŸš€ Overview

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.

πŸ”§ Key Features

  • 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 install and npm run dev in-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

βš™οΈ Tech Stack

  • 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

🧠 How It Works

  1. User enters a prompt: e.g., "Create a landing page with a navbar and contact form"
  2. Backend enriches the prompt and sends it to the GPT API
  3. GPT returns structured XML-like output describing files and commands
  4. Custom parser converts it to files/folders/shell commands
  5. WebContainer executes commands like npm install and starts a dev server
  6. Monaco Editor allows real-time edits; users can send follow-up prompts

πŸ“¦ Project Structure

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

πŸ› οΈ Setup

Prerequisites

  • Node.js 18+
  • OpenAI or Anthropic API key

Installation

git clone https://github.com/rcodeborg2311/PageCraft_AI.git
cd PageCraft_AI
npm install
touch .env

Add your API keys to .env:

OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_claude_key

Run Locally

npm run dev

Visit http://localhost:3000

πŸ“œ License

MIT License. WebContainers used under StackBlitz's terms.

πŸ™Œ Credits

About

PageCraft AI is a developer tool that generates and deploys full-stack web applications directly in the browser from natural language prompts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published