cd /Users/dvpandian/git/g-print-designer
npm run devOpen http://localhost:3000 in your browser.
- Add Text: Click "Add Text" button, then double-click to edit
- Upload Image: Click "Upload Image" to add your own images
- Clipart: Click "Clipart" dropdown to add predefined graphics
- Font: Select from dropdown (Arial, Helvetica, etc.)
- Size: Adjust with number input (8-200px)
- Color: Click color picker to change color
- Format: Use Bold (B), Italic (I), and alignment buttons
- Select: Click any layer to select it on canvas
- Hide/Show: Click eye icon to toggle visibility
- Delete: Click trash icon to remove layer
- Export PNG: Download design as high-res image for printing
- Save JSON: Save design data to edit later
- Import: Load previously saved JSON designs
Edit /src/app/page.tsx:
const productConfig: ProductConfig = {
name: 'Your Product Name',
mockupImage: '/path/to/mockup.png',
editableArea: {
left: 250, // Adjust these coordinates
top: 300, // based on your mockup
width: 300, // image
height: 400,
},
};- Add images to
/public/clipart/ - Update
CLIPART_IMAGESarray in/src/components/Toolbar.tsx:
const CLIPART_IMAGES = [
{ name: 'Heart', url: '/clipart/heart.png' },
{ name: 'Star', url: '/clipart/star.png' },
{ name: 'Your New Clipart', url: '/clipart/yourimage.png' },
];import DesignEditor from '@/components/DesignEditor';
function YourPage() {
const config = {
name: 'T-Shirt',
mockupImage: '/tshirt.png',
editableArea: { left: 250, top: 300, width: 300, height: 400 },
};
return <DesignEditor productConfig={config} />;
}- Next.js 16 - React framework
- Fabric.js - Canvas manipulation
- TypeScript - Type safety
- React Icons - UI icons
TypeScript may show import warnings for Fabric.js. These are type definition issues and don't affect functionality - the app works perfectly!