Skip to content

A comprehensive web application for rapidly building and deploying apps via natural language prompts.

Notifications You must be signed in to change notification settings

Purnavu-12/ArtMaster__

Repository files navigation

ArtMaster - AI Web Application Builder

ArtMaster is a powerful AI-powered web application builder that lets you create production-ready web applications through natural language conversations. Built with Next.js 15, Supabase, and Tailwind CSS.

Features

  • AI-Powered Development - Describe what you want to build in plain English
  • Real-time Preview - See your changes instantly as you build
  • Code Export - Get clean, production-ready HTML/Tailwind code
  • Project Management - Create and manage multiple projects
  • User Authentication - Secure login with email/password or OAuth (GitHub, Google)
  • Responsive Design - All generated code is mobile-friendly

Tech Stack

  • Framework: Next.js 15 (App Router)
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • Styling: Tailwind CSS
  • UI Components: shadcn/ui
  • Animations: Framer Motion

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

1. Clone the Repository

git clone https://github.com/Purnavu-12/ArtMaster__.git

2. Install Dependencies

npm install
# or
yarn install
# or
pnpm install
# or
bun install

3. Set Up Supabase

  1. Go to supabase.com and create a new project
  2. Once your project is created, go to Settings > API to get your credentials
  3. Go to SQL Editor and run the following SQL to create the required tables:
-- Create profiles table
CREATE TABLE IF NOT EXISTS profiles (
  id UUID PRIMARY KEY REFERENCES auth.users(id) ON DELETE CASCADE,
  email TEXT NOT NULL,
  full_name TEXT,
  avatar_url TEXT,
  plan TEXT DEFAULT 'free',
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- Create projects table
CREATE TABLE IF NOT EXISTS projects (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
  name TEXT NOT NULL,
  description TEXT,
  status TEXT DEFAULT 'draft',
  preview_url TEXT,
  deployed_url TEXT,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- Create chat_messages table
CREATE TABLE IF NOT EXISTS chat_messages (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
  role TEXT NOT NULL,
  content TEXT NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- Create project_files table
CREATE TABLE IF NOT EXISTS project_files (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
  file_path TEXT NOT NULL,
  content TEXT NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  CONSTRAINT unique_project_file UNIQUE (project_id, file_path)
);

-- Create indexes for better performance
CREATE INDEX IF NOT EXISTS idx_projects_user_id ON projects(user_id);
CREATE INDEX IF NOT EXISTS idx_chat_messages_project_id ON chat_messages(project_id);
CREATE INDEX IF NOT EXISTS idx_project_files_project_id ON project_files(project_id);

4. Configure Environment Variables

Create a .env.local file in the root directory:

cp .env.example .env.local

Add the following environment variables:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
DATABASE_URL=your_database_connection_string

Replace the placeholder values with your actual Supabase credentials:

  • NEXT_PUBLIC_SUPABASE_URL: Found in Supabase Dashboard > Settings > API > Project URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY: Found in Supabase Dashboard > Settings > API > anon public key
  • SUPABASE_SERVICE_ROLE_KEY: Found in Supabase Dashboard > Settings > API > service_role key
  • DATABASE_URL: Found in Supabase Dashboard > Settings > Database > Connection string (Session pooler)

5. Configure OAuth Providers (Optional)

To enable GitHub and Google login:

GitHub:

  1. Go to GitHub Developer Settings
  2. Create a new OAuth App
  3. Set the callback URL to: https://your-supabase-project.supabase.co/auth/v1/callback
  4. Add the Client ID and Secret in Supabase Dashboard > Authentication > Providers > GitHub

Google:

  1. Go to Google Cloud Console
  2. Create OAuth 2.0 credentials
  3. Set the callback URL to: https://your-supabase-project.supabase.co/auth/v1/callback
  4. Add the Client ID and Secret in Supabase Dashboard > Authentication > Providers > Google

6. Run the Development Server

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser.

Project Structure

artmaster/
├── src/
│   ├── app/                    # Next.js App Router pages
│   │   ├── api/                # API routes
│   │   │   └── chat/           # AI chat endpoint
│   │   ├── auth/               # Auth callback
│   │   ├── dashboard/          # Dashboard & project editor
│   │   ├── login/              # Login page
│   │   ├── signup/             # Signup page
│   │   ├── layout.tsx          # Root layout
│   │   └── page.tsx            # Landing page
│   ├── components/             # React components
│   │   ├── dashboard/          # Dashboard components
│   │   ├── landing/            # Landing page sections
│   │   └── ui/                 # shadcn/ui components
│   └── lib/                    # Utilities & configurations
│       └── supabase/           # Supabase client setup
├── public/                     # Static assets
├── .env.local                  # Environment variables
└── package.json

Available Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm run start Start production server
npm run lint Run ESLint

Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Import the project on Vercel
  3. Add your environment variables in Vercel's dashboard
  4. Deploy!

Other Platforms

The app can be deployed to any platform that supports Node.js:

  • Netlify
  • Railway
  • Render
  • DigitalOcean App Platform

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Support

If you have any questions or need help, please open an issue on GitHub and we also are appreciate contribution .

Built with AI, powered by creativity. image

About

A comprehensive web application for rapidly building and deploying apps via natural language prompts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published