Transform your ideas into complete web applications with the power of AI
An intelligent tool that uses Google's Gemini AI to generate fully functional web applications from simple text prompts. Just describe what you want, and watch as complete HTML, CSS, and JavaScript files are created for you.
- 🎯 AI-Powered Generation - Uses Google Gemini 2.0 Flash for intelligent app creation
- 🌐 Complete Applications - Generates HTML, CSS, and JavaScript files
- 📱 Responsive Design - All apps are mobile-friendly and modern
- 💾 Local Storage - Apps include data persistence where appropriate
- 🛡️ Security First - Built-in safety checks for malicious commands
- 🎨 Modern UI/UX - Beautiful, professional-looking applications
- 📁 Organized Output - Clean project structure with documentation
- 🔄 Multiple Modes - Interactive CLI, command-line, or programmatic usage
- Node.js 16+ installed
- Google Gemini API key (Get one here)
-
Clone or download the script
-
Install dependencies
npm install @google/genai dotenv- Set up environment
# Create .env file
echo "GEMINI_API_KEY=your_api_key_here" > .env- Run the generator
node app-generator.jsThe easiest way to use the generator:
node app-generator.jsThis starts an interactive session where you can create multiple apps:
🤖 AI App Generator Started!
💡 Examples: "create a todo app", "create a weather app", "create a calculator"
❌ Type "exit" to quit
👤 What app would you like to create? create a todo app with dark mode
Create apps directly from the command line:
# Single app generation
node app-generator.js create a weather dashboard
# Run predefined examples
node app-generator.js --examples
# Interactive mode (explicit)
node app-generator.js --interactiveUse in your own Node.js projects:
import { createApp } from './app-generator.js';
const result = await createApp('create a calculator with history');
if (result.success) {
console.log(`App created at: ${result.projectPath}`);
} else {
console.error(`Error: ${result.error}`);
}create a todo app
create a calculator
create a notes app
create a timer app
create a color picker
create a todo app with dark mode and categories
create a weather app with 5-day forecast
create a calculator with scientific functions
create a notes app with markdown support
create a habit tracker with streak counter
create a minimalist todo app
create a colorful quiz app for kids
create a professional expense tracker
create a modern portfolio website
create a retro-style game
create a weather app using OpenWeatherMap API
create a news reader with RSS feeds
create a currency converter with live rates
create a recipe finder with meal API
Each generated app follows this structure:
projects/
├── your-app-name/
│ ├── index.html # Main HTML file
│ ├── style.css # Styling and responsive design
│ ├── script.js # JavaScript functionality
│ └── README.md # App documentation
├── another-app/
│ ├── index.html
│ ├── style.css
│ ├── script.js
│ └── README.md
└── ...
| App Type | Features | Example Prompt |
|---|---|---|
| Todo/Task Apps | Add, edit, delete, mark complete, categories, local storage | create a todo app with priorities |
| Weather Apps | Location input, forecasts, current conditions, maps | create a weather dashboard |
| Calculators | Basic to scientific operations, history, memory | create a scientific calculator |
| Notes Apps | Create, edit, save, categories, search, markdown | create a notes app with tags |
| Timers | Countdown, stopwatch, multiple timers, alerts | create a pomodoro timer |
| Games | Memory games, quizzes, puzzles, arcade-style | create a memory matching game |
| Utilities | Color pickers, converters, generators, tools | create a password generator |
| Dashboards | Data visualization, charts, metrics, analytics | create a fitness tracking dashboard |
Every generated app includes:
- ✅ Responsive Design - Works on desktop, tablet, and mobile
- ✅ Modern CSS - Flexbox/Grid layouts, animations, hover effects
- ✅ Semantic HTML - Proper structure and accessibility
- ✅ Error Handling - Graceful error management in JavaScript
- ✅ Local Storage - Data persistence where applicable
- ✅ Clean Code - Well-commented and organized
- ✅ Cross-Browser - Compatible with modern browsers
The generator includes built-in security measures:
- Command Filtering - Blocks dangerous system commands
- Input Validation - Sanitizes user prompts
- Safe File Operations - Prevents directory traversal
- No External Dependencies - Generated apps use vanilla JavaScript
The system automatically rejects prompts containing:
- System commands (
sudo,rm,chmod, etc.) - Dangerous operators (
>,|,&,;) - Potentially harmful flags (
--force,-f)
"create a modern todo app with dark mode"
"create a minimalist calculator"
"create a colorful kids' game"
"create a todo app with categories and due dates"
"create a weather app with maps and alerts"
"create a notes app with search and export"
"create a calculator with history and memory"
"create a timer with custom sounds"
"create a color picker with palette saving"
"create a mobile-friendly todo app"
"create a touch-optimized drawing app"
"create an accessible quiz app"
❌ GEMINI_API_KEY not found in environment variablesSolution:
- Create a
.envfile in your project root - Add your API key:
GEMINI_API_KEY=your_key_here - Get an API key from Google AI Studio
❌ Error creating app: Unexpected tokenSolution: The script automatically handles this, but if it persists:
- Check your internet connection
- Verify your API key is valid
- Try a simpler prompt first
❌ Error: EACCES: permission deniedSolution:
- Run from a directory you have write access to
- On Unix systems:
chmod +w . - On Windows: Run as administrator if needed
Problem: Generated app doesn't function properly Solution:
- Open browser developer tools (F12)
- Check console for JavaScript errors
- Ensure you're opening
index.htmlin a modern browser - Some features may require a local server (use Live Server in VS Code)
- ✅ Add/edit/delete tasks
- ✅ Mark tasks as complete
- ✅ Category/priority system
- ✅ Local storage persistence
- ✅ Search and filter
- ✅ Dark/light mode toggle
- 🌤️ Current weather display
- 📅 5-day forecast
- 📍 Location detection
- 🗺️ Weather maps
- 🌡️ Temperature units toggle
- 💾 Favorite locations
- 🔢 Basic arithmetic operations
- 📊 Scientific functions
- 📚 Calculation history
- 💾 Memory functions
- ⌨️ Keyboard support
- 📱 Mobile-friendly interface
Create multiple apps at once:
import { createApp } from './app-generator.js';
const apps = [
'create a todo app',
'create a calculator',
'create a notes app'
];
for (const prompt of apps) {
await createApp(prompt);
}Modify the system prompt for specialized apps:
// Add your own instructions to SYSTEM_PROMPT
const customPrompt = SYSTEM_PROMPT + '\nAlways include accessibility features.';Use with your existing workflow:
{
"scripts": {
"generate-app": "node app-generator.js",
"build-all": "npm run generate-app && npm run build"
}
}Generates a complete web application from a text prompt.
Parameters:
prompt(string) - Description of the app to create
Returns:
{
success: boolean,
projectName: string,
projectPath: string,
files: string[],
error?: string
}Starts the interactive CLI interface.
Generates a set of example applications.
Contributions are welcome! Here are some ways to help:
- 🐛 Report bugs or issues
- 💡 Suggest new app types or features
- 🎨 Improve the generated app templates
- 📚 Enhance documentation
- 🧪 Add test cases
This project is open source and available under the MIT License.
Planned features:
- 🎨 Custom themes and styling options
- 🔌 Plugin system for extending functionality
- 🌐 Framework support (React, Vue, etc.)
- 📦 Package.json generation with dependencies
- 🚀 One-click deployment options
- 🤖 AI-powered app improvements and refactoring
Ready to turn your ideas into reality? Start generating apps now!
node app-generator.jsMade with ❤️ and AI