Skip to content

Mr-Coder-2707/first-project-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ SmartShop - WhatsApp Store

SmartShop Logo

Modern e-commerce platform with WhatsApp order integration

Vue.js Vite License

Live Demo | Documentation | Report Bug


πŸ“– About The Project

SmartShop is a modern e-commerce platform built with Vue.js, designed to provide users with a fast, responsive, and intuitive shopping experience similar to Amazon and Noon.

🎯 What Makes It Unique?

The unique feature of this website is that orders are processed directly through WhatsApp, allowing customers to send product details and purchase requests instantly without registration or payment gateways.

When a user clicks on the "Order via WhatsApp" button, the site automatically opens WhatsApp with a pre-filled message that includes:

  • βœ… Product name
  • βœ… Price and discount information
  • βœ… Product rating and reviews
  • βœ… Direct product link
  • βœ… Professional order request message

✨ Features

πŸ›’ E-Commerce Features

  • πŸͺ Product Catalog - Browse through a wide range of products
  • πŸ” Smart Search - Quick product search with real-time filtering
  • 🏷️ Category Filters - Filter products by category
  • ⭐ Product Ratings & Reviews - See what others think
  • πŸ’° Dynamic Pricing - Show original price, discounts, and savings
  • ❀️ Favorites System - Save products you love
  • πŸ“± Fully Responsive - Works perfectly on all devices

πŸ’¬ WhatsApp Integration

  • πŸ“² One-Click Ordering - Order products instantly via WhatsApp
  • πŸ“ Auto-Formatted Messages - Professional pre-filled order messages
  • πŸ”— Product Links - Share product details easily
  • 🌐 Universal Compatibility - Works on all devices with WhatsApp

🎨 User Experience

  • ⚑ Lightning Fast - Built with Vite for optimal performance
  • 🎯 Intuitive Navigation - Easy-to-use interface
  • 🌈 Modern Design - Clean and professional UI
  • πŸ“Š Product Details Page - Comprehensive product information
  • πŸ”„ Smooth Transitions - Animated page transitions
  • πŸ’Ύ Persistent Favorites - LocalStorage-based favorites

πŸš€ Technology Stack

Technology Purpose
Vue.js 3 Frontend framework with Composition API
Vue Router Client-side routing and navigation
Vite Build tool and development server
CSS3 Modern styling with custom properties
LocalStorage API Client-side data persistence
WhatsApp Business API Direct order integration

πŸ“ Project Structure

smartshop-whatsapp-store/
β”œβ”€β”€ public/
β”‚   └── shopping-cart.svg          # App favicon
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ProductCard.vue        # Individual product card
β”‚   β”‚   β”œβ”€β”€ ProductList.vue        # Products grid with filters
β”‚   β”‚   β”œβ”€β”€ SearchBar.vue          # Search functionality
β”‚   β”‚   β”œβ”€β”€ CategoryFilter.vue     # Category filtering
β”‚   β”‚   β”œβ”€β”€ Header.vue             # App header/navigation
β”‚   β”‚   └── Footer.vue             # App footer
β”‚   β”œβ”€β”€ views/
β”‚   β”‚   β”œβ”€β”€ Home.vue               # Homepage with product list
β”‚   β”‚   β”œβ”€β”€ ProductDetails.vue     # Product detail page
β”‚   β”‚   └── Favorites.vue          # User's favorite products
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── whatsapp.js            # WhatsApp integration logic
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── products.json          # Product database
β”‚   β”œβ”€β”€ App.vue                    # Root component
β”‚   β”œβ”€β”€ main.js                    # App entry point
β”‚   └── style.css                  # Global styles
β”œβ”€β”€ index.html                     # HTML template
β”œβ”€β”€ vite.config.js                 # Vite configuration
β”œβ”€β”€ package.json                   # Dependencies
β”œβ”€β”€ .gitignore                     # Git ignore rules
β”œβ”€β”€ netlify.toml                   # Netlify deployment config
└── README.md                      # This file

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn package manager
  • Git (for cloning)

Step 1: Clone the Repository

git clone https://github.com/yourusername/smartshop-whatsapp-store.git
cd smartshop-whatsapp-store

Step 2: Install Dependencies

npm install
# or
yarn install

Step 3: Configure WhatsApp Number

Open src/services/whatsapp.js and replace the phone number:

const WHATSAPP_NUMBER = '+201012345678' // Replace with your WhatsApp Business number

Format: +[country_code][phone_number] (no spaces or special characters)

Step 4: Run Development Server

npm run dev
# or
yarn dev

Visit http://localhost:5173 in your browser.

Step 5: Build for Production

npm run build
# or
yarn build

The production-ready files will be in the dist/ folder.


🌐 Deployment

Deploy to GitHub Pages

  1. Update vite.config.js with your repository name:

    export default defineConfig({
      base: '/your-repo-name/', // Replace with your repository name
    })
  2. Build the project:

    npm run build
  3. Deploy to GitHub Pages:

    # Install gh-pages
    npm install -g gh-pages
    
    # Deploy
    gh-pages -d dist
  4. Enable GitHub Pages in your repository settings:

    • Go to Settings β†’ Pages
    • Select gh-pages branch
    • Save

Deploy to Netlify

Option 1: Drag & Drop

  1. Run npm run build
  2. Go to Netlify Drop
  3. Drag the dist folder

Option 2: Git Integration

  1. Push your code to GitHub
  2. Go to Netlify
  3. Click "New site from Git"
  4. Select your repository
  5. Build settings:
    • Build command: npm run build
    • Publish directory: dist
  6. Click "Deploy site"

The netlify.toml file is already configured for optimal deployment.


πŸ“ Customization Guide

Adding New Products

Edit src/data/products.json:

{
  "id": 21,
  "name": "Your Product Name",
  "category": "Electronics",
  "price": 99.99,
  "originalPrice": 149.99,
  "discount": 33,
  "rating": 5,
  "reviews": 100,
  "image": "https://your-image-url.com/product.jpg",
  "description": "Your product description here"
}

Changing Colors

Edit CSS variables in src/style.css:

:root {
  --primary-color: #ff9900;      /* Brand color */
  --secondary-color: #232f3e;    /* Dark background */
  --success-color: #25d366;      /* WhatsApp green */
}

Updating Contact Information

Edit src/components/Footer.vue:

const phoneNumber = '+201012345678' // Your WhatsApp number

πŸŽ“ How It Works

WhatsApp Integration Flow

  1. User browses products on the website
  2. User clicks "Order via WhatsApp" on any product
  3. System generates formatted message with product details
  4. WhatsApp opens automatically with pre-filled message
  5. User sends message to seller/business
  6. Order processed via WhatsApp conversation

Message Format Example

πŸ›οΈ *New Order Request*

πŸ“¦ *Product:* Wireless Bluetooth Headphones
πŸ’° *Price:* $79.99
πŸ“ *Category:* Electronics

~~$129.99~~ πŸ”₯ *38% OFF*

⭐ *Rating:* ⭐⭐⭐⭐⭐ (1243 reviews)

πŸ”— *Product Link:* https://yoursite.com/#/product/1

βœ… I would like to order this product!

🀝 Contributing

Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

Distributed under the MIT License. See LICENSE file for more information.


πŸ‘¨β€πŸ’» Author

Your Name


πŸ™ Acknowledgments


πŸ“ž Support

If you have any questions or need help, feel free to:


🌟 Show Your Support

Give a ⭐️ if this project helped you!


Built with ❀️ using Vue.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published