Skip to content

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 Started โ€ข Documentation โ€ข Examples โ€ข Community

Made with โค๏ธ by developers, for developers

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •