An open-source AI-powered full-stack development platform that generates, previews, and deploys web applications directly in your browser.
Demo β’ Documentation β’ Features β’ Getting Started
- About
- Video Demo
- Features
- Tech Stack
- Getting Started
- Project Structure
- AI Agents
- Usage
- Development
- Deployment
- Contributing
- License
- Acknowledgments
needware.dev is a cutting-edge AI-powered development platform that revolutionizes how you build web applications. Leveraging multiple AI models and an intelligent agent system, it transforms ideas, screenshots, or URLs into fully functional web applications - all within your browser's isolated sandbox environment.
- π€ Multi-Agent System: Intelligent agents for different code generation tasks
- π¨ Visual-to-Code: Convert screenshots directly into working code
- π Clone-to-Code: Analyze and replicate websites from URLs
- π‘ Idea-to-Code: Transform text descriptions into complete applications
- ποΈ Real-time Preview: Instant preview with WebContainer technology
- ποΈ Database Integration: Built-in Supabase support for database operations
- π Multi-Model Support: Works with OpenAI, Anthropic, Google, DeepSeek, and more
Here's a feature demonstration video of needware.dev:
output.mov |
output.mov |
- π§ AI-Powered Code Generation: Full-stack web development for Node.js applications directly in your browser
- πΈ Screenshot to Code: Upload design mockups and convert them to working code
- π URL Cloning: Analyze existing websites and generate similar implementations
- π Natural Language: Describe your idea and watch it come to life
- πΌοΈ Image Context: Attach images to prompts for better contextual understanding
- π¨ Visual Editor: Built-in code editor with syntax highlighting and autocomplete
- π Real-time Preview: Instant preview with hot reload in isolated sandbox
- π¦ Project Export: Download projects as ZIP files for easy portability
- ποΈ File Management: Complete file system with create, edit, and delete operations
- π Integrated Terminal: Built-in terminal for running commands
- π Code Diff View: Visual comparison of code changes
- π Markdown Support: Rich text rendering with syntax highlighting
- ποΈ Supabase Integration: Built-in database management and operations
- π Authentication: Secure user authentication with NextAuth.js
- π Data Visualization: Charts and analytics for your data
- π Encryption: Database field encryption for sensitive data
- π One-Click Deploy: Deploy to Cloudflare, Netlify, or Vercel
- βοΈ Cloud Storage: Save and sync projects to the cloud
- π Version History: Track changes with artifact snapshots
- π₯ Multi-User Support: User management and project isolation
- π€ Multiple AI Providers: OpenAI, Anthropic, Google, DeepSeek, Mistral, Cohere, and more
- π― LangGraph Agents: Sophisticated multi-agent workflows
- π§© Firecrawl Integration: Advanced web scraping for URL analysis
- π Context-Aware: Maintains conversation history for better results
- Framework: Next.js 15 (App Router)
- UI Library: React 19
- Styling: Tailwind CSS 4, SCSS
- Components: Radix UI, shadcn/ui
- Code Editor: CodeMirror 6
- Terminal: xterm.js
- Animation: Framer Motion
- AI SDK: Vercel AI SDK
- Agent Framework: LangChain, LangGraph
- AI Providers:
- OpenAI, Anthropic (Claude), Google (Gemini)
- DeepSeek, Mistral, Cohere
- AWS Bedrock, OpenRouter
- Web Scraping: Firecrawl
- Database: Supabase (PostgreSQL)
- ORM: Drizzle ORM
- Authentication: NextAuth.js 5
- Browser Runtime: WebContainer API
- File System: Custom virtual file system
- Package Manager: pnpm
- Hosting: Vercel, Cloudflare Pages, Netlify
- Storage: Supabase Storage, Vercel Blob
- Version Control: isomorphic-git
Before you begin, ensure you have the following installed:
- Node.js: v18.17 or higher
- pnpm: v8.0 or higher
- Git: Latest version
-
Clone the repository:
git clone https://github.com/yourusername/genfly.git cd genfly
-
Install pnpm (if not already installed):
npm install -g pnpm
-
Install dependencies:
pnpm install
Create a .env.local
file in the root directory:
# Copy and edit the environment variables
touch .env.local
Then add the following variables to your .env.local
file:
# ====================
# App Configuration
# ====================
NEXT_PUBLIC_APP_URL=http://localhost:3000
# ====================
# Database (Supabase)
# ====================
# PostgreSQL connection string
DATABASE_URL=postgresql://user:password@host:port/database
# Supabase project URL (found in your Supabase project settings)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
# Supabase anonymous key (found in your Supabase project settings)
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Supabase service role key (found in your Supabase project settings)
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Supabase access token (for management API operations)
SUPABASE_ACCESS_TOKEN=your_supabase_access_token
# Database encryption key (generate a random 32-character string)
DB_ENCRYPTION_KEY=your_random_32_character_encryption_key
# ====================
# Authentication (NextAuth v5)
# ====================
# Generate with: openssl rand -base64 32
AUTH_SECRET=your_random_secret_string
# Auth URL (same as NEXT_PUBLIC_APP_URL in development)
AUTH_URL=http://localhost:3000
# Optional: Enable auth debugging
# AUTH_DEBUG=true
# GitHub OAuth (optional, for GitHub login)
GITHUB_ID=your_github_oauth_app_client_id
GITHUB_SECRET=your_github_oauth_app_client_secret
# Google OAuth (optional, for Google login)
GOOGLE_CLIENT_ID=your_google_oauth_client_id
GOOGLE_CLIENT_SECRET=your_google_oauth_client_secret
# Notion OAuth (optional, for Notion login)
AUTH_NOTION_ID=your_notion_oauth_client_id
AUTH_NOTION_SECRET=your_notion_oauth_client_secret
AUTH_NOTION_REDIRECT_URI=http://localhost:3000/api/auth/callback/notion
# ====================
# AI Model API Keys
# ====================
# Configure at least one AI provider
# OpenAI (GPT-3.5, GPT-4, GPT-4o, etc.)
OPENAI_API_KEY=your_openai_api_key
# Anthropic (Claude models)
ANTHROPIC_API_KEY=your_anthropic_api_key
# DeepSeek
DEEPSEEK_API_KEY=your_deepseek_api_key
# OpenRouter (access to multiple models)
OPEN_ROUTER_API_KEY=your_openrouter_api_key
# ====================
# Optional Services
# ====================
# Firecrawl API for URL cloning feature
FIRECRAWL_API_KEY=your_firecrawl_api_key
# Vercel Blob Storage for file uploads
BLOB_READ_WRITE_TOKEN=your_vercel_blob_token
# GitHub Personal Access Token (for template fetching and deployment)
NEXT_PUBLIC_GITHUB_TOKEN=your_github_personal_access_token
# Fly.io API Token (for Fly.io deployment)
FLY_API_TOKEN=your_fly_api_token
# Cloudflare API credentials (for Cloudflare Pages deployment)
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id
# Google Site Verification (for Google Search Console)
GOOGLE_SITE_VERIFICATION=your_google_verification_code
# ====================
# Admin Configuration
# ====================
# Comma-separated list of admin email addresses
ADMIN_EMAIL=admin@example.com,admin2@example.com
# Set to "true" to disable new user signups (admin-only mode)
# DISABLE_SIGNUP=true
Required (Minimum Setup):
NEXT_PUBLIC_APP_URL
- Your application URLDATABASE_URL
- PostgreSQL connection stringNEXT_PUBLIC_SUPABASE_URL
- Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Supabase anonymous keySUPABASE_SERVICE_ROLE_KEY
- Supabase service role keyAUTH_SECRET
- NextAuth secret (generate withopenssl rand -base64 32
)- At least one AI provider API key (OpenAI, Anthropic, Google, or DeepSeek)
Optional (Enhanced Features):
- OAuth providers (GitHub, Google, Notion) - for social login
FIRECRAWL_API_KEY
- for URL cloning featureBLOB_READ_WRITE_TOKEN
- for file uploads via Vercel BlobNEXT_PUBLIC_GITHUB_TOKEN
- for GitHub template fetchingFLY_API_TOKEN
- for Fly.io deploymentCLOUDFLARE_API_TOKEN
&CLOUDFLARE_ACCOUNT_ID
- for Cloudflare deploymentADMIN_EMAIL
- to designate admin usersDB_ENCRYPTION_KEY
- for database field encryption
How to get API keys:
- OpenAI: platform.openai.com/api-keys
- Anthropic: console.anthropic.com
- Google AI: makersuite.google.com/app/apikey
- DeepSeek: platform.deepseek.com
- OpenRouter: openrouter.ai/keys
- Firecrawl: firecrawl.dev
- Supabase: supabase.com - create a project and find keys in Settings β API
-
Set up Supabase:
- Create a new project at supabase.com
- Copy your project URL and API keys to
.env.local
-
Run database migrations:
pnpm run migrate
Or generate new migrations:
pnpm run generate
-
Start the development server:
pnpm run dev
-
Open your browser:
Navigate to http://localhost:3000
-
Build for production:
pnpm run build pnpm start
genfly/
βββ agent/ # AI Agent System
β βββ clone-url-to-code/ # URL to code conversion agent
β βββ idea-to-code/ # Natural language to code agent
β βββ screenshot-to-code/ # Image to code agent
β βββ supervisor/ # Agent orchestration
β βββ utils/ # Shared agent utilities
βββ app/ # Next.js App Router
β βββ api/ # API routes
β βββ (auth)/ # Authentication pages
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ chat/ # Chat interface
β βββ editor/ # Code editor
β βββ workbench/ # Main workbench UI
β βββ sidebar/ # Navigation sidebar
β βββ shadui/ # UI components
βββ db/ # Database configuration
β βββ schema.ts # Drizzle ORM schema
β βββ index.ts # Database client
βββ lib/ # Utility libraries
β βββ modules/ # Core modules
β βββ stores/ # State management (zustand)
β βββ hooks/ # Custom React hooks
β βββ persistence/ # Data persistence layer
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions
βββ migrations/ # Database migrations
βββ public/ # Static assets
βββ styles/ # Global styles
The platform uses a multi-agent architecture powered by LangGraph:
-
Idea to Code Agent (
agent/idea-to-code/
)- Converts natural language descriptions into code
- Understands project context and requirements
- Generates full-stack applications
-
Screenshot to Code Agent (
agent/screenshot-to-code/
)- Analyzes UI design screenshots
- Extracts layout, styling, and component structure
- Generates responsive HTML/CSS/JavaScript
-
Clone URL to Code Agent (
agent/clone-url-to-code/
)- Scrapes and analyzes target websites
- Uses Firecrawl for content extraction
- Replicates functionality and styling
-
Supervisor Agent (
agent/supervisor/
)- Orchestrates multiple agents
- Routes requests to appropriate agents
- Manages workflow state and transitions
User Input β Supervisor β Route to Specific Agent β Generate Code β Preview β Deploy
β
Context Management
β
Multi-Model Selection
-
From an Idea:
- Describe your application in natural language
- The AI will generate a complete project structure
- Preview and iterate on the result
-
From a Screenshot:
- Upload a design mockup or UI screenshot
- The AI analyzes and converts it to code
- Customize the generated components
-
From a URL:
- Paste the URL of a website you want to clone
- The AI scrapes and analyzes the site
- Generates a similar implementation
- Use the built-in CodeMirror editor with syntax highlighting
- Hot reload preview updates automatically
- Access the integrated terminal for commands
- View file tree for easy navigation
- Create and manage Supabase tables directly
- Execute SQL queries from the UI
- View and edit table data
- Configure authentication and storage
- Click the Deploy button in the workbench
- Choose your platform (Vercel, Cloudflare, Netlify)
- Configure deployment settings
- Deploy with one click
# Development
pnpm dev # Start dev server with Turbo
pnpm build # Build for production
pnpm start # Start production server
# Database
pnpm generate # Generate Drizzle migrations
pnpm migrate # Push migrations to database
# Code Quality
pnpm lint # Run ESLint
- TypeScript for type safety
- ESLint for code linting
- Prettier (recommended) for formatting
- Follow the existing code structure and patterns
-
Build the application:
pnpm build
-
Set up your database:
- Configure PostgreSQL or Supabase
- Run migrations
-
Configure environment variables on your hosting platform
-
Deploy to your preferred platform:
- Vercel
- Cloudflare Pages
- Netlify
- Your own VPS
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Write clear, descriptive commit messages
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Be respectful and constructive in discussions
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
This project builds upon amazing open-source technologies:
- WebContainer API - Browser-based runtime
- LangChain & LangGraph - Agent orchestration
- Vercel AI SDK - Multi-model AI integration
- Next.js - React framework
- Supabase - Backend infrastructure
- shadcn/ui - UI components
Special thanks to all contributors and the open-source community!
Built with β€οΈ by the needware.dev team
Website β’ Issues β’ Discussions