Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

cobra91/artifact-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Artifact Studio

The future of component creation: AI-powered visual builder that transforms natural language into interactive React components.

Visual Artifact Studio Next.js React TypeScript Tailwind

🚀 What is Visual Artifact Studio?

Visual Artifact Studio is a revolutionary no-code platform that combines the visual design power of Figma, the live coding environment of CodeSandbox, and cutting-edge AI to create interactive React components from simple text descriptions.

Think Figma meets CodeSandbox meets AI.

✨ Key Features

🎨 Visual Builder Core

  • Drag & Drop Interface: Intuitive component creation with real-time positioning
  • Live Preview: Hot reload with instant visual feedback
  • Component Library: Pre-built templates and reusable components
  • Style Customization: Visual property panel with real-time styling

🤖 AI-Powered Generation

Transform natural language into fully functional components:

"Create a loan calculator with sliders" → Interactive calculator component
"Make a data visualization for sales" → Chart component with mock data
"Build a quiz about React hooks" → Interactive quiz widget
"Design a pricing table" → Responsive pricing grid

🛠️ Developer Experience

  • Framework Support: React (Vue & Svelte coming soon)
  • Styling Options: Tailwind CSS, plain CSS, styled-components
  • Code Export: Clean, production-ready component code
  • Version Control: Built-in artifact versioning
  • Performance Monitoring: Auto-optimization for mobile/desktop

🏗️ Architecture

┌─────────────────┐  ┌──────────────────┐  ┌─────────────────┐
│  Visual Canvas  │  │   AI Generator   │  │  Live Preview   │
│                 │  │                  │  │                 │
│ • Drag & Drop   │◄─┤ • Natural Lang   │─►│ • Hot Reload    │
│ • Positioning   │  │ • Code Gen       │  │ • Sandbox       │
│ • Selection     │  │ • Templates      │  │ • Export        │
└─────────────────┘  └──────────────────┘  └─────────────────┘
         │                      │                      │
         └──────────────────────┼──────────────────────┘
                                │
                    ┌──────────────────┐
                    │  Component Lib   │
                    │                  │
                    │ • Templates      │
                    │ • Primitives     │
                    │ • Custom         │
                    └──────────────────┘

🚦 Getting Started

Prerequisites

  • Node.js 18+
  • pnpm or yarn

Installation

# Clone the repository
git clone https://github.com/your-username/visual-artifact-studio.git
cd visual-artifact-studio

# Install dependencies
pnpm install

# Start development server
pnpm run dev

Open http://localhost:3000 to see the Visual Artifact Studio in action.

🎯 Quick Start Guide

1. Create Your First Component

  • Open the AI Prompt Panel (right sidebar)
  • Type: "Create a simple contact form with name, email, and message fields"
  • Click "✨ Generate Component"
  • Watch as your component appears on the canvas!

2. Customize with Visual Tools

  • Click any component on the canvas to select it
  • Use the Style Panel to adjust colors, fonts, spacing
  • Drag components to reposition them
  • Resize using the corner handles

3. Export Your Code

  • Switch to the "Code" tab in Live Preview
  • Copy the generated React component
  • Use it directly in your projects!

🧩 Component Library

Built-in Components

  • Container: Layout wrapper with styling options
  • Text: Typography with rich formatting
  • Button: Interactive buttons with hover states
  • Input: Form fields with validation
  • Image: Responsive images with lazy loading
  • Chart: Data visualization components

AI-Generated Templates

  • 🧮 Calculator: Loan, mortgage, tip calculators
  • 📊 Dashboard: Analytics and metrics displays
  • 📝 Forms: Contact, signup, survey forms
  • 🎯 Quiz: Interactive learning widgets
  • 💰 Pricing: Subscription and product tables
  • Todo: Task management interfaces

🤖 AI Prompt Examples

Get the most out of AI generation with these proven prompt:

// Financial Tools
"Create a mortgage calculator with loan amount, interest rate, and term sliders";

// Data Visualization
"Build a sales dashboard with bar charts showing monthly revenue trends";

// Interactive Learning
"Make a JavaScript quiz with 5 multiple choice questions and scoring";

// E-commerce
"Design a product comparison table with features, pricing, and buy buttons";

// Productivity
"Create a kanban board with drag and drop for task management";

// Marketing
"Build a landing page hero section with headline, subtext, and CTA button";

🎨 Styling System

Tailwind CSS Integration

All components use Tailwind CSS classes for consistent, responsive design:

// Example generated component
<div className="mx-auto max-w-md rounded-lg bg-white p-6 shadow-lg">
  <h2 className="mb-4 text-2xl font-bold text-gray-800">Generated Component</h2>
  <button className="w-full rounded bg-blue-600 py-2 text-white hover:bg-blue-700">
    Click Me
  </button>
</div>

Custom Styling

  • Visual Editor: Point-and-click styling
  • CSS Properties: Direct style object editing
  • Theme System: Consistent color palettes
  • Responsive: Mobile-first design approach

🔧 Development Roadmap

Phase 1: Core Foundation ✅

  • Visual canvas with drag & drop
  • Component library
  • Basic AI generation
  • Live preview system

Phase 2: Enhanced AI

  • Advanced prompt understanding
  • Context-aware generation
  • Multi-component layouts
  • Smart styling suggestions

Phase 3: Advanced Features

  • Animation builder
  • State management integration
  • API connection wizard
  • Performance optimization tools

🤝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Commit: git commit -m 'Add amazing feature'
  5. Push: git push origin feature/amazing-feature
  6. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Use Tailwind CSS for styling
  • Write tests for new features
  • Update documentation

📁 Project Structure

visual-artifact-studio/
├── app/
│   ├── components/          # React components
│   │   ├── ArtifactBuilder.tsx    # Main builder interface
│   │   ├── VisualCanvas.tsx       # Drag & drop canvas
│   │   ├── AIPromptPanel.tsx      # AI generation UI
│   │   ├── ComponentLibrary.tsx   # Component palette
│   │   ├── StylePanel.tsx         # Property editor
│   │   └── LivePreview.tsx        # Code preview
│   ├── lib/                 # Utilities and services
│   │   ├── aiCodeGen.ts          # AI generation logic
│   │   └── templates.ts          # Component templates
│   ├── types/               # TypeScript definitions
│   │   └── artifact.ts           # Core type definitions
│   └── page.tsx            # Main application entry
├── public/                  # Static assets
├── package.json            # Dependencies
└── README.md              # This file

🔗 Tech Stack

  • Framework: Next.js 15.4.7 with App Router
  • UI Library: React 19.1.0 with TypeScript
  • Styling: Tailwind CSS 4.x
  • State Management: React hooks (useState, useCallback)
  • Code Generation: Custom AI service integration
  • Development: Hot reload, ESLint, TypeScript

📊 Performance

Visual Artifact Studio is optimized for speed:

  • Fast Refresh: Sub-second component updates
  • Lazy Loading: Components load on demand
  • Code Splitting: Minimal bundle sizes
  • Caching: Intelligent template caching
  • Mobile Optimized: Touch-friendly interface

🐛 Known Issues & Limitations

  • AI generation currently uses mock responses (real AI integration coming soon)
  • Component nesting limited to 3 levels deep
  • Export format currently React-only (Vue/Svelte support planned)
  • Undo/redo functionality in development

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Inspired by Figma's design philosophy
  • Built on the shoulders of the React ecosystem
  • Powered by the amazing Tailwind CSS framework
  • Special thanks to the Next.js team for the incredible developer experience

Ready to build the future of component creation?

Get StartedDocumentationExamplesCommunity

Made with ❤️ by developers, for developers

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors