- NestJS backend: auth, restaurants, orders, drivers, payments, tracking, reviews, zones, admin, email - Next.js 14 frontend: landing, restaurants, checkout, tracking, dashboards, onboarding - Expo mobile app: driver orders and earnings screens - PostgreSQL + PostGIS schema with seed data - Docker Compose for local dev (Postgres, Redis, OSRM) - MapLibre GL + OpenStreetMap integration - Stripe subscription and payment processing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
76 lines
2.8 KiB
Bash
76 lines
2.8 KiB
Bash
#!/usr/bin/env bash
|
|
# ============================================================
|
|
# The Vibe - Stripe Product & Price Setup
|
|
# Run once to create the Stripe products and prices needed
|
|
#
|
|
# Prerequisites:
|
|
# npm install -g stripe (or use the Stripe CLI)
|
|
# stripe login
|
|
# ============================================================
|
|
|
|
set -e
|
|
|
|
echo "==> Creating Stripe products and prices for The Vibe..."
|
|
|
|
# ---- RESTAURANT MONTHLY SUBSCRIPTION ----
|
|
echo ""
|
|
echo "==> Creating Restaurant Monthly Subscription ($500/month)..."
|
|
RESTAURANT_PRODUCT=$(stripe products create \
|
|
--name="The Vibe - Restaurant Subscription" \
|
|
--description="Monthly flat-fee subscription. No commission. Unlimited orders." \
|
|
--metadata[platform]="the-vibe" \
|
|
--metadata[type]="restaurant_subscription" \
|
|
--format=json)
|
|
|
|
RESTAURANT_PRODUCT_ID=$(echo $RESTAURANT_PRODUCT | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
echo "Restaurant product ID: $RESTAURANT_PRODUCT_ID"
|
|
|
|
RESTAURANT_PRICE=$(stripe prices create \
|
|
--product="$RESTAURANT_PRODUCT_ID" \
|
|
--unit-amount=50000 \
|
|
--currency=cad \
|
|
--recurring[interval]=month \
|
|
--nickname="Restaurant Monthly - CAD $500" \
|
|
--format=json)
|
|
|
|
RESTAURANT_PRICE_ID=$(echo $RESTAURANT_PRICE | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
echo "Restaurant price ID: $RESTAURANT_PRICE_ID"
|
|
|
|
# ---- DRIVER DAILY FEE ----
|
|
echo ""
|
|
echo "==> Creating Driver Daily Access Fee ($20/day)..."
|
|
DRIVER_PRODUCT=$(stripe products create \
|
|
--name="The Vibe - Driver Daily Access" \
|
|
--description="Daily login fee. Keep 100% of delivery fees and tips. Break-even after 4 deliveries." \
|
|
--metadata[platform]="the-vibe" \
|
|
--metadata[type]="driver_daily_fee" \
|
|
--format=json)
|
|
|
|
DRIVER_PRODUCT_ID=$(echo $DRIVER_PRODUCT | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
echo "Driver product ID: $DRIVER_PRODUCT_ID"
|
|
|
|
# Note: Driver daily fee is charged as a one-time PaymentIntent, not a recurring price
|
|
# This price ID is kept for reference/future recurring use
|
|
DRIVER_PRICE=$(stripe prices create \
|
|
--product="$DRIVER_PRODUCT_ID" \
|
|
--unit-amount=2000 \
|
|
--currency=cad \
|
|
--nickname="Driver Daily Fee - CAD $20" \
|
|
--format=json)
|
|
|
|
DRIVER_PRICE_ID=$(echo $DRIVER_PRICE | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
echo "Driver price ID: $DRIVER_PRICE_ID"
|
|
|
|
# ---- OUTPUT ----
|
|
echo ""
|
|
echo "============================================================"
|
|
echo "Add these to your .env file:"
|
|
echo "============================================================"
|
|
echo "STRIPE_RESTAURANT_PRICE_ID=$RESTAURANT_PRICE_ID"
|
|
echo "STRIPE_DRIVER_DAILY_PRICE_ID=$DRIVER_PRICE_ID"
|
|
echo "============================================================"
|
|
echo ""
|
|
echo "Also set up your webhook:"
|
|
echo " stripe listen --forward-to localhost:3001/api/v1/payments/webhook"
|
|
echo " (copy the webhook secret into STRIPE_WEBHOOK_SECRET)"
|