Skip to content
View Shaad7771's full-sized avatar

Block or report Shaad7771

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please donโ€™t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
Shaad7771/README.md

๐Ÿพ UNQ Pets - Pet E-Commerce Website

๐ŸŽ‰ Complete Full-Stack Pet Store with Animations, Sounds & Haptic Feedback!

A beautiful, animated e-commerce website for pet products featuring playful animations, real-time pet sounds, haptic feedback, and Stripe payment integration.


โœจ Features

๐ŸŽจ Design & Animations

  • Funky Pet Theme: Vibrant orange (#FF7A00), yellow (#FFD166), and mint (#A8E6CF) colors
  • Animated Pet Loader: Rotating pet emojis on page load
  • Floating Paw Prints: Background animations throughout the site
  • Hover Effects: Smooth scale and transform animations
  • Confetti Celebrations: Particle effects on purchases and cart additions
  • Gradient Marquee: Scrolling trust badges banner

๐Ÿ”Š Sound System (5 Unique Pet Sounds)

  • ๐Ÿ• Bark - Deep double bark
  • ๐Ÿˆ Meow - Melodic cat sound
  • ๐Ÿˆโ€โฌ› Purr - Gentle purring
  • ๐Ÿฆ Chirp - Happy chirp
  • ๐Ÿฆฎ Woof - Friendly woof
  • Sound Demo Panel: Interactive button to test all sounds
  • Sound Toggle: Enable/disable with persistence

๐Ÿ“ฑ Haptic Feedback

  • Light Vibration: Clicks, hovers, quantity buttons
  • Medium Vibration: Add to cart, major actions
  • Success Pattern: 5-pulse celebration
  • Error Pattern: Alert vibrations
  • Works on all mobile devices

๐Ÿ›’ E-Commerce Features

  • 6 Pet Products: Grooming, Travel, Accessories, Toys, Comfort, Feeding
  • Shopping Cart: localStorage persistence
  • Stripe Checkout: Working payment integration (test mode)
  • PayPal Ready: Structure for easy integration
  • Product Filtering: Category-based filters
  • Order Management: Transaction tracking in MongoDB

๐ŸŽฏ User Experience

  • Trust Badges: Quality, Fast Shipping, 30-Day Returns, Happy Pets
  • Customer Reviews: Testimonial section with ratings
  • Responsive Design: Mobile-friendly with Tailwind CSS
  • Modern Components: Shadcn/UI library

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v16+)
  • Python (v3.9+)
  • MongoDB (running locally or cloud)
  • Yarn package manager

1. Install Dependencies

Backend

cd backend
pip install -r requirements.txt

Frontend

cd frontend
yarn install

2. Environment Setup

Backend (.env)

MONGO_URL=mongodb://localhost:27017
DB_NAME=unq_pets_db
CORS_ORIGINS=*
STRIPE_API_KEY=sk_test_emergent

Frontend (.env)

REACT_APP_BACKEND_URL=http://localhost:8001
WDS_SOCKET_PORT=443
ENABLE_HEALTH_CHECK=false

3. Run the Application

Start Backend

cd backend
python server.py
# Runs on http://localhost:8001

Start Frontend

cd frontend
yarn start
# Runs on http://localhost:3000

4. Access the Website

Open http://localhost:3000 in your browser


๐Ÿ“ Project Structure

unq-pets-website/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ server.py          # FastAPI application
โ”‚   โ”œโ”€โ”€ requirements.txt   # Python dependencies
โ”‚   โ””โ”€โ”€ .env              # Backend environment variables
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/   # React components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Footer.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PetLoader.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PawBackground.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ SoundToggle.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ SoundDemo.js
โ”‚   โ”‚   โ”œโ”€โ”€ pages/        # Page components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Products.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ProductDetail.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Cart.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Success.js
โ”‚   โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sounds.js # Sound & haptic utilities
โ”‚   โ”‚   โ”œโ”€โ”€ App.js
โ”‚   โ”‚   โ””โ”€โ”€ index.css
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ .env
โ”œโ”€โ”€ memory/
โ”‚   โ””โ”€โ”€ PRD.md            # Product requirements
โ””โ”€โ”€ README.md             # This file

๐ŸŽฎ How to Use Sound Features

Sound Toggle (Bottom Right)

  • Click the orange speaker button to enable/disable sounds
  • On hover, shows tooltip with status
  • Green dot appears on mobile devices

Sound Demo (Yellow Sparkle Button)

  • Click to open the pet sounds panel
  • Try all 5 unique pet sounds
  • Each sound has haptic feedback

Automatic Sounds

  • Add to Cart: Random pet sound + confetti
  • Remove Item: Sad descending tone
  • Purchase Success: Musical jingle + bark
  • Button Clicks: Subtle click sounds
  • Quantity Changes: Click feedback

๐Ÿ’ณ Payment Integration

Stripe (Ready to Use)

  • Test key included: sk_test_emergent
  • Full checkout flow implemented
  • Payment status polling
  • Webhook endpoint ready

PayPal (Structure Ready)

To enable PayPal:

  1. Get PayPal API credentials
  2. Add to backend .env
  3. The structure is already in place

๐ŸŽจ Customization

Colors (in index.css)

:root {
  --primary: #FF7A00;      /* Orange */
  --secondary: #A8E6CF;    /* Mint */
  --accent: #FFD166;       /* Yellow */
  --background: #FFFDF7;   /* Cream */
  --foreground: #2D3748;   /* Dark gray */
}

Fonts

  • Headings: Fredoka (playful, rounded)
  • Body: Nunito (friendly, readable)

Products

Edit the PET_PRODUCTS array in backend/server.py:

PET_PRODUCTS = [
    {
        "id": "prod_1",
        "name": "Your Product",
        "description": "Description",
        "price": 24.99,
        "category": "Category",
        "image": "image-url",
        "rating": 5,
        "inStock": True
    }
]

๐Ÿ”ง Technologies Used

Frontend

  • React 18
  • Tailwind CSS
  • Framer Motion (animations)
  • Canvas Confetti
  • React Router
  • Shadcn/UI
  • React Fast Marquee
  • PayPal React SDK

Backend

  • FastAPI
  • Motor (async MongoDB)
  • Emergent Integrations (Stripe)
  • Pydantic
  • Python Dotenv

Database

  • MongoDB

APIs

  • Web Audio API (sound generation)
  • Vibration API (haptic feedback)
  • Stripe API (payments)

๐Ÿ“ฑ Mobile Optimization

  • Responsive design with Tailwind breakpoints
  • Touch-friendly buttons and interactions
  • Haptic feedback for all actions
  • Optimized images and animations
  • Mobile-first approach

๐Ÿ› Troubleshooting

Backend won't start

# Check if MongoDB is running
sudo systemctl status mongod

# Install missing dependencies
pip install -r requirements.txt

Frontend errors

# Clear cache and reinstall
rm -rf node_modules yarn.lock
yarn install

Stripe checkout fails

  • Check that STRIPE_API_KEY is set in backend/.env
  • Verify REACT_APP_BACKEND_URL in frontend/.env

Sounds not playing

  • Check browser console for errors
  • Some browsers block autoplay audio
  • User interaction required for first sound

๐ŸŽฏ Testing

Test Cart Persistence

  1. Add products to cart
  2. Refresh the page
  3. Cart should persist

Test Stripe Checkout

  1. Add items to cart
  2. Click "Pay with Stripe"
  3. Use test card: 4242 4242 4242 4242
  4. Any future expiry, any CVC

Test Sounds

  1. Click yellow sparkle button
  2. Try each pet sound
  3. Toggle sound on/off

๐Ÿš€ Deployment

Backend Deployment (Railway/Render)

  1. Set environment variables
  2. Deploy from GitHub
  3. Update REACT_APP_BACKEND_URL in frontend

Frontend Deployment (Vercel/Netlify)

  1. Set environment variables
  2. Build command: yarn build
  3. Publish directory: build

MongoDB (MongoDB Atlas)

  1. Create cluster
  2. Get connection string
  3. Update MONGO_URL in backend/.env

๐Ÿ“Š Performance

  • Initial Load: ~2 seconds (with pet loader)
  • Sound Generation: Web Audio API (no file loading)
  • Animations: GPU-accelerated with Framer Motion
  • Bundle Size: ~294 KB (excluding dependencies)

๐ŸŽ What Makes This Special

  1. Multi-Sensory Experience: Visual + Audio + Touch
  2. No Audio Files: All sounds generated via Web Audio API
  3. Pet Personality: Every interaction feels playful
  4. Production Ready: Complete with payments, cart, orders
  5. Mobile Optimized: Haptic feedback for native feel
  6. Highly Animated: Smooth, delightful interactions

๐Ÿ“ž Support

For issues or questions:

  • Check the troubleshooting section above
  • Review the code comments
  • Test with browser console open

๐ŸŽ‰ Enjoy Your Pet Store!

Your customers will love:

  • ๐Ÿพ Playful pet sounds
  • ๐Ÿ“ฑ Haptic feedback on mobile
  • ๐ŸŽŠ Confetti celebrations
  • โœจ Smooth animations
  • ๐Ÿ’ณ Easy checkout
  • ๐ŸŽฏ Delightful experience

Made with โค๏ธ for Pet Parents


๐Ÿ“ License

Free to use for personal and commercial projects.


๐Ÿ™ Credits

  • Pet emojis: Unicode Consortium
  • Fonts: Google Fonts (Fredoka, Nunito)
  • UI Components: Shadcn/UI
  • Icons: Lucide React
  • Animations: Framer Motion

Happy Selling! ๐Ÿ•๐Ÿˆ๐ŸŽ‰

Popular repositories Loading

  1. Shaad7771 Shaad7771 Public

    Config files for my GitHub profile.

    JavaScript