Spaces:
Running

proflo / services /api /.env.example
ADI576's picture
Deploy ProFlo UI revamp: shop, admin, cashier + API
aadf537
Raw History Blame Contribute Delete
2.18 kB
PORT=4000
NODE_ENV=development
# Required β€” Supabase β†’ Project Settings β†’ Database β†’ Connection string
# Use the pooler URI (port 6543) for serverless; encode special chars in the password (@ β†’ %40)
DATABASE_URL=postgresql://postgres.[PROJECT_REF]:[YOUR_PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres
# Product images β€” required in production (HF/Render disk is ephemeral)
# Project Settings β†’ API β†’ Project URL and service_role secret
SUPABASE_URL=https://[PROJECT_REF].supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-secret
# Required in production β€” generate a long random string
JWT_SECRET=replace-with-a-long-random-secret
RAZORPAY_WEBHOOK_SECRET=replace-with-razorpay-secret
# RAZORPAY_KEY_ID= # when wiring live Razorpay create-order
# Staff credentials (required in production β€” change defaults!)
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin123
MANAGER_USERNAME=manager
MANAGER_PASSWORD=change-me-manager
# Optional β€” protects /v1/cashier/* (set same value as NEXT_PUBLIC_CASHIER_API_KEY on cashier-web)
# CASHIER_API_KEY=your-cashier-secret
DEFAULT_STORE_CODE=BLR001
# Public base URL for uploaded product images (browser must reach this origin)
# Production with Vercel API proxy on customer shop:
# PUBLIC_API_URL=https://zipp-mart-customer-web.vercel.app/checkout-api
# Or direct API (may be blocked by ad blockers):
# PUBLIC_API_URL=https://your-api.onrender.com
# Optional β€” Resend (https://resend.com) for automatic email receipts after payment
# 1. Sign up at resend.com (free tier: ~100 emails/day)
# 2. Add and verify your domain, or use onboarding address for testing only
# 3. Create an API key β†’ set RESEND_API_KEY
# 4. Set EMAIL_FROM to a verified sender, e.g. ProFlo <receipts@yourdomain.com>
# RESEND_API_KEY=re_xxxxxxxx
# EMAIL_FROM=ProFlo <onboarding@resend.dev>
# Optional β€” generic webhook if you use Make/Zapier instead of Resend
# RECEIPT_NOTIFY_WEBHOOK_URL=https://hooks.example.com/receipt
# LOW_STOCK_NOTIFY_WEBHOOK_URL=https://hooks.example.com/low-stock
# LOW_STOCK_CHECK_INTERVAL_MS=21600000
# Optional β€” worker exits quietly if Redis is unavailable
REDIS_URL=redis://localhost:6379