ReactGen is an AI-powered website builder that lets you generate, edit, and preview production-ready React websites directly in your browser—no server or cloud compute required. Describe your idea, and ReactGen instantly creates a complete, beautiful React project you can explore, edit, and run in real time.
- AI Website Generation: Describe your website in plain English. ReactGen uses AI (OpenAI GPT) to generate a full React project tailored to your prompt.
- Streaming Responses: See your project structure and code appear in real time as the AI generates it.
- Monaco Editor: Edit any file instantly with a powerful, VS Code-like code editor in the browser.
- WebContainers: Run and preview your React app live, fully in-browser, using WebContainers. No server or VM required.
- Interactive Terminal: Install dependencies and run scripts in a real terminal, powered by WebContainers and xterm.js.
- File Explorer: Browse and manage your project files and folders visually.
- Execution Steps: Visualize each step of the project setup and code generation process.
- No Extra Compute Needed: Everything runs in your browser—no backend server or cloud VM is required to build or preview your site.
- Prompt: Enter a description of the website you want (e.g., "A beautiful portfolio site with a blog and contact form").
- AI Generation: The backend sends your prompt to OpenAI, determines the project type (React or Node), and streams back a project template and setup steps.
- Project Structure: The frontend displays the generated files, setup steps, and code in real time.
- Edit: Use the Monaco editor to tweak any file. Changes are reflected instantly.
- Preview: The app runs your project in-browser using WebContainers, so you can see your site live as you edit.
- Terminal: Install dependencies or run scripts interactively in a real terminal session.
- Frontend: React, TypeScript, Vite, Tailwind CSS
- Editor: Monaco Editor (@monaco-editor/react)
- Live Preview & Terminal: WebContainers (@webcontainer/api), xterm.js
- Icons: Lucide React
- Backend: Node.js, Express, OpenAI API
- Node.js (v18+ recommended)
- npm
- OpenAI API key (for backend)
git clone https://github.com/aadityasingh9601/ReactGen.git- Backend
cd backend npm install - Frontend
cd ../frontend npm install
- In
backend, create a.envfile with your OpenAI API key:OPENAI_API_KEY=your-openai-key-here
-
Start the backend
cd backend npm run dev -
Start the frontend
cd ../frontend npm run dev -
The frontend will be available at http://localhost:5173.
-
The backend runs on http://localhost:3000.
- Open the app in your browser.
- Enter a prompt describing your desired website.
- Watch as ReactGen generates your project structure and code in real time.
- Explore and edit files using the Monaco editor.
- Use the built-in terminal to install packages or run scripts.
- Preview your site live—no deploy or server required!
frontend/— React app (UI, editor, preview, file explorer, etc.)backend/— Express server (handles AI prompt, project type detection, and OpenAI API calls)
Pull requests and issues are welcome! Please open an issue to discuss your idea or bug before submitting a PR.