A modern platform connecting artisans with customers worldwide, featuring AI-powered product enhancement and voice-to-text capabilities.
- Product Management: Add, edit, and manage your handicraft products
- AI Image Enhancement: Automatically enhance product photos with professional backgrounds
- Voice-to-Text: Describe your products using voice input
- AI Content Generation: Get AI-generated product descriptions and Instagram captions
- Real-time Dashboard: View your products and manage inventory
- Product Discovery: Browse products by category
- Enhanced Shopping: View AI-enhanced product images
- Shopping Cart: Add products and manage your cart
- Product Details: View detailed product information with AI-generated descriptions
- Python Flask: RESTful API server
- MySQL: Database for product and user data
- Google Cloud AI: Image enhancement and content generation
- Google Cloud Storage: Image storage and management
- React + TypeScript: Modern web application
- Vite: Fast build tool and development server
- Tailwind CSS: Utility-first CSS framework
- Radix UI: Accessible component library
- Python 3.8+
- Node.js 16+
- MySQL 8.0+
- Google Cloud Platform account (for AI features)
cd backend
pip install -r requirements.txtCreate a .env file:
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=artisan_platform
GCLOUD_PROJECT_ID=your_project_id
REGION=us-central1
GCS_BUCKET_NAME=your_bucket_nameSet up the database:
# Import the database schema
mysql -u root -p < Artisans_platform.sql
# Run migration to add missing fields
python migrate_database.py
# Start the backend server
python app.pycd frontend
npm install
npm run dev# Run the API test script
python test_integration.pyGET /api/products- List all productsPOST /api/products- Add new productGET /api/products/{id}- Get specific productPUT /api/products/{id}- Update productDELETE /api/products/{id}- Delete product
POST /api/generate_content- Generate product descriptionsPOST /api/enhance_image- Enhance product images
- Login as a seller
- Navigate to "Add Product"
- Fill in product details (name, price, category)
- Add a description (text or voice input)
- Upload a product image
- Optionally enhance the image with AI
- Submit the product
- Login as a buyer
- Browse products by category
- View product details
- Add products to cart
- Manage your shopping cart
The integration includes comprehensive testing:
- API Testing: Use
test_integration.pyto verify backend functionality - Frontend Testing: Manual testing through the web interface
- End-to-End Testing: Complete seller workflow from product creation to display
Varnika/
├── backend/
│ ├── app.py # Main Flask application
│ ├── database.py # Database connection
│ ├── migrate_database.py # Database migration script
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── src/
│ │ ├── App.tsx # Main React component
│ │ ├── services/
│ │ │ └── api.ts # API service layer
│ │ └── components/ # UI components
│ └── package.json # Node.js dependencies
├── Artisans_platform.sql # Database schema
├── test_integration.py # API testing script
└── setup_instructions.md # Detailed setup guide
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please refer to the setup instructions or create an issue in the repository.