Full System Setup & Customization Guide

Shopy Documentation

Step-by-step guide to installing, configuring and deploying the complete Shopy multi-vendor platform.

Production Ready v2.0.0
1

Overview & Architecture

Shopy is a comprehensive multi-vendor ecosystem engineered to power food delivery, online grocery shopping, pharmacy orders, and general e-commerce marketplaces under a single unified backend.

Customer App
Flutter iOS & Android
Driver App
Flutter iOS & Android
Backend API
Laravel RESTful Engine
Admin Panels
Super Admin & Seller Web
2

File & Package Structure

When you unzip your purchase package from CodeCanyon, you will find the following directory structure:

shopy-main/
├── backend/                      # Laravel REST API Backend & Super Admin / Seller Web
│   ├── app/                      # Controllers, Models, Middleware, Services
│   ├── config/                   # App, database, services, auth configs
│   ├── database/                 # Migrations and Seeds
│   ├── public/                   # Public assets & entry point (index.php)
│   ├── routes/                   # api.php, web.php, channels.php
│   └── .env.example              # Sample environment variables
├── customer_app/                 # Customer Mobile Flutter Project
│   ├── lib/                      # Flutter UI screens, state management, API services
│   ├── android/                  # Android native project files
│   └── ios/                      # iOS native Xcode project files
├── delivery_boy_app/             # Delivery Partner Mobile Flutter Project
│   ├── lib/                      # Driver UI, location tracking, order acceptance
│   ├── android/                  # Android native project files
│   └── ios/                      # iOS native project files
└── documentation/                # Offline documentation & help resources
3

System Requirements

Server & Backend Requirements
  • PHP: 8.1 or 8.2+
  • Database: MySQL 5.7+ or MariaDB 10.3+
  • Web Server: Apache (with mod_rewrite) or Nginx
  • Required PHP Extensions: BCMath, Ctype, Fileinfo, JSON, Mbstring, OpenSSL, PDO, PDO_MySQL, Tokenizer, XML, cURL, GD / Imagick, Zip
  • Composer: 2.x
Flutter Development Requirements
  • Flutter SDK: 3.24.x (or latest stable)
  • Dart SDK: 3.5.x+
  • IDE: Android Studio (Recommended) or VS Code with Flutter extension
  • Xcode: 15+ (for building iOS app on macOS)
4

Backend Installation & Database Setup

Note: You can install Shopy backend on any VPS (Ubuntu/Debian with Nginx/Apache) or standard cPanel / shared hosting with PHP 8.1+.
Step 1: Upload Files & Set Permissions

Upload the contents of the backend/ folder to your web root (e.g. public_html or /var/www/shopy). Ensure web server points to the public/ folder.

# Set directory permissions on Linux server
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
Step 2: Install Composer Dependencies
composer install --no-dev --optimize-autoloader
Step 3: Run Database Migrations & Seeds
php artisan migrate --seed
php artisan storage:link
php artisan key:generate
5

Environment Configuration (.env)

Copy .env.example to .env and fill in your database and service details:

APP_NAME=Shopy
APP_ENV=production
APP_KEY=base64:...
APP_DEBUG=false
APP_URL=https://api.yourdomain.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_shopy_db
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password

# Firebase Cloud Messaging
FCM_SERVER_KEY=your_firebase_server_key

# Google Maps API
GOOGLE_MAP_API_KEY=your_google_maps_api_key

# Payment Credentials
STRIPE_KEY=your_stripe_publishable_key
STRIPE_SECRET=your_stripe_secret_key
PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_SECRET=your_paypal_secret
6

Cron Jobs & Background Queues

To handle automatic driver assignment, order timeout checks, scheduled discounts, and email queues, configure a cron job on your server:

* * * * * cd /path-to-your-backend && php artisan schedule:run >> /dev/null 2>&1
7

Flutter Mobile Apps Setup

Follow these steps for both customer_app and delivery_boy_app:

  1. Open the project directory in Android Studio or VS Code.
  2. Run flutter pub get in the terminal to fetch all dependencies.
  3. Locate the API config file at lib/config/api_constants.dart and set your backend URL:
// lib/config/api_constants.dart
class ApiConstants {
  static const String baseUrl = 'https://api.yourdomain.com/api/v1/';
  static const String appName = 'Shopy';
  static const String defaultCurrency = '$';
}
8

App Name & Package Identifier

Android:
  • Update android:label="Your App Name" in android/app/src/main/AndroidManifest.xml.
  • Change applicationId in android/app/build.gradle (e.g., com.yourbrand.shopy).
iOS:
  • Open ios/Runner.xcworkspace in Xcode.
  • In the General tab, update Display Name and Bundle Identifier.
9

Firebase & Push Notifications

  1. Create a project in Firebase Console.
  2. Add an Android App, register your package name, download google-services.json, and place it in android/app/.
  3. Add an iOS App, download GoogleService-Info.plist, and add it via Xcode to the Runner folder.
  4. Copy your Server Key / Cloud Messaging Credentials from Firebase Console and paste it into your backend .env file under FCM_SERVER_KEY.
10

Google Maps Live Tracking Setup

Enable the following APIs in Google Cloud Console: Maps SDK for Android, Maps SDK for iOS, Places API, Directions API, and Geocoding API.

Android Configuration:
<!-- android/app/src/main/AndroidManifest.xml -->
<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="YOUR_GOOGLE_MAPS_API_KEY" />
iOS Configuration:
// ios/Runner/AppDelegate.swift
import GoogleMaps

GMSServices.provideAPIKey("YOUR_GOOGLE_MAPS_API_KEY")
11

Payment Gateways Setup

Shopy supports 5 payment methods out of the box:

Gateway Config Location Features Supported
Stripe Admin Panel > Settings > Payments / .env Credit/Debit cards, Apple Pay, Google Pay, 3D Secure
PayPal Admin Panel > Settings > Payments / .env PayPal Express checkout, global currencies
Razorpay Admin Panel > Settings > Payments / .env UPI, Netbanking, Cards, Wallets
In-App Wallet Enabled by default in Super Admin Customer top-up, cashback, refunds, instant pay
Cash on Delivery (COD) Admin Panel > Settings > Payments Pay on delivery with OTP verification confirmation
12

Multi-Vendor Modules Setup

  • Creating Store Types: Go to Admin > Modules to enable or disable Food, Grocery, Pharmacy, or eCommerce verticals.
  • Seller Onboarding: Vendors can register from the Web Storefront or be created directly by the Super Admin with customized commission percentage rates.
  • Delivery Zones: Define geographic delivery boundaries using Google Maps polygon draw tool in the admin panel.
13

Troubleshooting & FAQs

Q: How do I fix 500 Internal Server Error after uploading backend?

Check storage permissions (chmod -R 775 storage bootstrap/cache) and verify that .env exists and APP_KEY is generated.

Q: Google Maps shows a blank or gray screen on mobile?

Ensure billing is active on your Google Cloud project and the Maps SDK is enabled with unrestricted package SHA-1 fingerprints.

Q: How to build release APK or App Bundle for Play Store?

Run flutter build appbundle --release in the customer_app or delivery_boy_app directory.

14

Changelog

v2.0.0 September 2024
  • Updated Flutter SDK to 3.24.x compatibility
  • Upgraded Laravel backend & security patches
  • Improved real-time Google Maps live driver tracking
  • Enhanced dark/light theme switching performance
v1.0.0 Initial Release
  • Initial multi-vendor food, grocery, pharmacy and eCommerce release

Need Additional Assistance?

Our dedicated team is here to assist you with setup and customization inquiries.