Generate, Edit, and Explore designs with AI. Export clean, responsive code.
π Live Demo β’ π Documentation β’ π Report Bug β’ β¨ Request Feature
- β¨ Features
- π οΈ Tech Stack
- π Quick Start
- βοΈ Installation
- π§ Configuration
- π± Usage
- ποΈ Project Structure
- π API Reference
- π¨ UI Components
- ποΈ Database Schema
- π Authentication
- π Environment Variables
- π€ Contributing
- π License
- π€ AI-Powered Generation - Generate complete website designs from text descriptions
- π¨ Real-time Preview - See your designs come to life instantly
- π± Responsive Design - Mobile-first, responsive layouts out of the box
- π§ Code Export - Export clean, production-ready HTML/CSS/React code
- π Multiple Templates - Dashboard, forms, hero sections, and user profiles
- π Secure Authentication - Powered by Clerk with social logins
- π€ User Profiles - Personalized workspaces and project management
- π³ Credit System - Built-in credit system for AI generations
- π Project Tracking - Save and manage multiple projects
- πΌοΈ Frame Management - Organize designs in frames
- π¬ Chat History - Keep track of all your design conversations
- π¨ Design Suggestions - Pre-built prompts for common design patterns
- β‘ Quick Actions - Fast access to frequently used features
- βοΈ React 19 - Latest React with concurrent features
- β¬ Next.js 15 - Full-stack React framework with App Router
- π¨ Tailwind CSS 4 - Utility-first CSS framework
- π§© Radix UI - Headless, accessible UI components
- π Next Themes - Dark/light mode support
- π Recharts - Beautiful charts and data visualization
- π PostgreSQL - Robust relational database
- π’ Neon - Serverless PostgreSQL platform
- ποΈ Drizzle ORM - Type-safe database ORM
- π Drizzle Kit - Database migrations and introspection
- π Clerk - Complete authentication solution
- π JWT - Secure token-based authentication
- π‘οΈ Middleware - Route protection and security
- π TypeScript - Type-safe JavaScript
- π ESLint - Code linting and formatting
- π― Axios - HTTP client for API requests
- π Sonner - Beautiful toast notifications
- π UUID - Unique identifier generation
- Node.js 18.17 or later
- npm or yarn or pnpm
- PostgreSQL database (Neon recommended)
- Clerk account for authentication
git clone https://github.com/deekshith-b48/Buildify.git
cd Buildifynpm install
# or
yarn install
# or
pnpm installcp .env.example .env.local# Push database schema
npx drizzle-kit pushnpm run devVisit http://localhost:3000 to see your application!
Create a .env.local file in the root directory:
# Database Configuration
DATABASE_URL="postgresql://username:password@host:5432/database?sslmode=require"
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_your_key_here"
CLERK_SECRET_KEY="sk_test_your_key_here"
# Clerk URLs
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL="/workspace"
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL="/workspace"- Create a Neon Account at neon.tech
- Create a new project and database
- Copy the connection string to your
.env.local - Run migrations:
npx drizzle-kit push
- Create a Clerk Account at clerk.com
- Create a new application
- Copy your keys from the API Keys section
- Add keys to your
.env.localfile
-
π Visit the Homepage - Open the application in your browser
-
βοΈ Describe Your Design - Enter a description in the text area
Example: "Create a modern dashboard with charts and user metrics" -
π― Use Quick Suggestions - Or click on pre-made suggestions:
- π Dashboard
- π SignUp Form
- π Hero Section
- π€ User Profile Card
-
π Generate - Click the Generate button to create your design
-
π Review - View your generated design in the playground
-
πΌ Save - Your project is automatically saved to your workspace
- π Workspace View - Access all your projects from
/workspace - π³ Credits System - Monitor your remaining generation credits
- ποΈ Project Organization - Projects are organized by creation date
- π Continue Editing - Resume work on any saved project
ai-website-generator/
βββ π app/ # Next.js App Router
β βββ π _components/ # Shared components
β β βββ Header.jsx # Navigation header
β β βββ Hero.tsx # Main hero section
β βββ π api/ # API routes
β β βββ π projects/ # Project management
β β βββ π users/ # User management
β βββ π workspace/ # Workspace pages
β β βββ π _components/ # Workspace components
β β β βββ AppSidebar.tsx # Main sidebar
β β β βββ AppHeader.tsx # Workspace header
β β βββ layout.tsx # Workspace layout
β β βββ page.tsx # Workspace page
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Homepage
βββ π components/ # Reusable UI components
β βββ π ui/ # Shadcn/ui components
βββ π config/ # Configuration files
β βββ schema.ts # Database schema
βββ π context/ # React contexts
β βββ UserDetailContext.tsx # User state management
βββ π hooks/ # Custom React hooks
βββ π lib/ # Utility libraries
β βββ drizzle.ts # Database connection
β βββ utils.ts # Helper functions
βββ π public/ # Static assets
βββ π Configuration files
βββ tailwind.config.js # Tailwind configuration
βββ drizzle.config.ts # Drizzle ORM config
βββ next.config.ts # Next.js configuration
βββ tsconfig.json # TypeScript config
POST /api/projectsRequest Body:
{
"projectId": "uuid-string",
"frameId": "unique-frame-id",
"messages": [
{
"role": "user",
"content": "Create a modern dashboard"
}
]
}Response:
{
"success": true,
"project": { /* project data */ },
"frame": { /* frame data */ },
"chats": [ /* chat history */ ]
}POST /api/usersResponse:
{
"success": true,
"user": {
"id": 1,
"clerkId": "user_xxx",
"name": "John Doe",
"email": "john@example.com",
"credits": 100
},
"created": true
}- π² Button - Various button styles and states
- π Input - Form inputs with validation
- π Progress - Progress bars and indicators
- π Avatar - User profile pictures
- π Card - Content containers
- π¨ Badge - Status and category badges
- π± Sidebar - Collapsible navigation
- π¬ Toast - Notification system
- π― Tooltip - Helpful hover information
- π Charts - Data visualization components
- π Dark Mode - Complete dark theme
- βοΈ Light Mode - Clean light theme
- π¨ Custom Themes - Easily customizable
-- Users table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
clerkId VARCHAR(255) UNIQUE NOT NULL,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
credits INTEGER DEFAULT 100,
createdAt TIMESTAMP DEFAULT NOW()
);
-- Projects table
CREATE TABLE projects (
id SERIAL PRIMARY KEY,
projectId VARCHAR(255) UNIQUE NOT NULL,
createdBy VARCHAR REFERENCES users(clerkId),
createdOn TIMESTAMP DEFAULT NOW()
);
-- Frames table
CREATE TABLE frames (
id SERIAL PRIMARY KEY,
frameId VARCHAR(255) UNIQUE NOT NULL,
projectId VARCHAR REFERENCES projects(projectId),
frameType VARCHAR(255) NOT NULL,
createdOn TIMESTAMP DEFAULT NOW()
);
-- Chats table
CREATE TABLE chats (
id SERIAL PRIMARY KEY,
chatId VARCHAR(255) UNIQUE NOT NULL,
chatMessage JSON,
createdBy VARCHAR REFERENCES users(clerkId),
createdOn TIMESTAMP DEFAULT NOW()
);- Users β Projects (One-to-Many)
- Projects β Frames (One-to-Many)
- Users β Chats (One-to-Many)
This application uses Clerk for authentication with the following features:
- π Multiple Sign-in Options - Email, Google, GitHub, etc.
- π€ User Management - Complete user profile management
- π‘οΈ Route Protection - Automatic route protection
- π± Responsive Auth UI - Mobile-friendly auth components
- π Session Management - Automatic session handling
/workspace- Requires authentication/api/projects- Requires authentication/api/users- Requires authentication
// middleware.ts
export default clerkMiddleware(async (auth, req) => {
if (isProtectedRoute(req)) {
await auth.protect()
}
})| Variable | Description | Required | Example |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | β | postgresql://user:pass@host/db |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk publishable key | β | pk_test_xxx |
CLERK_SECRET_KEY |
Clerk secret key | β | sk_test_xxx |
NEXT_PUBLIC_CLERK_SIGN_IN_URL |
Sign in page URL | β | /sign-in |
NEXT_PUBLIC_CLERK_SIGN_UP_URL |
Sign up page URL | β | /sign-up |
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL |
Redirect after sign in | β | /workspace |
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL |
Redirect after sign up | β | /workspace |
We love contributions! 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 some amazing feature' - π€ Push to the branch
git push origin feature/amazing-feature
- π Open a Pull Request
- β Follow TypeScript best practices
- π¨ Use Tailwind CSS for styling
- π§ͺ Add tests for new features
- π Update documentation
- π Ensure code passes ESLint
# Run linting
npm run lint
# Format code
npm run format
# Type checking
npm run type-check- π€ Advanced AI Models - Integration with GPT-4 and Claude
- π¨ Design Templates - Pre-built industry templates
- π Version Control - Git-like versioning for designs
- π₯ Team Collaboration - Multi-user project collaboration
- π± Mobile App - Native mobile application
- π― A/B Testing - Built-in A/B testing tools
- π Analytics - Design performance analytics
- π Multi-language - Internationalization support
Found a bug? Please report it:
- π Check existing issues first
- π Create detailed bug report
- π·οΈ Use appropriate labels
- πΈ Include screenshots if applicable
- π Documentation - Check this README first
- π¬ Discussions - Join community discussions
- π§ Email - Contact support team
This project is licensed under the MIT License - see the LICENSE file for details.
- βοΈ React Team - For the amazing React framework
- β¬ Vercel - For Next.js and hosting platform
- π¨ Tailwind Labs - For the beautiful Tailwind CSS
- π Clerk - For seamless authentication
- π Neon - For serverless PostgreSQL
- ποΈ Drizzle Team - For type-safe ORM
- π Contributors - All the amazing contributors
- π Bug Reporters - Helping improve the application
- π‘ Feature Requesters - Driving innovation
- π Documentation Writers - Making it accessible
Made with β€οΈ by Deekshith B
π Star β’ π΄ Fork β’ π Issues β’ π Pull Requests