Please Don't forget to support me with a β STAR β it really helps and motivates me to keep improving the system!
A powerful AI-powered SaaS platform that allows users to build websites simply by talking to an AI assistant. This project leverages multiple language models and cutting-edge technologies to generate production-ready Next.js code and preview it live in a secure sandbox.
π³ Billing is handled securely via Clerk Billing.
π¨ Theme colors follow the Twitter color scheme viatweakcn
.
π³ Docker is used to run generated projects inside a sandbox environment without compatibility issues.
- πΈ Screenshots
- π― Project Purpose
- π οΈ Technologies Used
- π Project Structure
- π Key Files
- π Getting Started
- π‘ Usage Flow
- π’ Deployment
- π€ Contributing
- π License
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
This platform serves as a bridge between non-technical users and web development by enabling them to:
- Generate website projects using AI conversations
- Create complete frontend code with no coding experience
- Preview results instantly in a sandboxed environment
- Manage multiple projects with real-time tracking
- Conversational Website Creation: Build websites by simply describing your ideas to an AI assistant.
- Production-Ready Code Generation: Instantly generate clean, production-grade Next.js code for your projects.
- Live Preview in Sandbox: Safely preview and interact with your generated website in a secure, isolated environment.
- Multi-Model AI Support: Leverage OpenAI, Anthropic, and Google Gemini for diverse and powerful code generation.
- Project Management: Create, manage, and track multiple website projects with real-time updates.
- Authentication & Billing: Secure sign-in, sign-up, and billing powered by Clerk.
- Export & Deploy: Easily export your code or deploy directly to platforms like Vercel or Netlify.
- Modern UI/UX: Enjoy a sleek, responsive interface built with Tailwind CSS and Radix UI components.
- Background Jobs: Reliable background processing using Inngest for tasks like code compilation and deployment.
- Database Integration: Robust data storage and management with Prisma and PostgreSQL.
π³ Docker is used to run generated projects inside sandbox containers without compatibility issues.
saas\_ai\_website\_builder/
βββ prisma/ # Database schema
βββ public/ # Static assets
βββ sandbox-templates/ # Website templates
βββ src/
β βββ app/ # App Router pages
β βββ components/ # Reusable components
β βββ hooks/ # Custom hooks
β βββ inngest/ # Background jobs
β βββ lib/ # Utility functions
β βββ modules/ # Features modules
β βββ trpc/ # tRPC handlers
β βββ middleware.ts # Auth middleware
β βββ prompt.ts # AI prompts
βββ .env # Environment variables
βββ next.config.ts # Next.js configuration
βββ package.json # Project dependencies
βββ tsconfig.json # TypeScript configuration
schema.prisma
: Data modelsprompt.ts
: AI prompt logicmiddleware.ts
: Auth and middleware logic.env
: API keys and secrets
To run this project, you need to set up the following environment variables in a .env
file. You can use the .env.example
as a template.
# Database
DATABASE_URL="YOUR_POSTGRESQL_URL"
# App URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# AI Provider API Keys
GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
ANTHROPIC_API_KEY="YOUR_ANTHROPIC_API_KEY"
# E2B Sandbox API Key
E2B_API_KEY="YOUR_E2B_API_KEY"
# Clerk Authentication and Billing
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="YOUR_CLERK_PUBLISHABLE_KEY"
CLERK_SECRET_KEY="YOUR_CLERK_SECRET_KEY"
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
- Node.js 18+
- PostgreSQL or Neon.tech
- API keys (OpenAI, Anthropic, Gemini, E2B, Clerk)
git clone https://github.com/your-org/saas-ai-website-builder
cd saas-ai-website-builder
npm install
cp .env.example .env
# Fill in all API keys
npx prisma migrate dev
npm run dev
- This version is experimental, expect occasional issues.
- Results improve as you use it β context builds over time.
- The project is fully open-source β feel free to fork, improve, or use with different models.
- π§ Code is ready β just plug in your
.env
file and run it locally. - The system currently runs on Google Gemini API, which is powerful but can be unreliable or limited depending on usage.
- Sign up using Clerk
- Create a new website project
- Describe your idea to the AI
- Review and edit generated code
- Preview in sandbox
- Export or deploy
Deploy easily to Vercel, Netlify, etc.
npm run build
npm run start
We welcome contributions β especially in AI prompt engineering, UI/UX improvements, and API integrations.
# Fork
git checkout -b feature/your-feature-name
# After changes
git commit -m "feat: improved something"
git push origin feature/your-feature
Open a Pull Request π
Β© 2025 Hamzah Amir This code is licensed under the MIT License. Unauthorized commercial use without attribution is prohibited.