An enterprise-grade, high-reliability, 4-layer multi-vendor digital commerce platform built for the Bangladesh market.
[CUSTOMER / ADMIN / SELLER / RESELLER / WHOLESALER UI]
↓
[GitHub Hosted Frontend — Vite SPA + Tailwind CSS]
↓
[Google Apps Script Server-Side API Gateway]
↓
[Google Sheets Database (92+ Sheets) + Google Drive Media]
- Frontend: Pure Presentation, Client State, Routing, and User Interaction. Never reads/writes to Google Sheets directly.
- Apps Script API Gateway: Business Logic, Server-Side Authentication, RBAC, Data Validation, LockService Concurrency, and External APIs (bKash/Nagad/Steadfast).
- Google Sheets Database: Central transactional ledger, inventory balances, audit logs, and operational data (
19tz5stOSkfR0pLbRRVBIbM-qdOMbUTk0QD8Xf4Of1Pc). - Google Drive: Media storage for original images, WebP assets, attachments, PDF invoices, and automated database backups.
- Modern Color Palette: Emerald Green (
#059669), Deep Slate (#0f172a), Amber Gold (#f59e0b), and clean whites. - Glassmorphic Elements: Frosted navigation headers, translucent cards, and smooth backdrop-blur effects.
- Extraordinary Notification & Toast System: Dynamic sliding toast notifications with progress countdown bars, custom status icons, sound-simulation animations, and action triggers.
- Modern Form Elements: Floating label inputs, automatic Bangladesh phone number validation (
+8801XXXXXXXXX), responsive focus rings, and real-time calculation. - Micro-Interactions: Hover lifts on buttons, badge pulses, ripple effects, and skeleton shimmer loaders.
- Product Master vs. Seller Offer: A single unified catalog product can be supplied by multiple independent sellers with distinct prices, stock allocations, and commission rates.
- Master Order & Sub-Orders: When a customer places an order containing items from multiple vendors, the system creates one Master Order (
ORD-XXXXX) and automatically splits it into vendor-specific Sub-Orders (ORD-XXXXX-S1,ORD-XXXXX-S2). - Vendor Data Isolation: Sellers have restricted access strictly scoped to their own sub-orders, products, earnings, and store balance.
- 4-Tier Inventory:
AVAILABLE = PHYSICAL - RESERVED - DAMAGED. - Atomic Reservation: Uses Google Apps Script
LockService.getScriptLock()to lock rows during checkout, preventing overselling or race conditions when two customers order the last unit simultaneously.
- Multi-Courier Intelligence: Live aggregator interface checking customer phone delivery history across Steadfast Courier, Pathao Courier, and RedX.
- Algorithmic Risk Scoring: Calculates return rate (RTO), delivery completion percentage, order velocity, and issues automated COD warnings.
- Marketplace Seller: Application onboarding, store profile, stock management, order fulfillment, and weekly withdrawals.
- Dropshipping Reseller: Catalog with pre-negotiated wholesale margins and custom resale pricing.
- Wholesale Bulk Orders: Master carton tier pricing, minimum order quantities (MOQ), and statement ledgers.
- Open your target Google Spreadsheet: Dream Cart BD Master Sheet
- Go to Extensions → Apps Script.
- You can either copy each file from
apps-script/or paste the single combined fileapps-script/Code_Combined.jsdirectly into the editor. - Verify
appsscript.jsonincludes"runtimeVersion": "V8". - Click Deploy → New Deployment.
- Select type: Web app
- Execute as: Me (your Google Account)
- Who has access: Anyone
- Click Deploy and copy your Web App URL (e.g.,
https://script.google.com/macros/s/AKfycb.../exec).
- Push this repository to GitHub (
dreamcartbd). - Update
.envorsrc/api/client.jswith your Google Apps Script Web App URL:VITE_API_BASE_URL=https://script.google.com/macros/s/AKfycb.../exec
- Go to Settings → Pages on your GitHub repository.
- Set Source to GitHub Actions. The included
.github/workflows/deploy.ymlwill automatically build and publish your site with zero manual setup. - (Optional) Connect your custom domain (e.g.
dreamcartbd.com) in GitHub Pages settings.
dreamcartbd/
├── .github/workflows/deploy.yml
├── apps-script/
│ ├── Config.js
│ ├── IDGenerator.js
│ ├── LockService.js
│ ├── Validator.js
│ ├── SheetRepository.js
│ ├── DriveRepository.js
│ ├── CacheService.js
│ ├── AuditService.js
│ ├── AuthService.js
│ ├── ProductService.js
│ ├── InventoryService.js
│ ├── OrderService.js
│ ├── CourierFraudService.js
│ ├── PartnerServices.js
│ ├── OtherServices.js
│ ├── Router.js
│ ├── Code.js
│ ├── Code_Combined.js
│ ├── SheetTriggers.js
│ └── appsscript.json
├── src/
│ ├── api/client.js
│ ├── components/
│ │ ├── Toast.js
│ │ ├── Header.js
│ │ ├── Footer.js
│ │ ├── MobileNav.js
│ │ ├── ProductCard.js
│ │ ├── CartDrawer.js
│ │ └── FraudModal.js
│ ├── pages/
│ │ ├── storefront/
│ │ │ ├── HomePage.js
│ │ │ ├── ShopPage.js
│ │ │ ├── ProductDetailPage.js
│ │ │ ├── CheckoutPage.js
│ │ │ ├── OrderSuccessPage.js
│ │ │ └── TrackOrderPage.js
│ │ ├── admin/AdminPortal.js
│ │ └── partner/PartnerPortal.js
│ ├── store/
│ │ ├── cartStore.js
│ │ └── authStore.js
│ ├── styles/main.css
│ ├── utils/format.js
│ ├── router.js
│ └── main.js
├── index.html
├── package.json
├── vite.config.js
├── tailwind.config.js
└── README.md