A modern, interactive 3D product customization application that allows users to design and personalize products like hoodies, jackets, and t-shirts. Users can add logos, adjust positioning, and customize colors in real-time using an intuitive 3D interface.
- 3D Product Visualization: Interactive 3D models of clothing items (hoodies, t-shirts, jackets)
- Real-time Customization: Live preview of design changes
- Logo Upload & Positioning: Add custom logos and adjust their position on products
- Color Customization: Change product colors with real-time preview
- Responsive Design: Works seamlessly across desktop and mobile devices
- Modern UI: Clean, intuitive interface built with Material-UI
- Smooth Animations: Enhanced user experience with Framer Motion
- Frontend Framework: React 19 with TypeScript
- 3D Graphics: Three.js with React Three Fiber
- 3D Utilities: @react-three/drei for enhanced 3D components
- UI Library: Material-UI (MUI) for modern component design
- Animations: Framer Motion for smooth transitions
- Build Tool: Vite for fast development and optimized builds
- Routing: React Router DOM for navigation
- Styling: Emotion for CSS-in-JS styling
- Fonts: Plus Jakarta Sans for typography
Make sure you have the following installed on your system:
- Node.js (version 18 or higher)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/your-username/react-3d-custom-product-designer.git cd react-3d-custom-product-designer
-
Install dependencies
# Using npm npm install # Using yarn yarn install
-
Start the development server
# Using npm npm run dev # Using yarn yarn dev
-
Open your browser Navigate to
http://localhost:5173
to see the application running.
npm run dev
- Start the development server with hot reloadnpm run build
- Build the application for productionnpm run preview
- Preview the production build locallynpm run lint
- Run ESLint to check code quality
src/
βββ api/ # API layer and data fetching
βββ assets/ # Static assets (3D models, icons, images)
βββ components/ # Reusable React components
β βββ designer/ # Designer-specific components
β βββ models/ # 3D model components
β βββ product/ # Product-related components
βββ configs/ # Application configuration
βββ constants/ # Application constants
βββ contexts/ # React context providers
βββ hooks/ # Custom React hooks
βββ pages/ # Page components
βββ plugins/ # Third-party plugin configurations
βββ types.d.ts # TypeScript type definitions
βββ utils/ # Utility functions
- Interactive 3D models rendered using Three.js and React Three Fiber
- Real-time rotation, zoom, and pan controls
- High-quality product models with realistic materials and lighting
- Logo Upload: Users can upload custom logos and images
- Position Control: Drag and drop logos to desired positions on the product
- Color Selection: Real-time color changes with instant preview
- Size Adjustment: Scale logos and design elements
- Responsive design that works on all devices
- Smooth animations and transitions using Framer Motion
- Intuitive controls with visual feedback
- Modern Material-UI components for consistent design
- Add 3D model files (
.glb
format) tosrc/assets/3d/
- Update the product data in
src/api/fakeApi.ts
- Create product-specific components if needed
- Update routing in
src/app-wrapper.tsx
The application uses Material-UI theming. Customize colors, typography, and spacing in:
src/theme.ts
- Main theme configurationsrc/configs/theme.config.ts
- Theme-specific settings
- Create components in the appropriate
src/components/
subdirectory - Add any new hooks to
src/hooks/
- Update context providers in
src/contexts/
if state management is needed - Add new pages to
src/pages/
and update routing
While this project doesn't include tests yet, we recommend adding:
- Unit Tests: For utility functions and hooks
- Component Tests: For React components using React Testing Library
- Integration Tests: For user workflows and 3D interactions
- Visual Regression Tests: For 3D rendering consistency
-
Build the application
npm run build
-
Preview the build
npm run preview
The built files will be in the dist/
directory, ready for deployment to any static hosting service.
This application can be deployed to various platforms:
- Vercel (recommended for React apps)
- Netlify
- GitHub Pages
- AWS S3 + CloudFront
- Any static hosting service
- Install Vercel CLI:
npm i -g vercel
- Run:
vercel
- Follow the prompts to deploy
We welcome contributions! Please follow these steps:
-
Fork the repository
git fork https://github.com/your-username/react-3d-custom-product-designer.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Follow the existing code style and conventions
- Add comments for complex logic
- Ensure TypeScript types are properly defined
-
Test your changes
npm run lint npm run build
-
Commit your changes
git commit -m "Add amazing feature"
-
Push to your branch
git push origin feature/amazing-feature
-
Open a Pull Request
- Provide a clear description of your changes
- Include screenshots for UI changes
- Reference any related issues
- Use TypeScript for all new code
- Follow React best practices and hooks patterns
- Use Material-UI components when possible
- Keep components small and focused
- Use meaningful variable and function names
- Add JSDoc comments for complex functions
If you find a bug or have a feature request:
- Check existing issues first
- Create a new issue with:
- Clear description of the problem/feature
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Screenshots if applicable
- Your environment details
This project is licensed under the MIT License - see the LICENSE file for details.
- Three.js - Amazing 3D graphics library
- React Three Fiber - React renderer for Three.js
- @react-three/drei - Useful helpers for React Three Fiber
- Material-UI - Beautiful React components
- Framer Motion - Smooth animations
- Vite - Fast build tool
If you have questions or need help:
- Open an issue on GitHub
- Check the documentation
- Review existing issues and discussions
Happy coding! π¨β¨